Hi. I’m using https://graphql-code-generator.com/ (https://www.npmjs.com/package/@graphql-codegen/cli). I am using it with the schema generated by Fauna, since it includes a lot of generated content beyond my original schema, such as scalars, _id, _ts, input types, queries, and so on. It’s a bit annoying to use the FaunaDB GraphQL schema right now, and it would be nice to be improved sometime.
(The biggest one) AFAICT I can’t automatically download the FaunaDB graphql anywhere, via a script. I haven’t dug into the dashboard code to see if there’s a better option, but the only thing I see to do is download it manually from the dashboard’s GraphQL. That’s not build-script-friendly. If I missed an option in the docs, please let me know, with my apologies.
The doc strings in my original GraphQL have been converted to comments in the Fauna GraphQL export, so that the generated typescript doesn’t have the help.
The directives in the GraphQL export confuse the parser. I remove those.
There’s an odd newline I have to correct.
# The Long scalar type
represents non-fractional signed whole numeric values.
It would be nice to make this easier sometime.