GraphQL: Implement input (#2311)

master
Christopher Chedeau 2017-06-27 19:27:02 -07:00 committed by GitHub
parent b63e1c2dd7
commit 8e31088761
3 changed files with 33 additions and 0 deletions

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([
"...",

View File

@ -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

View File

@ -0,0 +1,4 @@
input Params {
app_id: ID!
key_hash: String!
}