GraphQL: Implement input (#2311)

This commit is contained in:
Christopher Chedeau authored and GitHub committed 2017-06-27 19:27:02 -07:00
1 parent b63e1c2dd7
commit 8e31088761
3 files changed
+33

No files matched your search

+16
View File
@@ -296,6 +296,22 @@ function genericPrint(path, options, print) {
]);
}
case "InputObjectTypeDefinition": {
return concat([
"input ",
path.call(print, "name"),
printDirectives(path, print, n),
" {",
n.fields.length > 0
? indent(
concat([hardline, join(hardline, path.map(print, "fields"))])
)
: "",
hardline,
"}"
]);
}
case "FragmentSpread": {
return concat([
"...",
@@ -20,6 +20,19 @@ type VRMConversation implements Node, Entity @foo {
`;
exports[`input.graphql 1`] = `
input Params {
app_id: ID!
key_hash: String!
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input Params {
app_id: ID!
key_hash: String!
}
`;
exports[`object_type_def.graphql 1`] = `
type FeedHomeStories {
debug_info: String
@@ -0,0 +1,4 @@
input Params {
app_id: ID!
key_hash: String!
}