Open pie6k opened 6 years ago
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.