apollo-parser@0.7.1
·
300 commits
to main
since this release
0.7.1 - 2023-10-10
Features
parse_field_setparses a selection set with optional outer brackets - lrlna, pull/685 fixing issue/681
This returns aSyntaxTree<SelectionSet>which instead of.document() -> cst::Document
has.field_set() -> cst::SelectionSet.
This is intended to parse string value of aFieldSetcustom scalar
used in some Apollo Federation directives.let source = r#"a { a }"#; let parser = Parser::new(source); let cst: SyntaxTree<cst::SelectionSet> = parser.parse_selection_set(); let errors = cst.errors().collect::<Vec<_>>(); assert_eq!(errors.len(), 0);