Skip to content

Add support for parsing and validating a query without executing it #726

Open
@ccbrown

Description

@ccbrown

Currently there's no way to know if a request contains a subscription operation until you try to execute it. This is a problem for example in our graphql-ws implementation, which currently just has to invoke both juniper::execute and juniper::resolve_into_stream and see what works:

// TODO: This could be made more efficient if juniper exposed functionality to allow us to
// parse and validate the query, determine whether it's a subscription, and then execute
// it. For now, the query gets parsed and validated twice.

It would be useful if juniper had a lower level API that could be used to parse and validate a query, determine what type of operation is requested, then execute it.

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