Skip to content

Instantly share code, notes, and snippets.

@seandearnaley
Created February 19, 2020 06:17
Show Gist options
  • Save seandearnaley/7f551a89415db74712b64fa52fbdfe2c to your computer and use it in GitHub Desktop.
Save seandearnaley/7f551a89415db74712b64fa52fbdfe2c to your computer and use it in GitHub Desktop.
GetCategoryNode.graphql
# import CardParts from "CardParts.graphql";
# import CategoryParts from "CategoryParts.graphql";
query GetCategoryNode(
$id: ID!
$first: Int
$last: Int
$after: String
$before: String
$orderByColumn: String
$orderByDirection: DirectionEnum
) {
category: node(id: $id) {
__typename
... on Node {
id
created
updated
}
... on Category {
...CategoryParts
cards(
first: $first
last: $last
after: $after
before: $before
orderByColumn: $orderByColumn
orderByDirection: $orderByDirection
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
totalCount
}
edges {
cursor
node {
...CardParts
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment