-
-
Notifications
You must be signed in to change notification settings - Fork 748
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for inferrence of structs (#5752)
- Loading branch information
1 parent
98c245b
commit 967365a
Showing
4 changed files
with
143 additions
and
6 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
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
27 changes: 27 additions & 0 deletions
27
...sts/Configuration/__snapshots__/TypeDiscoveryTests.TypeDiscovery_Should_InferStructs.snap
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,27 @@ | ||
schema { | ||
query: QueryTypeWithStruct | ||
} | ||
|
||
type InferStruct { | ||
id: UUID! | ||
number: Int! | ||
} | ||
|
||
type QueryTypeWithStruct { | ||
struct: InferStruct! | ||
nullableStruct: InferStruct | ||
structArray: [InferStruct!] | ||
nullableStructArray: [InferStruct] | ||
structNestedArray: [[InferStruct!]] | ||
nullableStructNestedArray: [[InferStruct]] | ||
scalarGuid: UUID! | ||
scalarDateTime: DateTime! | ||
} | ||
|
||
"The `@specifiedBy` directive is used within the type system definition language to provide a URL for specifying the behavior of custom scalar definitions." | ||
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR | ||
|
||
"The `DateTime` scalar represents an ISO-8601 compliant date time type." | ||
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time") | ||
|
||
scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122") |