graphql-rust / graphql-parser

A graphql query language and schema definition language parser and formatter for rust
Apache License 2.0
355 stars 77 forks source link

Added consume_definition #42

Closed That3Percent closed 3 years ago

That3Percent commented 4 years ago

This PR adds a new API consume_query:

/// Parses a single ExecutableDefinition and returns an AST as well as the
/// remainder of the input which is unparsed
pub fn consume_definition<'a, S>(s: &'a str) -> Result<(Definition<'a, S>, &'a str), ParseError> where S: Text<'a> { ... }

There are 4 tests demonstrating the functionality.

Resolves #35 Replaces #36

tailhook commented 3 years ago

Merged! Sorry for the long delay.

That3Percent commented 3 years ago

No problem! Thanks so much.