Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infer default values from parameters and when the DefaultValueAttribu…
…te is used
- Loading branch information
1 parent
cac9c3c
commit 5681273
Showing
11 changed files
with
169 additions
and
4 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
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
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
12 changes: 12 additions & 0 deletions
12
...s/__snapshots__/DirectiveTypeTests.Infer_Directive_Argument_Defaults_From_Properties.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,12 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query @foo(argument1: "abc") { | ||
foo: String | ||
} | ||
|
||
directive @foo(argument1: String = "abc" argument2: String) on OBJECT | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
16 changes: 16 additions & 0 deletions
16
...test/Types.Tests/Types/__snapshots__/InputObjectTypeTests.Input_Infer_Default_Values.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,16 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
abc(def: InputWithDefaultInput): String | ||
} | ||
|
||
input InputWithDefaultInput { | ||
withNullDefault: String | ||
withoutDefault: String | ||
withStringDefault: String = "abc" | ||
} | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
11 changes: 11 additions & 0 deletions
11
...e/test/Types.Tests/Types/__snapshots__/ObjectTypeTests.Infer_Argument_Default_Values.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,11 @@ | ||
schema { | ||
query: QueryWithArgumentDefaults | ||
} | ||
|
||
type QueryWithArgumentDefaults { | ||
field1(a: String b: String = "abc"): String | ||
field2(a: String b: String = "abc"): String | ||
} | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |