Skip to content

Determine if Juniper should support alternate representations #328

Open
@LegNeato

Description

@LegNeato

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:

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions