Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Error on Integration w/ Directus.io #1666

Closed
ddcollins opened this issue Feb 23, 2021 · 1 comment
Closed

Batch Error on Integration w/ Directus.io #1666

ddcollins opened this issue Feb 23, 2021 · 1 comment

Comments

@ddcollins
Copy link

Describe the bug
Enabling batch for GraphQL Handler connection to Directus.io results in the error below.
The integration works disabling batch.

{
"GraphQLError: Cannot read property 'columns' of undefined",
        "    at Object.relocatedError (/Users/dustin/Projects/mesh-directus-replication/node_modules/@graphql-tools/utils/index.cjs.js:3894:12)",
        "    at mergeDataAndErrors (/Users/dustin/Projects/mesh-directus-replication/node_modules/@graphql-tools/delegate/index.cjs.js:1397:34)",
        "    at /Users/dustin/Projects/mesh-directus-replication/node_modules/@graphql-tools/delegate/index.cjs.js:1425:66",
        "    at Array.forEach (<anonymous>)",
        "    at mergeDataAndErrors (/Users/dustin/Projects/mesh-directus-replication/node_modules/@graphql-tools/delegate/index.cjs.js:1423:27)",
        "    at /Users/dustin/Projects/mesh-directus-replication/node_modules/@graphql-tools/delegate/index.cjs.js:1425:66",
        "    at Array.forEach (<anonymous>)",
        "    at mergeDataAndErrors (/Users/dustin/Projects/mesh-directus-replication/node_modules/@graphql-tools/delegate/index.cjs.js:1423:27)",
        "    at checkResultAndHandleErrors (/Users/dustin/Projects/mesh-directus-replication/node_modules/@graphql-tools/delegate/index.cjs.js:1386:38)",
        "    at CheckResultAndHandleErrors.transformResult (/Users/dustin/Projects/mesh-directus-replication/node_modules/@graphql-tools/delegate/index.cjs.js:1382:16)"

To Reproduce
Steps to reproduce the behavior:

This repo will get you set up: https://github.com/ddcollins/mesh-directus-replication

Just enable batch for the handler in the config.

The mesh config file also has commented out transforms that each result in an error when enabled.

Environment:

  • OS: 10.15.7
"@graphql-mesh/cli": "0.19.2",
"@graphql-mesh/graphql": "^0.13.17",
"@graphql-mesh/json-schema": "^0.10.7",
"@graphql-mesh/transform-encapsulate": "^0.1.27",
"@graphql-mesh/transform-filter-schema": "^0.9.0",
@ardatan
Copy link
Owner

ardatan commented Aug 8, 2022

Cannot read property 'columns' of undefined
That errors seems to be coming from the remote API. Batching basically creates operations with multiple fields with aliases in the boundaries of the GraphQL Spec.
You can disable it with batch: false flag. Also you can learn more its algorithm;
https://www.graphql-tools.com/docs/batch-execution

@ardatan ardatan closed this as completed Aug 8, 2022
@theguild-bot theguild-bot mentioned this issue Aug 11, 2022
@theguild-bot theguild-bot mentioned this issue Sep 28, 2023
klippx pushed a commit to klippx/graphql-mesh that referenced this issue Oct 9, 2024
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants