Last active
September 22, 2019 09:32
-
-
Save dbayarchyk/2b82b2421d7459e441a7e762b30d43b4 to your computer and use it in GitHub Desktop.
Improve your GraphQL schema with the Relay Specification - connectionSchema.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
posts(after: String, before: String, first: Int, last: Int): PostConnection! | |
} | |
type PostConnection { | |
edges: [PostEdge!]! | |
pageInfo: PageInfo! | |
} | |
type PostEdge { | |
cursor: String! | |
node: Post! | |
} | |
type Post { | |
title: String! | |
} | |
type PageInfo { | |
hasNextPage: Boolean! | |
hasPreviousPage: Boolean! | |
startCursor: String | |
endCursor: String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment