On import of graphql schema, origin dashboard.fauna.com throws a CORS policy error. Is there something I’m missing or is this a bug?
are you still seeing this error?
Schema file: https://pastebin.com/uiGQVjZV
What are expecting from? Can you confirm that what you linked to is the exact text you are trying to import into fauna? If not, then that is really what needs to be shared.
Some thing that stand out in shared schema:
schemashould not be called out. That is, don’t use
mutation_roottype, just define
- fauna graphql endpoint will not accept customer scalars, e.g.
- importing as is all you the
..._responsetypes will generate a new Collection. Consider
@embeddeddirective with those.
- All of the mutations will need custom UDFs associated with
@ptpaterson Yes this is the actual text I’m trying to import into fauna. The schema is created in hasura with underlying postgresql database. I was hoping that extracting it with graphqurl would make it ready to be imported in fauna for easy migration.
Thanks for investigating the file. Do you happen to know a good resource/documentation on .graphql format (and perhaps how to migrate to fauna)?
I strongly recommend reading the docs. Browse topics here. Try some stuff out and get a feel for how Fauna’s GraphQL implementation works. Come back and feel welcome to ask more questions about how to do what you want.
Learning FQL is still valuable and important for many common, basic or advanced scenarios. Fauna is releasing some blogs about that.
I also started a topic here about what I think are good practices regarding customer resolvers.
Tips for migrating specifically… Remember that Fauna is not an SQL database. Fauna requires you to be VERY explicit about things like indexes, sorting, filtering, etc. These things are mostly not out of the box for graphql. The forums has many topics regarding possible new features that are being considered.
Thanks @ptpaterson for you expansive response, will look into it!