Skip to main content

to_graphql_parser_query_ast

Function to_graphql_parser_query_ast 

Source
pub fn to_graphql_parser_query_ast<'a>(
    doc: &Document<'_>,
    source_map: &SourceMap<'a>,
) -> ParseResult<'a, Document<'static, String>>
Expand description

Convert a libgraphql AST Document to a graphql_parser query Document.

Returns ParseResult with errors for any features that graphql_parser cannot represent:

  • VariableDefinition with non-empty directives (directives dropped)

Type-system definitions (schema, types, directives, extensions) are silently skipped since they belong in to_graphql_parser_schema_ast.