-
Hi, I am trying to set up Schema Awareness through the introspection example you have in the docs, to my understanding I need to download the schema and add it through my ./assets folder - and then call it when initializing the urql client? Should I have each app downloading the schema at startup, or is it better to just bundle it in the app bundle (as the schema shouldn't change that often)? A follow-on question, I am trying to run the example in the docs in a simple node setup, i.e. npm init and then import the packages required. This was my thinking of just downloading the schema as a json on my laptop and then pass it into the app bundle through the ./assets folder. However, I am running into a weird import problem:
This is my simple package.json:
Any help on best practices and also how to get the example to work (if I should run it outside of the React Native application) would be very appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hiya 👋 This is pretty interesting. It looks like Node isn't resolving the direct file of For now you may want to make sure that Node doesn't load the Can you let me know which version of Node you're using please? |
Beta Was this translation helpful? Give feedback.
Hiya 👋 This is pretty interesting. It looks like Node isn't resolving the direct file of
.mjs
here, which makes sense I suppose since it always expects the direct path. The interesting thing about this is that this does work in@urql/core
.For now you may want to make sure that Node doesn't load the
.mjs
file by directly referencing@urql/introspection/dist/urql-introspection.js
but in the meantime I'll have a look at what's going on.Can you let me know which version of Node you're using please?