code: function _simulateGraphqlWrapping(originalError, locations, path, nodes, source, positions){
    var resultError = new Error();
    Object.defineProperties(resultError, {
      message: {
        value: originalError.message,
        // By being enumerable, JSON.stringify will include `message` in the
        // resulting output. This ensures that the simplist possible GraphQL
        // service adheres to the spec.
        enumerable: true,
        writable: true
      },
      locations: {
        // Coercing falsey values to undefined ensures they will not be included
        // in JSON.stringify() when not provided.
        value: locations || [
          {
            "line": 5,
            "column": 12,
            "field": "email" // HERE
          }
        ],
        // By being enumerable, JSON.stringify will include `locations` in the
        // resulting output. This ensures that the simplist possible GraphQL
        // service adheres to the spec.
        enumerable: true
      },
      path: {
        // Coercing falsey values to undefined ensures they will not be included
        // in JSON.stringify() when not provided.
        value: path || "Some path",
        // By being enumerable, JSON.stringify will include `path` in the
        // resulting output. This ensures that the simplist possible GraphQL
        // service adheres to the spec.
        enumerable: true
      },
      nodes: {
        value: nodes || 'Nodes'
      },
      source: {
        value: source || 'Source',
      },
      positions: {
        value: positions || 'Positions',
      },
      originalError: {
        value: originalError
      }
    });
  
    return resultError;
  }
docs: Code taken from grpahql implemantation here (with some changes): https://github.com/graphql/graphql-js/blob/44f315d1ff72ab32b794937fd11a7f8e792fd873/src/error/GraphQLError.js#L66-L69