Created
May 13, 2020 06:24
-
-
Save ryanclark/c12c27200632f533c167745300c8d977 to your computer and use it in GitHub Desktop.
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
export function BuildList(props: BuildListProps) { | |
const { data, hasPrevious, hasNext } = usePaginationFragment< | |
BuildListQuery, | |
BuildList_builds$key | |
>( | |
graphql` | |
fragment BuildList_builds on Query | |
@refetchable(queryName: "BuildListQuery") { | |
builds( | |
first: $first | |
after: $after | |
last: $last | |
before: $before | |
filter: $filter | |
pipelineId: $pipelineId | |
includeArchived: false | |
) @connection(key: "Query_builds", filters: []) { | |
totalCount | |
edges { | |
__id | |
cursor | |
node { | |
...BuildItem_build | |
} | |
} | |
pageInfo { | |
endCursor | |
hasPreviousPage | |
hasNextPage | |
startCursor | |
} | |
} | |
} | |
`, | |
props.rootQuery | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment