sample-proxies/graphql-sample/graphql-proxy/apiproxy/resources/jsc/graphql.jsc.js
/**
     * Given a GraphQLError, format it according to the rules described by the
     * Response Format, Errors section of the GraphQL Specification.
     */
Given a GraphQLError, format it according to the rules described by the
Response Format, Errors section of the GraphQL Specification.
Given a GraphQLError format it according to the rules described by the Response Format Errors section of the GraphQL Specification .
function formatError(error) {
      !error ? invariant(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
      };
    }
function formatError ( error ) { ! error ? invariant ( 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 } ; }
Given a GraphQLError, format it according to the rules described by the
 Response Format, Errors section of the GraphQL Specification.
Given a GraphQLError format it according to the rules described by the Response Format Errors section of the GraphQL Specification .