-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parse and write the default values in the input value definition (#…
…53) * add test * fix parse and write the default value in arg definitions * add test * fix handling default value in input object * rename Arg.TypeExt -> Arg.DefaultValue * fix handling multiple default values in argument definitions * add test * fix handling multiple default values in input object * printing directives in order by name * clean up
- Loading branch information
Showing
8 changed files
with
185 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
type Query { | ||
test1(X: Int = 20): Int | ||
test2(X: Int! = 20): Int | ||
test3(X: User = ADMIN): Int | ||
test4(X: String! = "user"): Int | ||
test5(X: String = "user" @deprecated): Int | ||
test6(X: String = "user" @deprecated, Y: String! = "operator" @unique): Int | ||
test7(X: [Int] = [20]): Int | ||
test8(X: [Int] = [20, 30]): Int | ||
test9(X: [User!]! = [ADMIN]): Int | ||
test10(X: [String!] = ["user"]): Int | ||
test11(X: [String] = ["user", "user1"] @deprecated): Int | ||
test12(X: [String] = ["user", "user1"] @deprecated, Y: String! = "operator" @unique): Int | ||
} | ||
|
||
|
||
|
||
|
||
input User { | ||
name: String! = "woonki" | ||
nicknames: [String!]! = ["mununki", "arnold"] | ||
} |
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,19 @@ | ||
type Query { | ||
test1(X: Int = 20): Int | ||
test2(X: Int! = 20): Int | ||
test3(X: User = ADMIN): Int | ||
test4(X: String! = "user"): Int | ||
test5(X: String = "user" @deprecated): Int | ||
test6(X: String = "user" @deprecated, Y: String! = "operator" @unique): Int | ||
test7(X: [Int] = [20]): Int | ||
test8(X: [Int] = [20, 30]): Int | ||
test9(X: [User!]! = [ADMIN]): Int | ||
test10(X: [String!] = ["user"]): Int | ||
test11(X: [String] = ["user", "user1"] @deprecated): Int | ||
test12(X: [String] = ["user", "user1"] @deprecated, Y: String! = "operator" @unique): Int | ||
} | ||
|
||
input User { | ||
name: String! = "woonki" | ||
nicknames: [String!]! = ["mununki", "arnold"] | ||
} |
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