on osx, running "apollo codegen:generate --target=typescript --addTypename" in terminal works but putting it in package.json scripts and use "npm run" to execute the exact same command will report an error as below:
✖ Generating query files with 'typescript' target
→ Cannot query field "xxx" on type "Query"
GraphQLError: Cannot query field "xxx" on type "Query"
at Compiler.compileSelection (/node_modules/apollo-codegen-core/lib/compiler/index.js:120:27)
at selections.selectionSetNode.selections.map.selectionNode (/node_modules/apollo-codegen-core/lib/compiler/index.js:106:76)
on osx, running "apollo codegen:generate --target=typescript --addTypename" in terminal works but putting it in package.json scripts and use "npm run" to execute the exact same command will report an error as below:
✖ Generating query files with 'typescript' target
→ Cannot query field "xxx" on type "Query"
GraphQLError: Cannot query field "xxx" on type "Query"
at Compiler.compileSelection (
/node_modules/apollo-codegen-core/lib/compiler/index.js:120:27)/node_modules/apollo-codegen-core/lib/compiler/index.js:106:76)at selections.selectionSetNode.selections.map.selectionNode (