GraphQL: Implement scalar (#2313)
parent
0a2a099efe
commit
bbf8f76823
|
@ -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"), "!"]);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`scalar.graphql 1`] = `
|
||||
scalar Color @deprecated
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
scalar Color @deprecated
|
||||
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, { parser: "graphql" });
|
|
@ -0,0 +1 @@
|
|||
scalar Color @deprecated
|
Loading…
Reference in New Issue