You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual: Error: TypeError: Cannot read property 'type' of undefined when I've found out happens in node_modules/graphql-static-binding/dist/generators/graphcool-ts.js:48:89:
var whereType = field.args.find(function (a) { return a.name === 'where'; }).type.name;
// field.args is undefined!!!
I was trying to dig a bit deeper but I then I had too little knowledge about project itself to realize what is really going on.
My workaround was changing generator from graphcool-ts to binding-ts and it worked but I have no idea why.
Also, it took me a while to realize I needed to add prepare-bundle: src/generated/app.graphql to app.extensions to have all imports working. My intuition was to add bundle: true to prepare-binding options but it was not working.
The text was updated successfully, but these errors were encountered:
I think the culprit is the extra prepare-bundle on the endpoint.
The config options are explained here: https://github.com/supergraphql/graphql-cli-prepare#graphql-config-extensions.
Also, the app schema is not a Graphcool schema. There is some stuff in the graphcool-ts generator that is Graphcool specific, so your decision to use binding-ts (the generic version) instead, was correct.
There will be improved documentation around this topic.
Steps to reproduce
Modify
.graphqlconfig.yml
to:Run
yarn prepare
Expected: complie bindings for app schema
Actual: Error:
TypeError: Cannot read property 'type' of undefined
when I've found out happens innode_modules/graphql-static-binding/dist/generators/graphcool-ts.js:48:89
:I was trying to dig a bit deeper but I then I had too little knowledge about project itself to realize what is really going on.
My workaround was changing generator from
graphcool-ts
tobinding-ts
and it worked but I have no idea why.Also, it took me a while to realize I needed to add
prepare-bundle: src/generated/app.graphql
toapp.extensions
to have all imports working. My intuition was to addbundle: true
toprepare-binding
options but it was not working.The text was updated successfully, but these errors were encountered: