UNPKG

@aws-amplify/amplify-appsync-simulator

Version:

An AppSync Simulator to test AppSync API.

16 lines 649 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.exposeGraphQLErrors = void 0; function exposeGraphQLErrors(errors = []) { return errors.map((e) => { if (e.extensions && !(Object.keys(e.extensions).length === 0)) { const additionalProps = Object.entries(e.extensions).reduce((sum, [k, v]) => { return { ...sum, [k]: { value: v, enumerable: true } }; }, {}); return Object.defineProperties({}, additionalProps); } return e; }); } exports.exposeGraphQLErrors = exposeGraphQLErrors; //# sourceMappingURL=expose-graphql-errors.js.map