Open rokn opened 2 years ago
In relay-compiler document, we can set 'schemaExtensions' option. After setting 'schemaExtensions', my client schema extension worked. I guess the documentation need explicit explanation.
Thanks for reporting. I think @Beingbook is right, and we need to update documentation to mention the schemaExtensions
in the compiler configuration.
Yup, adding a folder which contains the schema extensions to the schemaExtensions
property in my package.json worked.
Thanks for the report @rokn and the solution @Beingbook. Would either of you like to like to contribute a fix to the docs?
Let me try documentation coming week.
Hey, I've tried adding a local client schema extension as described here: https://relay.dev/docs/guides/client-schema-extensions/
The problem arises when I try to compile a query which uses this extensions. I've set-up a tiny example repo which showcases the problem: https://github.com/rokn/relay-example-local-schema/
There is one schema in data/schema.graphql
And one extension schema in src/clientSchema.graphql
When I try to run the relay compiler I get the following error:
If I add the extension schema to be part of the main schema there are no problems compiling it.