-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error union types does not has id field #27
Comments
hmm, i'm using the GraphQLStateGenerator... could that be the diference? running here with AsyncGenerator works too... only with GraphQLStateGenerator that fails
|
Yes, they are very different
After discovering the shortcomings of apollo client and facebook relay, I developed graphql-state. Graphql-state is actually a relational database in the browser, so it needs all object have ids. However, until now, graphql-state does not support the use of union types to express the inheritance relationship of objects with ids. If you don't want to use graphql-state, no issue; if you want to use graphql-state, here's a work around (because I'm currently busy developing another project of mine: jimmer, I can't find time to implement this not simple function enhancement in the short term)
|
Ah.. ok i'll use this workaround.... thanks 👍😁 |
Getting error when trying to generate types when the schema has union
Error: Section does not has id field
\node_modules\graphql-ts-client-codegen\dist\state\GraphQLStateFetcherWriter.js:63:35
throw new Error(
${nodeType.name} does not has id field
);Schema
The text was updated successfully, but these errors were encountered: