v8 error: Cannot read property 'type' of undefined
See original GitHub issueGetting 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)
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >How to Prevent the Error: Cannot Read Property '0' of Undefined
A guide on how to prevent the error "cannot Read Property '0' of Undefined", covering techniques such as try, catch, using const over...
Read more >Uncaught TypeError : Cannot read properties of undefined
Causes for TypeError: Cannot Read Property of Undefined. The error clearly says that it is Undefined, which means the variable might be declared...
Read more >TypeError: Cannot read properties of undefined (reading 'map')
The properties, products , that you're passing to your component ( Products ) are undefined. The Map method is taking in account the ......
Read more >Uncaught TypeError: Cannot read property '1' of undefined
This error is because there is a property field in that model, on that form that doesn't have his generic value defined, probably...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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!
Awesome, it works! The default emit templates (at least for typescript) are quite different than in 0.7, eg.
ElementsQuery.Result
is now emitted asElements.Query
so you might want to bump a major version?