From f79df58461319ad0bf4eb71639a9e5ade6e4d18a Mon Sep 17 00:00:00 2001 From: Struan Judd Date: Tue, 26 Dec 2023 14:47:38 +1300 Subject: [PATCH] Improved Sample tests --- .../Sample/Schema/Intro_Category.graphql+ | 7 +- .../Sample/Schema/Intro_Complete.graphql+ | 155 +-- .../Sample/Schema/Intro_Directive.graphql+ | 5 + .../Sample/Schema/Intro_Object.graphql+ | 3 +- .../Sample/Schema/Intro_Schema.graphql+ | 8 +- .../Sample/Schema/Intro_Setting.graphql+ | 4 + .../SampleTests.cs | 3 +- .../ParseSchema/Intro_Category.verified.txt | 34 +- .../ParseSchema/Intro_Complete.verified.txt | 955 +++++++++--------- .../ParseSchema/Intro_Directive.verified.txt | 39 +- .../ParseSchema/Intro_Object.verified.txt | 12 +- .../ParseSchema/Intro_Schema.verified.txt | 90 +- .../ParseSchema/Intro_Setting.verified.txt | 16 + .../VerifySchema/Intro_Category.verified.txt | 4 +- .../VerifySchema/Intro_Directive.verified.txt | 5 +- .../VerifySchema/Intro_Object.verified.txt | 5 +- .../VerifySchema/Intro_Schema.verified.txt | 11 +- .../VerifySchema/Intro_Setting.verified.txt | 4 + 18 files changed, 742 insertions(+), 618 deletions(-) create mode 100644 test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Setting.graphql+ create mode 100644 test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Setting.verified.txt create mode 100644 test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Setting.verified.txt diff --git a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Category.graphql+ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Category.graphql+ index 39e0a15c..db66ea7d 100644 --- a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Category.graphql+ +++ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Category.graphql+ @@ -1,7 +1,12 @@ +output _Categories { + | _Category + | _Type +} + output _Category { : _Aliased resolution: _Resolution - type: _Type[String] + output: String } enum _Resolution { Parallel Sequential Single } diff --git a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Complete.graphql+ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Complete.graphql+ index 97eb7984..d723d77a 100644 --- a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Complete.graphql+ +++ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Complete.graphql+ @@ -1,7 +1,9 @@ output _Schema { - category(_CategoryFilter): _Category[String] - directive(_Filter): _Directive[String] - type(_TypeFilter): _Type[String] + : _Named + categories(_CategoryFilter): _Categories[String] + directives(_Filter): _Directives[String] + types(_TypeFilter): _Type[String] + settings(_Filter): _Setting[String] } input _Filter { @@ -29,13 +31,23 @@ output _Named { name: String description: String? } +output _Categories { + | _Category + | _Type +} + output _Category { : _Aliased resolution: _Resolution - type: _Type[String] + output: String } enum _Resolution { Parallel Sequential Single } +output _Directives { + | _Directive + | _Type +} + output _Directive { : _Aliased parameters: _Parameter[] @@ -45,6 +57,10 @@ output _Directive { enum _Location { Operation Variable Field Inline Spread Fragment } +output _Setting { + : _Named + value: _Constant +} output _Type { | _BaseType<_TypeKind.Basic> | _BaseType<_TypeKind.Internal> @@ -66,41 +82,6 @@ output _TypeSimple { | _BaseType<_TypeKind.Scalar> | _BaseType<_TypeKind.Enum> } -output _TypeEnum { - : _BaseType<_TypeKind.Enum> - base: String? - values: _Aliased[] - } -output _TypeObject<$kind $base $field> { - : _BaseType<$kind> - typeParameters: _Named[] - base: $base? - fields: $field[] - alternates: _Alternate<$base>[] - } - -output _Ref<$base> { - | _BaseType<_TypeKind.Internal> - | _TypeSimple - | $base - } - -output _Alternate<$base> { - type: _Ref<$base> - modifiers: _Modifier[] - } - -output _Field<$base> { - : _Aliased - type: _Ref<$base> - modifiers: _Modifier[] - } - -output _Parameter { - : _Ref<_InputBase> - modifiers: _Modifier[] - default: _Constant? - } output _Constant { enum: _BaseType<_TypeKind.Enum> value: String @@ -134,38 +115,10 @@ output _ModifierDictionary { : _BaseModifier<_ModifierKind.Dictionary> by: _TypeSimple } -output _InputBase { - input: String - arguments: _Ref<_InputBase>[] - | "TypeParameter" String - } - -output _InputField { - : _Field<_InputBase> - default: _Constant? - } -output _OutputBase { - output: String - arguments: _OutputArgument[] - | "TypeParameter" String - } - -output _OutputField { - : _Field<_OutputBase> - parameter: _Parameter[] - | _OutputEnum - } - -output _OutputArgument { - : _BaseType<_TypeKind.Enum> - value: String - | _Ref<_OutputBase> - } - -output _OutputEnum { +output _TypeEnum { : _BaseType<_TypeKind.Enum> - field: String - value: String + base: String? + values: _Aliased[] } enum _Scalar { Number String Union } @@ -206,3 +159,65 @@ output _ScalarUnion { : _BaseScalar<_Scalar.Union> references: _TypeSimple[] } +output _TypeObject<$kind $base $field> { + : _BaseType<$kind> + typeParameters: _Named[] + base: $base? + fields: $field[] + alternates: _Alternate<$base>[] + } + +output _Ref<$base> { + | _BaseType<_TypeKind.Internal> + | _TypeSimple + | $base + } + +output _Alternate<$base> { + type: _Ref<$base> + modifiers: _Modifier[] + } + +output _Field<$base> { + : _Aliased + type: _Ref<$base> + modifiers: _Modifier[] + } + +output _Parameter { + : _Alternate<_InputBase> + default: _Constant? + } +output _InputBase { + input: String + arguments: _Ref<_InputBase>[] + | "TypeParameter" String + } + +output _InputField { + : _Field<_InputBase> + default: _Constant? + } +output _OutputBase { + output: String + arguments: _OutputArgument[] + | "TypeParameter" String + } + +output _OutputField { + : _Field<_OutputBase> + parameter: _Parameter[] + | _OutputEnum + } + +output _OutputArgument { + : _BaseType<_TypeKind.Enum> + value: String + | _Ref<_OutputBase> + } + +output _OutputEnum { + : _BaseType<_TypeKind.Enum> + field: String + value: String + } diff --git a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Directive.graphql+ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Directive.graphql+ index ffa321f5..3e90c02f 100644 --- a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Directive.graphql+ +++ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Directive.graphql+ @@ -1,3 +1,8 @@ +output _Directives { + | _Directive + | _Type +} + output _Directive { : _Aliased parameters: _Parameter[] diff --git a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Object.graphql+ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Object.graphql+ index 15f36e5c..dfe1734d 100644 --- a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Object.graphql+ +++ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Object.graphql+ @@ -24,7 +24,6 @@ output _Field<$base> { } output _Parameter { - : _Ref<_InputBase> - modifiers: _Modifier[] + : _Alternate<_InputBase> default: _Constant? } diff --git a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Schema.graphql+ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Schema.graphql+ index 39fe20b4..ab32661d 100644 --- a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Schema.graphql+ +++ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Schema.graphql+ @@ -1,7 +1,9 @@ output _Schema { - category(_CategoryFilter): _Category[String] - directive(_Filter): _Directive[String] - type(_TypeFilter): _Type[String] + : _Named + categories(_CategoryFilter): _Categories[String] + directives(_Filter): _Directives[String] + types(_TypeFilter): _Type[String] + settings(_Filter): _Setting[String] } input _Filter { diff --git a/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Setting.graphql+ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Setting.graphql+ new file mode 100644 index 00000000..dd6ebad5 --- /dev/null +++ b/test/GqlPlus.Verifier.ComponentTests/Sample/Schema/Intro_Setting.graphql+ @@ -0,0 +1,4 @@ +output _Setting { + : _Named + value: _Constant +} diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests.cs b/test/GqlPlus.Verifier.ComponentTests/SampleTests.cs index 88181fb8..9b9b67c0 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests.cs +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests.cs @@ -96,10 +96,11 @@ public SampleSchemaData() Add("Intro_Schema"); Add("Intro_Category"); Add("Intro_Directive"); + Add("Intro_Setting"); Add("Intro_Types"); + Add("Intro_Common"); Add("Intro_Enum"); Add("Intro_Object"); - Add("Intro_Common"); Add("Intro_Input"); Add("Intro_Output"); Add("Intro_Scalar"); diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Category.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Category.verified.txt index 6c621391..d72ce5dd 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Category.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Category.verified.txt @@ -2,31 +2,41 @@ Success { !O I@8/1 + _Categories + | + !AO + I@7/2 + _Category + !AO + I@7/3 + _Type +} +{ + !O I@8/6 _Category : - I@7/2 + I@7/7 _Aliased { - !OF I@9/3 + !OF I@9/8 resolution : - I@21/3 + I@21/8 _Resolution - !OF I@9/4 - type + !OF I@9/9 + output : - I@15/4 - _Type - [String] + I@17/9 + String } } { - !E I@6/7 + !E I@6/12 _Resolution - !EV I@20/7 + !EV I@20/12 Parallel - !EV I@29/7 + !EV I@29/12 Sequential - !EV I@40/7 + !EV I@40/12 Single } \ No newline at end of file diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Complete.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Complete.verified.txt index b16d7389..7942e2f5 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Complete.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Complete.verified.txt @@ -3,878 +3,921 @@ Success { !O I@8/1 _Schema + : + I@7/2 + _Named { - !OF I@9/2 - category + !OF I@9/3 + categories ( !P - I@18/2 + I@20/3 _CategoryFilter ) : - I@36/2 - _Category + I@38/3 + _Categories [String] - !OF I@9/3 - directive + !OF I@9/4 + directives ( !P - I@19/3 + I@20/4 _Filter ) : - I@29/3 - _Directive + I@30/4 + _Directives [String] - !OF I@9/4 - type + !OF I@9/5 + types ( !P - I@14/4 + I@15/5 _TypeFilter ) : - I@28/4 + I@29/5 _Type [String] + !OF I@9/6 + settings + ( + !P + I@18/6 + _Filter + ) + : + I@28/6 + _Setting + [String] } } { - !I I@7/7 + !I I@7/9 _Filter { - !IF I@9/8 + !IF I@9/10 names : - I@16/8 + I@16/10 String [] - !IF I@9/9 + !IF I@9/11 includeReferencedTypes : - I@33/9 + I@33/11 Boolean - =( !k I@43/9 Boolean.false ) + =( !k I@43/11 Boolean.false ) } | !AI - I@15/10 + I@15/12 String [] ? } { - !I I@7/13 + !I I@7/15 _CategoryFilter : - I@7/14 + I@7/16 _Filter { - !IF I@9/15 + !IF I@9/17 resolutions : - I@22/15 + I@22/17 _Resolution [] } } { - !I I@7/18 + !I I@7/20 _TypeFilter : - I@7/19 + I@7/21 _Filter { - !IF I@9/20 + !IF I@9/22 kinds : - I@16/20 + I@16/22 _TypeKind [] } } { - !O I@8/23 + !O I@8/25 _Aliased : - I@7/24 + I@7/26 _Named { - !OF I@9/25 + !OF I@9/27 aliases : - I@18/25 + I@18/27 String [] } } { - !O I@8/28 + !O I@8/30 _Named { - !OF I@9/29 + !OF I@9/31 name : - I@15/29 + I@15/31 String - !OF I@9/30 + !OF I@9/32 description : - I@22/30 + I@22/32 String ? } } { - !O I@8/32 + !O I@8/34 + _Categories + | + !AO + I@7/35 + _Category + !AO + I@7/36 + _Type +} +{ + !O I@8/39 _Category : - I@7/33 + I@7/40 _Aliased { - !OF I@9/34 + !OF I@9/41 resolution : - I@21/34 + I@21/41 _Resolution - !OF I@9/35 - type + !OF I@9/42 + output : - I@15/35 - _Type - [String] + I@17/42 + String } } { - !E I@6/38 + !E I@6/45 _Resolution - !EV I@20/38 + !EV I@20/45 Parallel - !EV I@29/38 + !EV I@29/45 Sequential - !EV I@40/38 + !EV I@40/45 Single } { - !O I@8/39 + !O I@8/46 + _Directives + | + !AO + I@7/47 + _Directive + !AO + I@7/48 + _Type +} +{ + !O I@8/51 _Directive : - I@7/40 + I@7/52 _Aliased { - !OF I@9/41 + !OF I@9/53 parameters : - I@21/41 + I@21/53 _Parameter [] - !OF I@9/42 + !OF I@9/54 repeatable : - I@21/42 + I@21/54 Boolean - !OF I@9/43 + !OF I@9/55 locations : - I@20/43 + I@20/55 _ [_Location] } } { - !E I@6/46 + !E I@6/58 _Location - !EV I@18/46 + !EV I@18/58 Operation - !EV I@28/46 + !EV I@28/58 Variable - !EV I@37/46 + !EV I@37/58 Field - !EV I@43/46 + !EV I@43/58 Inline - !EV I@50/46 + !EV I@50/58 Spread - !EV I@57/46 + !EV I@57/58 Fragment } { - !O I@8/48 + !O I@8/60 + _Setting + : + I@7/61 + _Named + { + !OF I@9/62 + value + : + I@16/62 + _Constant + } +} +{ + !O I@8/64 _Type | !AO - I@7/49 + I@7/65 _BaseType < - I@17/49 + I@17/65 _TypeKind.Basic > !AO - I@7/50 + I@7/66 _BaseType < - I@17/50 + I@17/66 _TypeKind.Internal > !AO - I@7/51 + I@7/67 _TypeEnum !AO - I@7/52 + I@7/68 _TypeObject < - I@19/52 + I@19/68 _TypeKind.Input - I@35/52 + I@35/68 _InputBase - I@46/52 + I@46/68 _InputField > !AO - I@7/53 + I@7/69 _TypeObject < - I@19/53 + I@19/69 _TypeKind.Output - I@36/53 + I@36/69 _OutputBase - I@48/53 + I@48/69 _OutputField > !AO - I@7/54 + I@7/70 _TypeScalar } { - !O I@8/57 + !O I@8/73 _BaseType < - I@19/57 + I@19/73 $kind > : - I@7/58 + I@7/74 _Aliased { - !OF I@9/59 + !OF I@9/75 kind : - I@16/59 + I@16/75 $kind } } { - !E I@6/62 + !E I@6/78 _TypeKind - !EV I@18/62 + !EV I@18/78 Basic - !EV I@24/62 + !EV I@24/78 Enum - !EV I@29/62 + !EV I@29/78 Internal - !EV I@38/62 + !EV I@38/78 Input - !EV I@44/62 + !EV I@44/78 Output - !EV I@51/62 + !EV I@51/78 Scalar } { - !O I@8/64 + !O I@8/80 _TypeSimple | !AO - I@7/65 + I@7/81 _BaseType < - I@17/65 + I@17/81 _TypeKind.Basic > !AO - I@7/66 + I@7/82 _BaseType < - I@17/66 + I@17/82 _TypeKind.Scalar > !AO - I@7/67 + I@7/83 _BaseType < - I@17/67 + I@17/83 _TypeKind.Enum > } { - !O I@8/69 + !O I@8/85 + _Constant + { + !OF I@9/86 + enum + : + I@15/86 + _BaseType + < + I@25/86 + _TypeKind.Enum + > + !OF I@9/87 + value + : + I@16/87 + String + } + | + !AO + I@7/88 + Internal + !AO + I@7/89 + Simple + !AO + I@7/90 + _ConstantList + !AO + I@7/91 + _ConstantMap +} +{ + !O I@8/94 + _ConstantList + | + !AO + I@7/95 + _Constant + [] +} +{ + !O I@8/98 + _ConstantMap + | + !AO + I@7/99 + _Constant + [Simple] +} +{ + !O I@8/102 + _Modifier + | + !AO + I@7/103 + _BaseModifier + < + I@21/103 + _ModifierKind.Optional + > + !AO + I@7/104 + _BaseModifier + < + I@21/104 + _ModifierKind.List + > + !AO + I@7/105 + _ModifierDictionary +} +{ + !E I@6/108 + _ModifierKind + !EV I@22/108 + Optional + !EV I@31/108 + List + !EV I@36/108 + Dictionary +} +{ + !O I@8/110 + _BaseModifier + < + I@23/110 + $kind + > + { + !OF I@9/111 + kind + : + I@16/111 + $kind + } +} +{ + !O I@8/114 + _ModifierDictionary + : + I@7/115 + _BaseModifier + < + I@21/115 + _ModifierKind.Dictionary + > + { + !OF I@9/116 + by + : + I@13/116 + _TypeSimple + } +} +{ + !O I@8/118 _TypeEnum : - I@7/70 + I@7/119 _BaseType < - I@17/70 + I@17/119 _TypeKind.Enum > { - !OF I@9/71 + !OF I@9/120 base : - I@15/71 + I@15/120 String ? - !OF I@9/72 + !OF I@9/121 values : - I@17/72 + I@17/121 _Aliased [] } } { - !O I@8/74 + !E I@6/123 + _Scalar + !EV I@16/123 + Number + !EV I@23/123 + String + !EV I@30/123 + Union +} +{ + !O I@8/125 + _TypeScalar + | + !AO + I@7/126 + _ScalarNumber + !AO + I@7/127 + _ScalarString + !AO + I@7/128 + _ScalarUnion +} +{ + !O I@8/131 + _BaseScalar + < + I@21/131 + $base + > + : + I@7/132 + _BaseType + < + I@17/132 + _TypeKind.Scalar + > + { + !OF I@9/133 + base + : + I@16/133 + $base + } +} +{ + !O I@8/136 + _ScalarNumber + : + I@7/137 + _BaseScalar + < + I@19/137 + _Scalar.Number + > + { + !OF I@9/138 + ranges + : + I@17/138 + _ScalarRange + [] + } +} +{ + !O I@8/141 + _ScalarRange + { + !OF I@9/142 + from + : + I@15/142 + Number + ? + !OF I@9/143 + fromInclusive + : + I@24/143 + Boolean + !OF I@9/144 + to + : + I@13/144 + Number + ? + !OF I@9/145 + toInclusive + : + I@22/145 + Boolean + } +} +{ + !O I@8/148 + _ScalarString + : + I@7/149 + _BaseScalar + < + I@19/149 + _Scalar.String + > + { + !OF I@9/150 + regexes + : + I@18/150 + _ScalarRegex + [] + } +} +{ + !O I@8/153 + _ScalarRegex + { + !OF I@9/154 + regex + : + I@16/154 + String + !OF I@9/155 + exclude + : + I@18/155 + Boolean + } +} +{ + !O I@8/158 + _ScalarUnion + : + I@7/159 + _BaseScalar + < + I@19/159 + _Scalar.Union + > + { + !OF I@9/160 + references + : + I@21/160 + _TypeSimple + [] + } +} +{ + !O I@8/162 _TypeObject < - I@21/74 + I@21/162 $kind - I@27/74 + I@27/162 $base - I@33/74 + I@33/162 $field > : - I@7/75 + I@7/163 _BaseType < - I@18/75 + I@18/163 $kind > { - !OF I@9/76 + !OF I@9/164 typeParameters : - I@25/76 + I@25/164 _Named [] - !OF I@9/77 + !OF I@9/165 base : - I@16/77 + I@16/165 $base ? - !OF I@9/78 + !OF I@9/166 fields : - I@18/78 + I@18/166 $field [] - !OF I@9/79 + !OF I@9/167 alternates : - I@21/79 + I@21/167 _Alternate < - I@33/79 + I@33/167 $base > [] } } { - !O I@8/82 + !O I@8/170 _Ref < - I@14/82 + I@14/170 $base > | !AO - I@7/83 + I@7/171 _BaseType < - I@17/83 + I@17/171 _TypeKind.Internal > !AO - I@7/84 + I@7/172 _TypeSimple !AO - I@8/85 + I@8/173 $base } { - !O I@8/88 + !O I@8/176 _Alternate < - I@20/88 + I@20/176 $base > { - !OF I@7/89 + !OF I@7/177 type : - I@13/89 + I@13/177 _Ref < - I@19/89 + I@19/177 $base > - !OF I@7/90 + !OF I@7/178 modifiers : - I@18/90 + I@18/178 _Modifier [] } } { - !O I@8/93 + !O I@8/181 _Field < - I@16/93 + I@16/181 $base > : - I@7/94 + I@7/182 _Aliased { - !OF I@7/95 + !OF I@7/183 type : - I@13/95 + I@13/183 _Ref < - I@19/95 + I@19/183 $base > - !OF I@7/96 + !OF I@7/184 modifiers : - I@18/96 + I@18/184 _Modifier [] } } { - !O I@8/99 + !O I@8/187 _Parameter : - I@7/100 - _Ref + I@7/188 + _Alternate < - I@12/100 + I@18/188 _InputBase > { - !OF I@9/101 - modifiers - : - I@20/101 - _Modifier - [] - !OF I@9/102 + !OF I@9/189 default : - I@18/102 + I@18/189 _Constant ? } } { - !O I@8/104 - _Constant - { - !OF I@9/105 - enum - : - I@15/105 - _BaseType - < - I@25/105 - _TypeKind.Enum - > - !OF I@9/106 - value - : - I@16/106 - String - } - | - !AO - I@7/107 - Internal - !AO - I@7/108 - Simple - !AO - I@7/109 - _ConstantList - !AO - I@7/110 - _ConstantMap -} -{ - !O I@8/113 - _ConstantList - | - !AO - I@7/114 - _Constant - [] -} -{ - !O I@8/117 - _ConstantMap - | - !AO - I@7/118 - _Constant - [Simple] -} -{ - !O I@8/121 - _Modifier - | - !AO - I@7/122 - _BaseModifier - < - I@21/122 - _ModifierKind.Optional - > - !AO - I@7/123 - _BaseModifier - < - I@21/123 - _ModifierKind.List - > - !AO - I@7/124 - _ModifierDictionary -} -{ - !E I@6/127 - _ModifierKind - !EV I@22/127 - Optional - !EV I@31/127 - List - !EV I@36/127 - Dictionary -} -{ - !O I@8/129 - _BaseModifier - < - I@23/129 - $kind - > - { - !OF I@9/130 - kind - : - I@16/130 - $kind - } -} -{ - !O I@8/133 - _ModifierDictionary - : - I@7/134 - _BaseModifier - < - I@21/134 - _ModifierKind.Dictionary - > - { - !OF I@9/135 - by - : - I@13/135 - _TypeSimple - } -} -{ - !O I@8/137 + !O I@8/191 _InputBase { - !OF I@9/138 + !OF I@9/192 input : - I@16/138 + I@16/192 String - !OF I@9/139 + !OF I@9/193 arguments : - I@20/139 + I@20/193 _Ref < - I@25/139 + I@25/193 _InputBase > [] } | !AO - I@23/140 + I@23/194 String } { - !O I@8/143 + !O I@8/197 _InputField : - I@7/144 + I@7/198 _Field < - I@14/144 + I@14/198 _InputBase > { - !OF I@9/145 + !OF I@9/199 default : - I@18/145 + I@18/199 _Constant ? } } { - !O I@8/147 + !O I@8/201 _OutputBase { - !OF I@9/148 + !OF I@9/202 output : - I@17/148 + I@17/202 String - !OF I@9/149 + !OF I@9/203 arguments : - I@20/149 + I@20/203 _OutputArgument [] } | !AO - I@23/150 + I@23/204 String } { - !O I@8/153 + !O I@8/207 _OutputField : - I@7/154 + I@7/208 _Field < - I@14/154 + I@14/208 _OutputBase > { - !OF I@9/155 + !OF I@9/209 parameter : - I@20/155 + I@20/209 _Parameter [] } | !AO - I@7/156 + I@7/210 _OutputEnum } { - !O I@8/159 + !O I@8/213 _OutputArgument : - I@7/160 + I@7/214 _BaseType < - I@17/160 + I@17/214 _TypeKind.Enum > { - !OF I@9/161 + !OF I@9/215 value : - I@16/161 + I@16/215 String } | !AO - I@7/162 + I@7/216 _Ref < - I@12/162 + I@12/216 _OutputBase > } { - !O I@8/165 + !O I@8/219 _OutputEnum : - I@7/166 + I@7/220 _BaseType < - I@17/166 + I@17/220 _TypeKind.Enum > { - !OF I@9/167 + !OF I@9/221 field : - I@16/167 + I@16/221 String - !OF I@9/168 + !OF I@9/222 value : - I@16/168 - String - } -} -{ - !E I@6/170 - _Scalar - !EV I@16/170 - Number - !EV I@23/170 - String - !EV I@30/170 - Union -} -{ - !O I@8/172 - _TypeScalar - | - !AO - I@7/173 - _ScalarNumber - !AO - I@7/174 - _ScalarString - !AO - I@7/175 - _ScalarUnion -} -{ - !O I@8/178 - _BaseScalar - < - I@21/178 - $base - > - : - I@7/179 - _BaseType - < - I@17/179 - _TypeKind.Scalar - > - { - !OF I@9/180 - base - : - I@16/180 - $base - } -} -{ - !O I@8/183 - _ScalarNumber - : - I@7/184 - _BaseScalar - < - I@19/184 - _Scalar.Number - > - { - !OF I@9/185 - ranges - : - I@17/185 - _ScalarRange - [] - } -} -{ - !O I@8/188 - _ScalarRange - { - !OF I@9/189 - from - : - I@15/189 - Number - ? - !OF I@9/190 - fromInclusive - : - I@24/190 - Boolean - !OF I@9/191 - to - : - I@13/191 - Number - ? - !OF I@9/192 - toInclusive - : - I@22/192 - Boolean - } -} -{ - !O I@8/195 - _ScalarString - : - I@7/196 - _BaseScalar - < - I@19/196 - _Scalar.String - > - { - !OF I@9/197 - regexes - : - I@18/197 - _ScalarRegex - [] - } -} -{ - !O I@8/200 - _ScalarRegex - { - !OF I@9/201 - regex - : - I@16/201 + I@16/222 String - !OF I@9/202 - exclude - : - I@18/202 - Boolean - } -} -{ - !O I@8/205 - _ScalarUnion - : - I@7/206 - _BaseScalar - < - I@19/206 - _Scalar.Union - > - { - !OF I@9/207 - references - : - I@21/207 - _TypeSimple - [] } } \ No newline at end of file diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Directive.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Directive.verified.txt index 7de637f7..2042ec61 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Directive.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Directive.verified.txt @@ -2,43 +2,54 @@ Success { !O I@8/1 + _Directives + | + !AO + I@7/2 + _Directive + !AO + I@7/3 + _Type +} +{ + !O I@8/6 _Directive : - I@7/2 + I@7/7 _Aliased { - !OF I@9/3 + !OF I@9/8 parameters : - I@21/3 + I@21/8 _Parameter [] - !OF I@9/4 + !OF I@9/9 repeatable : - I@21/4 + I@21/9 Boolean - !OF I@9/5 + !OF I@9/10 locations : - I@20/5 + I@20/10 _ [_Location] } } { - !E I@6/8 + !E I@6/13 _Location - !EV I@18/8 + !EV I@18/13 Operation - !EV I@28/8 + !EV I@28/13 Variable - !EV I@37/8 + !EV I@37/13 Field - !EV I@43/8 + !EV I@43/13 Inline - !EV I@50/8 + !EV I@50/13 Spread - !EV I@57/8 + !EV I@57/13 Fragment } \ No newline at end of file diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Object.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Object.verified.txt index e894bc5f..fa5835d8 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Object.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Object.verified.txt @@ -129,22 +129,16 @@ Success _Parameter : I@7/27 - _Ref + _Alternate < - I@12/27 + I@18/27 _InputBase > { !OF I@9/28 - modifiers - : - I@20/28 - _Modifier - [] - !OF I@9/29 default : - I@18/29 + I@18/28 _Constant ? } diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Schema.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Schema.verified.txt index e0a30ed6..b9e6adbb 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Schema.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Schema.verified.txt @@ -3,124 +3,138 @@ Success { !O I@8/1 _Schema + : + I@7/2 + _Named { - !OF I@9/2 - category + !OF I@9/3 + categories ( !P - I@18/2 + I@20/3 _CategoryFilter ) : - I@36/2 - _Category + I@38/3 + _Categories [String] - !OF I@9/3 - directive + !OF I@9/4 + directives ( !P - I@19/3 + I@20/4 _Filter ) : - I@29/3 - _Directive + I@30/4 + _Directives [String] - !OF I@9/4 - type + !OF I@9/5 + types ( !P - I@14/4 + I@15/5 _TypeFilter ) : - I@28/4 + I@29/5 _Type [String] + !OF I@9/6 + settings + ( + !P + I@18/6 + _Filter + ) + : + I@28/6 + _Setting + [String] } } { - !I I@7/7 + !I I@7/9 _Filter { - !IF I@9/8 + !IF I@9/10 names : - I@16/8 + I@16/10 String [] - !IF I@9/9 + !IF I@9/11 includeReferencedTypes : - I@33/9 + I@33/11 Boolean - =( !k I@43/9 Boolean.false ) + =( !k I@43/11 Boolean.false ) } | !AI - I@15/10 + I@15/12 String [] ? } { - !I I@7/13 + !I I@7/15 _CategoryFilter : - I@7/14 + I@7/16 _Filter { - !IF I@9/15 + !IF I@9/17 resolutions : - I@22/15 + I@22/17 _Resolution [] } } { - !I I@7/18 + !I I@7/20 _TypeFilter : - I@7/19 + I@7/21 _Filter { - !IF I@9/20 + !IF I@9/22 kinds : - I@16/20 + I@16/22 _TypeKind [] } } { - !O I@8/23 + !O I@8/25 _Aliased : - I@7/24 + I@7/26 _Named { - !OF I@9/25 + !OF I@9/27 aliases : - I@18/25 + I@18/27 String [] } } { - !O I@8/28 + !O I@8/30 _Named { - !OF I@9/29 + !OF I@9/31 name : - I@15/29 + I@15/31 String - !OF I@9/30 + !OF I@9/32 description : - I@22/30 + I@22/32 String ? } diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Setting.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Setting.verified.txt new file mode 100644 index 00000000..b423beaa --- /dev/null +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/ParseSchema/Intro_Setting.verified.txt @@ -0,0 +1,16 @@ +!G I@1/1 +Success +{ + !O I@8/1 + _Setting + : + I@7/2 + _Named + { + !OF I@9/3 + value + : + I@16/3 + _Constant + } +} \ No newline at end of file diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Category.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Category.verified.txt index 14ff4985..7d8d0225 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Category.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Category.verified.txt @@ -1,4 +1,4 @@ [ - !!! I@7/2 : Invalid Output. '_Aliased' not defined. - '_Aliased' !!!, - !!! I@15/4 : Invalid Output. '_Type' not defined. - '_Type' !!! + !!! I@7/3 : Invalid Output. '_Type' not defined. - '_Type' !!!, + !!! I@7/7 : Invalid Output. '_Aliased' not defined. - '_Aliased' !!! ] \ No newline at end of file diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Directive.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Directive.verified.txt index eeef4387..dc8c4831 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Directive.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Directive.verified.txt @@ -1,4 +1,5 @@ [ - !!! I@7/2 : Invalid Output. '_Aliased' not defined. - '_Aliased' !!!, - !!! I@21/3 : Invalid Output. '_Parameter' not defined. - '_Parameter' !!! + !!! I@7/3 : Invalid Output. '_Type' not defined. - '_Type' !!!, + !!! I@7/7 : Invalid Output. '_Aliased' not defined. - '_Aliased' !!!, + !!! I@21/8 : Invalid Output. '_Parameter' not defined. - '_Parameter' !!! ] \ No newline at end of file diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Object.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Object.verified.txt index 12780534..55657ad6 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Object.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Object.verified.txt @@ -7,7 +7,6 @@ !!! I@18/17 : Invalid Output. '_Modifier' not defined. - '_Modifier' !!!, !!! I@7/21 : Invalid Output. '_Aliased' not defined. - '_Aliased' !!!, !!! I@18/23 : Invalid Output. '_Modifier' not defined. - '_Modifier' !!!, - !!! I@12/27 : Invalid Output. '_InputBase' not defined. - '_InputBase' !!!, - !!! I@20/28 : Invalid Output. '_Modifier' not defined. - '_Modifier' !!!, - !!! I@18/29 : Invalid Output. '_Constant' not defined. - '_Constant' !!! + !!! I@18/27 : Invalid Output. '_InputBase' not defined. - '_InputBase' !!!, + !!! I@18/28 : Invalid Output. '_Constant' not defined. - '_Constant' !!! ] \ No newline at end of file diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Schema.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Schema.verified.txt index 3fc47c74..c7991be4 100644 --- a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Schema.verified.txt +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Schema.verified.txt @@ -1,7 +1,8 @@ [ - !!! I@22/15 : Invalid Input. '_Resolution' not defined. - '_Resolution' !!!, - !!! I@16/20 : Invalid Input. '_TypeKind' not defined. - '_TypeKind' !!!, - !!! I@36/2 : Invalid Output. '_Category' not defined. - '_Category' !!!, - !!! I@29/3 : Invalid Output. '_Directive' not defined. - '_Directive' !!!, - !!! I@28/4 : Invalid Output. '_Type' not defined. - '_Type' !!! + !!! I@22/17 : Invalid Input. '_Resolution' not defined. - '_Resolution' !!!, + !!! I@16/22 : Invalid Input. '_TypeKind' not defined. - '_TypeKind' !!!, + !!! I@38/3 : Invalid Output. '_Categories' not defined. - '_Categories' !!!, + !!! I@30/4 : Invalid Output. '_Directives' not defined. - '_Directives' !!!, + !!! I@29/5 : Invalid Output. '_Type' not defined. - '_Type' !!!, + !!! I@28/6 : Invalid Output. '_Setting' not defined. - '_Setting' !!! ] \ No newline at end of file diff --git a/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Setting.verified.txt b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Setting.verified.txt new file mode 100644 index 00000000..d9926435 --- /dev/null +++ b/test/GqlPlus.Verifier.ComponentTests/SampleTests/VerifySchema/Intro_Setting.verified.txt @@ -0,0 +1,4 @@ +[ + !!! I@7/2 : Invalid Output. '_Named' not defined. - '_Named' !!!, + !!! I@16/3 : Invalid Output. '_Constant' not defined. - '_Constant' !!! +] \ No newline at end of file