GraphQL: Implement scalar (#2313)
This commit is contained in:
1 parent
0a2a099efe
commit
bbf8f76823
4 files changed
+18
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user