Description
Currently Juniper has no concept of the GraphQL Schema Language / SDL (referred to as "SDL" from now on). There is no way in Juniper to go from a schema defined in Rust to the SDL representation of it and vice versa.
Some 3rd party GraphQL tools work with the SDL and thus would not work with Juniper. More often than not, many of those tools support introspection query's output (usually in a file called schema.json
) as well. Juniper "supports" the introspection query, as it is a standard GraphQL query that any client could do, though we have a task to make it more ergonomic.
The reference GraphQL server Graphql.js includes support for:
- Doing everything in JS
- Defining in JS and converting to SDL
- Defining in SDL and converting to JS
- Built in introspection query
- Introspection -> JS
In fact, they explicitly test that you can go around between all these representations and have the same result.
In the Rust world we have:
- Doing everything in Rust (
juniper
) - Defining in Rust and converting to SDL (Add support for GraphQL Schema Language #324)
- Defining in SDL and converting to Rust (
juniper-from-schema
) - Built in introspection query (Implement introspection schema.json generation #307)
- Introspection -> Rust (no task or project, though
graphql-client
does similar but doesn't use Juniper's schema representation)
So we need to decide if we follow GraphQL.js and include all the functionality in Juniper or we say Juniper is the "Rust-only" world above and everything else is handled in other crates (either in this workspace or in their own projects). I'm also not even sure we can include everything, as we need to do some work at compile time rather than runtime like GraphQL.js does.
/cc @theduke @mhallin @tailhook @davidpdrsn @tomhoule
(originally discussed in #324)