-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1580 from aml-org/W-11574070
W-11574070: add matrix initial support & examples to graphql tck
- Loading branch information
Showing
11 changed files
with
789 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.federation.report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
ModelId: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql | ||
Profile: GraphQL | ||
Conforms: false | ||
Number of results: 5 | ||
|
||
Level: Violation | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#required-fields | ||
Message: field 'grid' required by interface 'Chess' can't be nullable because it's definition is non-nullable | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/shape/ChessBoard1 | ||
Property: http://a.ml/vocabularies/shapes#schema | ||
Range: [(10,4)-(10,19)] | ||
Location: | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#required-fields | ||
Message: field 'grid' required by interface 'Chess' can't be nullable because it's definition is non-nullable | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/shape/ChessBoard2 | ||
Property: http://a.ml/vocabularies/shapes#schema | ||
Range: [(14,4)-(14,18)] | ||
Location: | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#required-fields | ||
Message: field 'grid' required by interface 'Chess' can't be nullable because it's definition is non-nullable | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/shape/ChessBoard3 | ||
Property: http://a.ml/vocabularies/shapes#schema | ||
Range: [(18,4)-(18,17)] | ||
Location: | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#invalid-extension-argument-type | ||
Message: Missing required argument matrix | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/shape/ChessBoard4/property/property/grid/customDomainProperties/matrixDirective | ||
Property: http://a.ml/vocabularies/document#definedBy | ||
Range: [(22,21)-(22,83)] | ||
Location: | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#invalid-input-type | ||
Message: Field 'matrix' must be an input type, 'a list of a list of String' it's not | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/matrixDirective/shape/default-node | ||
Property: http://www.w3.org/ns/shacl#property | ||
Range: [(25,27)-(25,45)] | ||
Location: |
25 changes: 25 additions & 0 deletions
25
amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
type Query { | ||
name: String | ||
} | ||
|
||
interface Chess { | ||
grid: [[Int!]!]! | ||
} | ||
|
||
type ChessBoard1 implements Chess { | ||
grid: [[Int!]!] | ||
} | ||
|
||
type ChessBoard2 implements Chess { | ||
grid: [[Int!]] | ||
} | ||
|
||
type ChessBoard3 implements Chess { | ||
grid: [[Int]] | ||
} | ||
|
||
type ChessBoard4 implements Chess { | ||
grid: [[Int!]!]! @matrixDirective(matrix: [["this"],["is"], ["a"], ["string"]]) | ||
} | ||
|
||
directive @matrixDirective(matrix: [[String]]) on FIELD_DEFINITION |
46 changes: 46 additions & 0 deletions
46
amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
ModelId: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql | ||
Profile: GraphQL | ||
Conforms: false | ||
Number of results: 5 | ||
|
||
Level: Violation | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#required-fields | ||
Message: field 'grid' required by interface 'Chess' can't be nullable because it's definition is non-nullable | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/shape/ChessBoard1 | ||
Property: http://a.ml/vocabularies/shapes#schema | ||
Range: [(10,4)-(10,19)] | ||
Location: | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#required-fields | ||
Message: field 'grid' required by interface 'Chess' can't be nullable because it's definition is non-nullable | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/shape/ChessBoard2 | ||
Property: http://a.ml/vocabularies/shapes#schema | ||
Range: [(14,4)-(14,18)] | ||
Location: | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#required-fields | ||
Message: field 'grid' required by interface 'Chess' can't be nullable because it's definition is non-nullable | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/shape/ChessBoard3 | ||
Property: http://a.ml/vocabularies/shapes#schema | ||
Range: [(18,4)-(18,17)] | ||
Location: | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#invalid-extension-argument-type | ||
Message: Missing required argument matrix | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/shape/ChessBoard4/property/property/grid/customDomainProperties/matrixDirective | ||
Property: http://a.ml/vocabularies/document#definedBy | ||
Range: [(22,21)-(22,83)] | ||
Location: | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#invalid-input-type | ||
Message: Field 'matrix' must be an input type, 'a list of a list of String' it's not | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/graphql/tck/apis/invalid/missing-matrix-field.graphql#/declares/matrixDirective/shape/default-node | ||
Property: http://www.w3.org/ns/shacl#property | ||
Range: [(25,27)-(25,45)] | ||
Location: |
11 changes: 9 additions & 2 deletions
11
amf-cli/shared/src/test/resources/graphql/tck/apis/valid/types-matrix.api.dumped.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
type Query { | ||
name: String | ||
} | ||
type ChessBoard { | ||
grid : [[Int!]!]! | ||
|
||
type ChessBoard implements Chess { | ||
grid: [[Int!]!]! @matrixDirective | ||
} | ||
|
||
interface Chess { | ||
grid: [[Int!]!]! | ||
} | ||
|
||
directive @matrixDirective(matrix: [[String]]) on FIELD_DEFINITION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.