├── .editorconfig ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .travis.yml ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── benches └── graphql.rs ├── bulk.yaml ├── src ├── common.rs ├── format.rs ├── helpers.rs ├── lib.rs ├── position.rs ├── query │ ├── ast.rs │ ├── error.rs │ ├── format.rs │ ├── grammar.rs │ ├── minify.rs │ └── mod.rs ├── schema │ ├── ast.rs │ ├── error.rs │ ├── format.rs │ ├── grammar.rs │ └── mod.rs └── tokenizer.rs ├── tests ├── queries │ ├── directive_args.graphql │ ├── directive_args_multiline.graphql │ ├── fragment.graphql │ ├── fragment_spread.graphql │ ├── inline_fragment.graphql │ ├── inline_fragment_dir.graphql │ ├── kitchen-sink.graphql │ ├── kitchen-sink_canonical.graphql │ ├── minimal.graphql │ ├── minimal_mutation.graphql │ ├── minimal_query.graphql │ ├── mutation_directive.graphql │ ├── mutation_nameless_vars.graphql │ ├── named_query.graphql │ ├── nested_selection.graphql │ ├── query_aliases.graphql │ ├── query_arguments.graphql │ ├── query_arguments_multiline.graphql │ ├── query_array_argument_multiline.graphql │ ├── query_directive.graphql │ ├── query_list_argument.graphql │ ├── query_nameless_vars.graphql │ ├── query_nameless_vars_multiple_fields.graphql │ ├── query_nameless_vars_multiple_fields_canonical.graphql │ ├── query_object_argument.graphql │ ├── query_object_argument_multiline.graphql │ ├── query_var_default_float.graphql │ ├── query_var_default_list.graphql │ ├── query_var_default_object.graphql │ ├── query_var_default_string.graphql │ ├── query_var_defaults.graphql │ ├── query_vars.graphql │ ├── string_literal.graphql │ ├── subscription_directive.graphql │ └── triple_quoted_literal.graphql ├── query_errors.rs ├── query_errors │ ├── bad_args.txt │ └── invalid_curly_brace.txt ├── query_roundtrips.rs ├── schema_roundtrips.rs └── schemas │ ├── directive.graphql │ ├── directive_descriptions.graphql │ ├── directive_descriptions_canonical.graphql │ ├── directive_variable_definition.graphql │ ├── empty_union.graphql │ ├── enum.graphql │ ├── extend_enum.graphql │ ├── extend_input.graphql │ ├── extend_input_canonical.graphql │ ├── extend_interface.graphql │ ├── extend_object.graphql │ ├── extend_scalar.graphql │ ├── implements.graphql │ ├── implements_amp.graphql │ ├── implements_amp_canonical.graphql │ ├── implements_interface.graphql │ ├── input_type.graphql │ ├── interface.graphql │ ├── kitchen-sink.graphql │ ├── kitchen-sink_canonical.graphql │ ├── minimal.graphql │ ├── minimal_type.graphql │ ├── repeatable.graphql │ ├── scalar_type.graphql │ ├── simple_object.graphql │ ├── union.graphql │ └── union_extension.graphql └── vagga.yaml /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/.editorconfig -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /Cargo.lock 2 | /.vagga 3 | /target 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/.travis.yml -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/LICENSE-APACHE -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/LICENSE-MIT -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/README.md -------------------------------------------------------------------------------- /benches/graphql.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/benches/graphql.rs -------------------------------------------------------------------------------- /bulk.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/bulk.yaml -------------------------------------------------------------------------------- /src/common.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/common.rs -------------------------------------------------------------------------------- /src/format.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/format.rs -------------------------------------------------------------------------------- /src/helpers.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/helpers.rs -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/lib.rs -------------------------------------------------------------------------------- /src/position.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/position.rs -------------------------------------------------------------------------------- /src/query/ast.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/query/ast.rs -------------------------------------------------------------------------------- /src/query/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/query/error.rs -------------------------------------------------------------------------------- /src/query/format.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/query/format.rs -------------------------------------------------------------------------------- /src/query/grammar.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/query/grammar.rs -------------------------------------------------------------------------------- /src/query/minify.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/query/minify.rs -------------------------------------------------------------------------------- /src/query/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/query/mod.rs -------------------------------------------------------------------------------- /src/schema/ast.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/schema/ast.rs -------------------------------------------------------------------------------- /src/schema/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/schema/error.rs -------------------------------------------------------------------------------- /src/schema/format.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/schema/format.rs -------------------------------------------------------------------------------- /src/schema/grammar.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/schema/grammar.rs -------------------------------------------------------------------------------- /src/schema/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/schema/mod.rs -------------------------------------------------------------------------------- /src/tokenizer.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/src/tokenizer.rs -------------------------------------------------------------------------------- /tests/queries/directive_args.graphql: -------------------------------------------------------------------------------- 1 | query { 2 | node @dir(a: 1, b: "2", c: true, d: false, e: null) 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/directive_args_multiline.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/directive_args_multiline.graphql -------------------------------------------------------------------------------- /tests/queries/fragment.graphql: -------------------------------------------------------------------------------- 1 | fragment frag on Friend { 2 | node 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/fragment_spread.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/fragment_spread.graphql -------------------------------------------------------------------------------- /tests/queries/inline_fragment.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/inline_fragment.graphql -------------------------------------------------------------------------------- /tests/queries/inline_fragment_dir.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/inline_fragment_dir.graphql -------------------------------------------------------------------------------- /tests/queries/kitchen-sink.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/kitchen-sink.graphql -------------------------------------------------------------------------------- /tests/queries/kitchen-sink_canonical.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/kitchen-sink_canonical.graphql -------------------------------------------------------------------------------- /tests/queries/minimal.graphql: -------------------------------------------------------------------------------- 1 | { 2 | a 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/minimal_mutation.graphql: -------------------------------------------------------------------------------- 1 | mutation { 2 | notify 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/minimal_query.graphql: -------------------------------------------------------------------------------- 1 | query { 2 | node 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/mutation_directive.graphql: -------------------------------------------------------------------------------- 1 | mutation @directive { 2 | node 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/mutation_nameless_vars.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/mutation_nameless_vars.graphql -------------------------------------------------------------------------------- /tests/queries/named_query.graphql: -------------------------------------------------------------------------------- 1 | query Foo { 2 | field 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/nested_selection.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/nested_selection.graphql -------------------------------------------------------------------------------- /tests/queries/query_aliases.graphql: -------------------------------------------------------------------------------- 1 | query { 2 | an_alias: node 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/query_arguments.graphql: -------------------------------------------------------------------------------- 1 | query { 2 | node(id: 1) 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/query_arguments_multiline.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/query_arguments_multiline.graphql -------------------------------------------------------------------------------- /tests/queries/query_array_argument_multiline.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/query_array_argument_multiline.graphql -------------------------------------------------------------------------------- /tests/queries/query_directive.graphql: -------------------------------------------------------------------------------- 1 | query @directive { 2 | node 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/query_list_argument.graphql: -------------------------------------------------------------------------------- 1 | query { 2 | node(id: 1, list: [123, 456]) 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/query_nameless_vars.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/query_nameless_vars.graphql -------------------------------------------------------------------------------- /tests/queries/query_nameless_vars_multiple_fields.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/query_nameless_vars_multiple_fields.graphql -------------------------------------------------------------------------------- /tests/queries/query_nameless_vars_multiple_fields_canonical.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/query_nameless_vars_multiple_fields_canonical.graphql -------------------------------------------------------------------------------- /tests/queries/query_object_argument.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/query_object_argument.graphql -------------------------------------------------------------------------------- /tests/queries/query_object_argument_multiline.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/query_object_argument_multiline.graphql -------------------------------------------------------------------------------- /tests/queries/query_var_default_float.graphql: -------------------------------------------------------------------------------- 1 | query Foo($site: Float = 0.5) { 2 | field 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/query_var_default_list.graphql: -------------------------------------------------------------------------------- 1 | query Foo($site: [Int] = [123, 456]) { 2 | field 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/query_var_default_object.graphql: -------------------------------------------------------------------------------- 1 | query Foo($site: Site = {url: null}) { 2 | field 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/query_var_default_string.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/query_var_default_string.graphql -------------------------------------------------------------------------------- /tests/queries/query_var_defaults.graphql: -------------------------------------------------------------------------------- 1 | query Foo($site: Site = MOBILE) { 2 | field 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/query_vars.graphql: -------------------------------------------------------------------------------- 1 | query Foo($arg: SomeType) { 2 | field 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/string_literal.graphql: -------------------------------------------------------------------------------- 1 | query { 2 | node(id: "hello") 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/subscription_directive.graphql: -------------------------------------------------------------------------------- 1 | subscription @directive { 2 | node 3 | } 4 | -------------------------------------------------------------------------------- /tests/queries/triple_quoted_literal.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/queries/triple_quoted_literal.graphql -------------------------------------------------------------------------------- /tests/query_errors.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/query_errors.rs -------------------------------------------------------------------------------- /tests/query_errors/bad_args.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/query_errors/bad_args.txt -------------------------------------------------------------------------------- /tests/query_errors/invalid_curly_brace.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/query_errors/invalid_curly_brace.txt -------------------------------------------------------------------------------- /tests/query_roundtrips.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/query_roundtrips.rs -------------------------------------------------------------------------------- /tests/schema_roundtrips.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schema_roundtrips.rs -------------------------------------------------------------------------------- /tests/schemas/directive.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/directive.graphql -------------------------------------------------------------------------------- /tests/schemas/directive_descriptions.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/directive_descriptions.graphql -------------------------------------------------------------------------------- /tests/schemas/directive_descriptions_canonical.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/directive_descriptions_canonical.graphql -------------------------------------------------------------------------------- /tests/schemas/directive_variable_definition.graphql: -------------------------------------------------------------------------------- 1 | directive @configurable on VARIABLE_DEFINITION 2 | -------------------------------------------------------------------------------- /tests/schemas/empty_union.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/empty_union.graphql -------------------------------------------------------------------------------- /tests/schemas/enum.graphql: -------------------------------------------------------------------------------- 1 | enum Site { 2 | DESKTOP 3 | MOBILE 4 | } 5 | -------------------------------------------------------------------------------- /tests/schemas/extend_enum.graphql: -------------------------------------------------------------------------------- 1 | extend enum Site { 2 | VR 3 | } 4 | -------------------------------------------------------------------------------- /tests/schemas/extend_input.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/extend_input.graphql -------------------------------------------------------------------------------- /tests/schemas/extend_input_canonical.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/extend_input_canonical.graphql -------------------------------------------------------------------------------- /tests/schemas/extend_interface.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/extend_interface.graphql -------------------------------------------------------------------------------- /tests/schemas/extend_object.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/extend_object.graphql -------------------------------------------------------------------------------- /tests/schemas/extend_scalar.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/extend_scalar.graphql -------------------------------------------------------------------------------- /tests/schemas/implements.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/implements.graphql -------------------------------------------------------------------------------- /tests/schemas/implements_amp.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/implements_amp.graphql -------------------------------------------------------------------------------- /tests/schemas/implements_amp_canonical.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/implements_amp_canonical.graphql -------------------------------------------------------------------------------- /tests/schemas/implements_interface.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/implements_interface.graphql -------------------------------------------------------------------------------- /tests/schemas/input_type.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/input_type.graphql -------------------------------------------------------------------------------- /tests/schemas/interface.graphql: -------------------------------------------------------------------------------- 1 | interface Bar { 2 | one: Type 3 | } 4 | -------------------------------------------------------------------------------- /tests/schemas/kitchen-sink.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/kitchen-sink.graphql -------------------------------------------------------------------------------- /tests/schemas/kitchen-sink_canonical.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/kitchen-sink_canonical.graphql -------------------------------------------------------------------------------- /tests/schemas/minimal.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/minimal.graphql -------------------------------------------------------------------------------- /tests/schemas/minimal_type.graphql: -------------------------------------------------------------------------------- 1 | type UndefinedType 2 | -------------------------------------------------------------------------------- /tests/schemas/repeatable.graphql: -------------------------------------------------------------------------------- 1 | directive @filter(expression: String!) repeatable on FIELD 2 | -------------------------------------------------------------------------------- /tests/schemas/scalar_type.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/scalar_type.graphql -------------------------------------------------------------------------------- /tests/schemas/simple_object.graphql: -------------------------------------------------------------------------------- 1 | type Foo { 2 | bar: Type 3 | } 4 | -------------------------------------------------------------------------------- /tests/schemas/union.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/tests/schemas/union.graphql -------------------------------------------------------------------------------- /tests/schemas/union_extension.graphql: -------------------------------------------------------------------------------- 1 | extend union Feed = Photo | Video 2 | -------------------------------------------------------------------------------- /vagga.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphql-rust/graphql-parser/HEAD/vagga.yaml --------------------------------------------------------------------------------