GraphQL: Implement scalar (#2313)

master
Christopher Chedeau 2017-06-27 19:34:25 -07:00 committed by GitHub
parent 0a2a099efe
commit bbf8f76823
4 changed files with 18 additions and 0 deletions

View File

@ -365,6 +365,14 @@ function genericPrint(path, options, print) {
);
}
case "ScalarTypeDefinition": {
return concat([
"scalar ",
path.call(print, "name"),
printDirectives(path, print, n)
]);
}
case "NonNullType": {
return concat([path.call(print, "type"), "!"]);
}

View File

@ -0,0 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`scalar.graphql 1`] = `
scalar Color @deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scalar Color @deprecated
`;

View File

@ -0,0 +1 @@
run_spec(__dirname, { parser: "graphql" });

View File

@ -0,0 +1 @@
scalar Color @deprecated