Support graphql ListType (#2061)
parent
883e637fa9
commit
df26cc05cc
|
@ -250,6 +250,14 @@ function genericPrint(path, options, print) {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "ListType": {
|
||||||
|
return concat([
|
||||||
|
"[",
|
||||||
|
path.call(print, "type"),
|
||||||
|
"]"
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error("unknown graphql type: " + JSON.stringify(n.kind));
|
throw new Error("unknown graphql type: " + JSON.stringify(n.kind));
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,14 @@ $bar: String = "Long string here", $arg: String = "Hello world!",,,,,
|
||||||
$nonNull: String!) {
|
$nonNull: String!) {
|
||||||
hello
|
hello
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query lists($foo: [Int ], $bar: [Int!], $arg: [ Int! ]!) {
|
||||||
|
ok
|
||||||
|
}
|
||||||
|
|
||||||
|
query listslong($foo: [String ], $bar: [String!], $arg: [ Int! ]!, $veryLongName: [ Int! ]) {
|
||||||
|
ok
|
||||||
|
}
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
query short($foo: ComplexType, $site: Site = MOBILE, $nonNull: Int!) {
|
query short($foo: ComplexType, $site: Site = MOBILE, $nonNull: Int!) {
|
||||||
hello
|
hello
|
||||||
|
@ -24,4 +32,17 @@ query long(
|
||||||
) {
|
) {
|
||||||
hello
|
hello
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query lists($foo: [Int], $bar: [Int!], $arg: [Int!]!) {
|
||||||
|
ok
|
||||||
|
}
|
||||||
|
|
||||||
|
query listslong(
|
||||||
|
$foo: [String],
|
||||||
|
$bar: [String!],
|
||||||
|
$arg: [Int!]!,
|
||||||
|
$veryLongName: [Int!]
|
||||||
|
) {
|
||||||
|
ok
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -7,3 +7,11 @@ $bar: String = "Long string here", $arg: String = "Hello world!",,,,,
|
||||||
$nonNull: String!) {
|
$nonNull: String!) {
|
||||||
hello
|
hello
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query lists($foo: [Int ], $bar: [Int!], $arg: [ Int! ]!) {
|
||||||
|
ok
|
||||||
|
}
|
||||||
|
|
||||||
|
query listslong($foo: [String ], $bar: [String!], $arg: [ Int! ]!, $veryLongName: [ Int! ]) {
|
||||||
|
ok
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue