Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
# Schema: Relay-style connection type PostConnection { edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! } type PostEdge { node: Post! cursor: String! } type PageInfo { hasNextPage: Boolean! hasPreviousPage: Boolean! startCursor: String endCursor: String } type Query { posts(first: Int, after: String, last: Int, before: String): PostConnection! } # Query: first page query FirstPage { posts(first: 10) { totalCount edges { cursor node { id title publishedAt } } pageInfo { hasNextPage endCursor } } } # Query: next page using endCursor from previous response query NextPage { posts(first: 10, after: "cursor_from_previous_response") { edges { node { id title } } pageInfo { hasNextPage endCursor } } }
Result
Open