Reduce parser-graphql size (#10903)

This commit is contained in:
fisker Cheung authored and GitHub committed 2021-05-19 09:23:31 +08:00
1 parent 4d37ac46a3
commit 8f17187bf7
1 file changed
+2 -2
+2 -2
View File
@@ -43,7 +43,7 @@ const parseOptions = {
};
function createParseError(error) {
const { GraphQLError } = require("graphql/error");
const { GraphQLError } = require("graphql/error/GraphQLError");
if (error instanceof GraphQLError) {
const {
message,
@@ -58,7 +58,7 @@ function createParseError(error) {
function parse(text /*, parsers, opts*/) {
// Inline the require to avoid loading all the JS if we don't use it
const { parse } = require("graphql/language");
const { parse } = require("graphql/language/parser");
const { result: ast, error } = tryCombinations(
() => parse(text, { ...parseOptions }),
() =>