Autopagination not working with multiple sources
tmigone opened this issue · comments
Hey, I think I found an issue with autopagination. When adding a second subgraph to the sources list in .graphclient.yml
it stops working and errors out with the following:
/Users/tomi/git/thegraph/graphclient-test/node_modules/@graphql-tools/delegate/cjs/checkResultAndHandleErrors.js:28
const combinedError = new utils_1.AggregateError(errors, errors.map(error => error.message).join(', \n'));
^
AggregateError: The `first` argument must be between 0 and 1000, but is 2500,
The `first` argument must be between 0 and 1000, but is 2500,
The `first` argument must be between 0 and 1000, but is 2500,
... repeated many times
The `first` argument must be between 0 and 1000, but is 2500,
The `first` argument must be between 0 and 1000, but is 2500
at mergeDataAndErrors (/Users/tomi/git/thegraph/graphclient-test/node_modules/@graphql-tools/delegate/cjs/checkResultAndHandleErrors.js:28:31)
at checkResultAndHandleErrors (/Users/tomi/git/thegraph/graphclient-test/node_modules/@graphql-tools/delegate/cjs/checkResultAndHandleErrors.js:9:38)
at Transformer.transformResult (/Users/tomi/git/thegraph/graphclient-test/node_modules/@graphql-tools/delegate/cjs/Transformer.js:42:79)
at /Users/tomi/git/thegraph/graphclient-test/node_modules/@graphql-tools/delegate/cjs/delegateToSchema.js:58:28
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.rawSourceContext.<computed>.<computed> [as allocationCreatedEvents] (/Users/tomi/git/thegraph/graphclient-test/node_modules/@graphql-mesh/runtime/cjs/in-context-sdk.js:186:42)
at async Promise.all (index 0)
at async promiseForObject (/Users/tomi/git/thegraph/graphclient-test/node_modules/@graphql-tools/executor/cjs/execution/promiseForObject.js:14:28)
at async subschemaExecute (/Users/tomi/git/thegraph/graphclient-test/node_modules/@graphql-mesh/runtime/cjs/useSubschema.js:79:32)
at async /Users/tomi/git/thegraph/graphclient-test/node_modules/@envelop/core/cjs/orchestrator.js:376:27 {
path: [ 'allocationCreatedEvents' ],
locations: undefined,
extensions: [Object: null prototype] {}
}
I've built a simple repo that reproduces the issue here: https://github.com/tmigone/graphclient-test
Fixed in @graphprotocol/client-cli@2.2.20
:)