WIP - add extractor, generate snippet_data

This commit is contained in:
Stefan Fejes
2019-08-20 15:52:05 +02:00
parent 88084d3d30
commit cc8f1d8a7a
37396 changed files with 4588842 additions and 133 deletions

32
node_modules/graphql/error/formatError.js generated vendored Normal file
View File

@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.formatError = formatError;
var _invariant = _interopRequireDefault(require("../jsutils/invariant"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Given a GraphQLError, format it according to the rules described by the
* Response Format, Errors section of the GraphQL Specification.
*/
function formatError(error) {
!error ? (0, _invariant.default)(0, 'Received null or undefined error.') : void 0;
var message = error.message || 'An unknown error occurred.';
var locations = error.locations;
var path = error.path;
var extensions = error.extensions;
return extensions ? {
message: message,
locations: locations,
path: path,
extensions: extensions
} : {
message: message,
locations: locations,
path: path
};
}