graphql-code-generator: v8 error: Cannot read property 'type' of undefined

Getting the following error after upgrading to v8.0.2. Not sure if I should have migrated something somehow?

$ $(yarn bin)/gql-gen -u http://localhost:3000/graphql -t typescript -o src/app/data/schema.ts "src/**/*.{queries,fragments}.ts"
Loading GraphQL Introspection from remote: http://localhost:3000/graphql...
TypeError: Cannot read property 'type' of undefined
    at /home/simon/dev/plotist/plotist-ng/node_modules/graphql-codegen-core/dist/operations/build-selection-set.js:37:64
    at Array.map (native)
    at Object.buildSelectionSet (/home/simon/dev/plotist/plotist-ng/node_modules/graphql-codegen-core/dist/operations/build-selection-set.js:31:61)
    at Object.transformFragment (/home/simon/dev/plotist/plotist-ng/node_modules/graphql-codegen-core/dist/operations/transform-fragment-document.js:17:45)
    at /home/simon/dev/plotist/plotist-ng/node_modules/graphql-codegen-core/dist/operations/transform-document.js:21:65
    at Array.forEach (native)
    at transformDocument (/home/simon/dev/plotist/plotist-ng/node_modules/graphql-codegen-core/dist/operations/transform-document.js:16:17)
    at Object.<anonymous> (/home/simon/dev/plotist/plotist-ng/node_modules/graphql-code-generator/dist/cli.js:138:43)
    at step (/home/simon/dev/plotist/plotist-ng/node_modules/graphql-code-generator/dist/cli.js:32:23)
    at Object.next (/home/simon/dev/plotist/plotist-ng/node_modules/graphql-code-generator/dist/cli.js:13:53)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

@altschuler yeah that is my goal for the next days - just want to make sure that we don’t have any other surprises like these issues 😃

Thank you so much for your review and help in fixing these issues!