apollo-link-scalars
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -0,1 +1,2 @@ | ||
import { makeExecutableSchema } from "graphql-tools"; | ||
import { isNone } from "./lib/is-none"; | ||
@@ -5,3 +6,2 @@ import { ScalarApolloLink, withScalars } from "./lib/link"; | ||
import { FunctionsMap, ParsingFunctionsObject } from "./types/functions-map"; | ||
import { makeExecutableSchema } from "graphql-tools"; | ||
export { FunctionsMap, isNone, mapIfArray, ParsingFunctionsObject, ScalarApolloLink, withScalars, makeExecutableSchema, }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.makeExecutableSchema = exports.withScalars = exports.ScalarApolloLink = exports.mapIfArray = exports.isNone = void 0; | ||
const graphql_tools_1 = require("graphql-tools"); | ||
Object.defineProperty(exports, "makeExecutableSchema", { enumerable: true, get: function () { return graphql_tools_1.makeExecutableSchema; } }); | ||
const is_none_1 = require("./lib/is-none"); | ||
@@ -11,4 +13,2 @@ Object.defineProperty(exports, "isNone", { enumerable: true, get: function () { return is_none_1.isNone; } }); | ||
Object.defineProperty(exports, "mapIfArray", { enumerable: true, get: function () { return map_if_array_1.mapIfArray; } }); | ||
const graphql_tools_1 = require("graphql-tools"); | ||
Object.defineProperty(exports, "makeExecutableSchema", { enumerable: true, get: function () { return graphql_tools_1.makeExecutableSchema; } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkNBQXVDO0FBUXJDLHVGQVJPLGdCQUFNLE9BUVA7QUFQUixxQ0FBMkQ7QUFVekQsaUdBVk8sdUJBQWdCLE9BVVA7QUFDaEIsNEZBWHlCLGtCQUFXLE9BV3pCO0FBVmIscURBQWdEO0FBTzlDLDJGQVBPLHlCQUFVLE9BT1A7QUFMWixpREFBcUQ7QUFTbkQscUdBVE8sb0NBQW9CLE9BU1AifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaURBQXFEO0FBYW5ELHFHQWJPLG9DQUFvQixPQWFQO0FBWnRCLDJDQUF1QztBQU9yQyx1RkFQTyxnQkFBTSxPQU9QO0FBTlIscUNBQTJEO0FBU3pELGlHQVRPLHVCQUFnQixPQVNQO0FBQ2hCLDRGQVZ5QixrQkFBVyxPQVV6QjtBQVRiLHFEQUFnRDtBQU05QywyRkFOTyx5QkFBVSxPQU1QIn0= |
@@ -11,2 +11,2 @@ "use strict"; | ||
exports.graphqlSchemaObj = graphql_1.buildClientSchema(introspection_json_1.default); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGhxbC1zY2hlbWEuZml4dHVyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL19fdGVzdHNfXy9ncmFwaHFsLXNjaGVtYS5maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxxQ0FBNEM7QUFFNUMsOEVBQTZEO0FBRTdELGFBQWE7QUFDQSxRQUFBLGdCQUFnQixHQUFHLDJCQUFpQixDQUFDLDRCQUF5QixDQUFDLENBQUMifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGhxbC1zY2hlbWEuZml4dHVyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL19fdGVzdHNfXy9ncmFwaHFsLXNjaGVtYS5maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxxQ0FBNEM7QUFDNUMsOEVBQTZEO0FBRTdELGFBQWE7QUFDQSxRQUFBLGdCQUFnQixHQUFHLDJCQUFpQixDQUFDLDRCQUF5QixDQUFDLENBQUMifQ== |
import { FieldNode, FragmentDefinitionNode, SelectionNode } from "graphql"; | ||
import { Dictionary } from "lodash"; | ||
import { Dictionary } from "../types/dictionary"; | ||
import { MutOrRO } from "../types/mut-or-ro"; | ||
@@ -4,0 +4,0 @@ import { ReducedFieldNode } from "./node-types"; |
@@ -13,12 +13,18 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fragmentMapFrom = exports.replaceFragmentsOn = exports.uniqueNodes = void 0; | ||
const lodash_1 = require("lodash"); | ||
const lodash_every_1 = __importDefault(require("lodash.every")); | ||
const lodash_flatmap_1 = __importDefault(require("lodash.flatmap")); | ||
const lodash_frompairs_1 = __importDefault(require("lodash.frompairs")); | ||
const lodash_uniqby_1 = __importDefault(require("lodash.uniqby")); | ||
const node_types_1 = require("./node-types"); | ||
function uniqueNodes(nodes) { | ||
return lodash_1.uniqBy(nodes, (fn) => JSON.stringify([fn.alias && fn.alias.value, fn.name.value])); | ||
return lodash_uniqby_1.default(nodes, (fn) => { var _a; return JSON.stringify([(_a = fn.alias) === null || _a === void 0 ? void 0 : _a.value, fn.name.value]); }); | ||
} | ||
exports.uniqueNodes = uniqueNodes; | ||
function getCleanedSelections(selections, fragmentMap) { | ||
return lodash_1.flatMap(selections, (sn) => { | ||
return lodash_flatmap_1.default(selections, (sn) => { | ||
if (node_types_1.isFieldNode(sn)) | ||
@@ -31,3 +37,3 @@ return [sn]; | ||
return []; | ||
return lodash_1.isArray(nodeOrSelectionList) ? nodeOrSelectionList : nodeOrSelectionList.selectionSet.selections; // fragment node | ||
return Array.isArray(nodeOrSelectionList) ? nodeOrSelectionList : nodeOrSelectionList.selectionSet.selections; // fragment node | ||
}); | ||
@@ -47,3 +53,3 @@ } | ||
const cleaned = getCleanedSelections(selections, fragmentMap); | ||
if (!lodash_1.every(cleaned, node_types_1.isFieldNode)) { | ||
if (!lodash_every_1.default(cleaned, node_types_1.isFieldNode)) { | ||
return replaceFragmentsOn(cleaned, fragmentMap); | ||
@@ -56,4 +62,4 @@ } | ||
function fragmentMapFrom(fragments) { | ||
const initialMap = lodash_1.fromPairs(lodash_1.map(fragments, (f) => [f.name.value, f])); | ||
return lodash_1.fromPairs(lodash_1.map(fragments, (f) => { | ||
const initialMap = lodash_frompairs_1.default(fragments.map((f) => [f.name.value, f])); | ||
return lodash_frompairs_1.default(fragments.map((f) => { | ||
const fieldNodes = replaceFragmentsOn(f.selectionSet.selections, initialMap); | ||
@@ -64,2 +70,2 @@ return [f.name.value, fieldNodes]; | ||
exports.fragmentMapFrom = fragmentMapFrom; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJhZ21lbnQtdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL2ZyYWdtZW50LXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O0FBQ0EsbUNBQXFGO0FBRXJGLDZDQUFtRjtBQUVuRixTQUFnQixXQUFXLENBQXNCLEtBQVU7SUFDekQsT0FBTyxlQUFNLENBQUMsS0FBSyxFQUFFLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxDQUFDLEtBQUssSUFBSSxFQUFFLENBQUMsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztB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W9DLEVBQ3BDLFdBQW9FO0lBRXBFLE1BQU0sT0FBTyxHQUFHLG9CQUFvQixDQUFDLFVBQVUsRUFBRSxXQUFXLENBQUMsQ0FBQztJQUU5RCxJQUFJLENBQUMsc0JBQUssQ0FBQyxPQUFPLEVBQUUsd0JBQVcsQ0FBQyxFQUFFO1FBQ2hDLE9BQU8sa0JBQWtCLENBQUMsT0FBTyxFQUFFLFdBQVcsQ0FBQyxDQUFDO0tBQ2pEO0lBRUQsTUFBTSxRQUFRLEdBQUcscUJBQXFCLENBQUMsT0FBc0IsRUFBRSxXQUFXLENBQUMsQ0FBQztJQUM1RSxPQUFPLFdBQVcsQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMvQixDQUFDO0FBWkQsZ0RBWUM7QUFFRCxTQUFnQixlQUFlLENBQUMsU0FBbUM7SUFDakUsTUFBTSxVQUFVLEdBQUcsMEJBQVMsQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN0RSxPQUFPLDBCQUFTLENBQ2QsU0FBUyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUFFO1FBQ2xCLE1BQU0sVUFBVSxHQUFHLGtCQUFrQixDQUFDLENBQUMsQ0FBQyxZQUFZLENBQUMsVUFBVSxFQUFFLFVBQVUsQ0FBQyxDQUFDO1FBQzdFLE9BQU8sQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEtBQUssRUFBRSxVQUFVLENBQUMsQ0FBQztJQUNwQyxDQUFDLENBQUMsQ0FDSCxDQUFDO0FBQ0osQ0FBQztBQVJELDBDQVFDIn0= |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isNone = void 0; | ||
const lodash_1 = require("lodash"); | ||
const lodash_isnull_1 = __importDefault(require("lodash.isnull")); | ||
const lodash_isundefined_1 = __importDefault(require("lodash.isundefined")); | ||
/** | ||
@@ -10,5 +14,5 @@ * @hidden | ||
function isNone(x) { | ||
return lodash_1.isUndefined(x) || lodash_1.isNull(x); | ||
return lodash_isundefined_1.default(x) || lodash_isnull_1.default(x); | ||
} | ||
exports.isNone = isNone; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtbm9uZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvaXMtbm9uZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtQ0FBNkM7QUFFN0M7OztHQUdHO0FBQ0gsU0FBZ0IsTUFBTSxDQUFDLENBQU07SUFDM0IsT0FBTyxvQkFBVyxDQUFDLENBQUMsQ0FBQyxJQUFJLGVBQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNyQyxDQUFDO0FBRkQsd0JBRUMifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtbm9uZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvaXMtbm9uZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxrRUFBbUM7QUFDbkMsNEVBQTZDO0FBRTdDOzs7R0FHRztBQUNILFNBQWdCLE1BQU0sQ0FBQyxDQUFNO0lBQzNCLE9BQU8sNEJBQVcsQ0FBQyxDQUFDLENBQUMsSUFBSSx1QkFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3JDLENBQUM7QUFGRCx3QkFFQyJ9 |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -6,3 +9,3 @@ exports.withScalars = exports.ScalarApolloLink = void 0; | ||
const graphql_1 = require("graphql"); | ||
const lodash_1 = require("lodash"); | ||
const lodash_pickby_1 = __importDefault(require("lodash.pickby")); | ||
const map_if_array_1 = require("./map-if-array"); | ||
@@ -19,3 +22,3 @@ const node_types_1 = require("./node-types"); | ||
this.removeTypenameFromInputs = pars.removeTypenameFromInputs || false; | ||
const leafTypesMap = lodash_1.pickBy(this.schema.getTypeMap(), graphql_1.isLeafType); | ||
const leafTypesMap = lodash_pickby_1.default(this.schema.getTypeMap(), graphql_1.isLeafType); | ||
this.functionsMap = Object.assign(Object.assign({}, leafTypesMap), this.typesMap); | ||
@@ -68,3 +71,3 @@ this.serializer = new serializer_1.Serializer(this.schema, this.functionsMap, this.removeTypenameFromInputs); | ||
const o = operation.query.definitions.find(node_types_1.isOperationDefinitionNode); | ||
const varDefs = (o && o.variableDefinitions) || []; | ||
const varDefs = (o === null || o === void 0 ? void 0 : o.variableDefinitions) || []; | ||
varDefs.forEach((vd) => { | ||
@@ -95,2 +98,2 @@ const key = vd.variable.name.value; | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2Q0FBdUY7QUFDdkYscUNBQTBGO0FBQzFGLG1DQUFnQztBQUdoQyxpREFBNEM7QUFDNUMsNkNBQTRGO0FBQzVGLDZDQUEwQztBQUMxQyxpREFBNkM7QUFTN0MsTUFBYSxnQkFBaUIsU0FBUSx3QkFBVTtJQVE5QyxZQUFZLElBQTRCO1FBQ3RDLEtBQUssRUFBRSxDQUFDO1FBQ1IsSUFBS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RLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztRQUNyQyxNQUFNLFVBQVUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUVqRCxPQUFPLFVBQVUsSUFBSSxxQkFBVyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQyxLQUFLLEVBQUUsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQztJQUN0RyxDQUFDO0NBQ0Y7QUE1RkQsNENBNEZDO0FBRVksUUFBQSxXQUFXLEdBQUcsQ0FBQyxJQUE0QixFQUFjLEVBQUU7SUFDdEUsT0FBTyxJQUFJLGdCQUFnQixDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ3BDLENBQUMsQ0FBQyJ9 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mapIfArray = void 0; | ||
const lodash_1 = require("lodash"); | ||
/** | ||
@@ -10,5 +9,5 @@ * @hidden | ||
function mapIfArray(a, fn) { | ||
return lodash_1.isArray(a) ? a.map(fn) : a; | ||
return Array.isArray(a) ? a.map(fn) : a; | ||
} | ||
exports.mapIfArray = mapIfArray; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLWlmLWFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9tYXAtaWYtYXJyYXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbUNBQWlDO0FBRWpDOzs7R0FHRztBQUNILFNBQWdCLFVBQVUsQ0FDeEIsQ0FBbUIsRUFDbkIsRUFBMkI7SUFFM0IsT0FBTyxnQkFBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDcEMsQ0FBQztBQUxELGdDQUtDIn0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLWlmLWFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9tYXAtaWYtYXJyYXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7OztHQUdHO0FBQ0gsU0FBZ0IsVUFBVSxDQUN4QixDQUFtQixFQUNuQixFQUEyQjtJQUUzQixPQUFPLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUMxQyxDQUFDO0FBTEQsZ0NBS0MifQ== |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Parser = void 0; | ||
const graphql_1 = require("graphql"); | ||
const lodash_1 = require("lodash"); | ||
const lodash_reduce_1 = __importDefault(require("lodash.reduce")); | ||
const is_none_1 = require("./is-none"); | ||
@@ -19,3 +22,3 @@ function ensureNullable(type) { | ||
const fn = (d, fieldNode) => this.treatSelection(d, fieldMap, fieldNode); | ||
return lodash_1.reduce(selections, fn, data); | ||
return lodash_reduce_1.default(selections, fn, data); | ||
} | ||
@@ -60,3 +63,3 @@ treatSelection(data, fieldMap, fieldNode) { | ||
parseArray(value, type, fieldNode) { | ||
return lodash_1.isArray(value) ? value.map((v) => this.treatValue(v, type.ofType, fieldNode)) : value; | ||
return Array.isArray(value) ? value.map((v) => this.treatValue(v, type.ofType, fieldNode)) : value; | ||
} | ||
@@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yQkFBaUIsQ0FBQyxTQUFTLENBQUMsSUFBSSxzQkFBWSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQztJQUNwRixDQUFDO0NBQ0Y7QUExRkQsd0JBMEZDIn0= |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Serializer = void 0; | ||
const graphql_1 = require("graphql"); | ||
const lodash_1 = require("lodash"); | ||
const is_none_1 = require("./is-none"); | ||
const map_if_array_1 = require("./map-if-array"); | ||
const lodash_has_1 = __importDefault(require("lodash.has")); | ||
const lodash_mapvalues_1 = __importDefault(require("lodash.mapvalues")); | ||
const __1 = require(".."); | ||
class Serializer { | ||
@@ -15,3 +18,3 @@ constructor(schema, functionsMap, removeTypenameFromInputs) { | ||
serialize(value, type) { | ||
if (is_none_1.isNone(value)) | ||
if (__1.isNone(value)) | ||
return value; | ||
@@ -25,3 +28,3 @@ return this.serializeNullable(value, graphql_1.getNullableType(type)); | ||
if (graphql_1.isListType(type)) { | ||
return map_if_array_1.mapIfArray(value, (v) => this.serialize(v, type.ofType)); | ||
return __1.mapIfArray(value, (v) => this.serialize(v, type.ofType)); | ||
} | ||
@@ -35,7 +38,7 @@ return this.serializeInputObject(value, type); | ||
serializeInputObject(value, type) { | ||
if (this.removeTypenameFromInputs && lodash_1.has(value, "__typename")) { | ||
if (this.removeTypenameFromInputs && lodash_has_1.default(value, "__typename")) { | ||
delete value.__typename; | ||
} | ||
const fields = type.getFields(); | ||
return lodash_1.mapValues(value, (v, key) => { | ||
return lodash_mapvalues_1.default(value, (v, key) => { | ||
const f = fields[key]; | ||
@@ -47,2 +50,2 @@ return f ? this.serialize(v, f.type) : v; | ||
exports.Serializer = Serializer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI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BQztJQUVTLGFBQWEsQ0FBQyxLQUFVLEVBQUUsSUFBeUM7UUFDM0UsTUFBTSxHQUFHLEdBQUcsSUFBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksSUFBSSxDQUFDO1FBQ2pELE9BQU8sR0FBRyxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUM5QixDQUFDO0lBRVMsb0JBQW9CLENBQUMsS0FBVSxFQUFFLElBQTRCO1FBQ3JFLElBQUksSUFBSSxDQUFDLHdCQUF3QixJQUFJLG9CQUFHLENBQUMsS0FBSyxFQUFFLFlBQVksQ0FBQyxFQUFFO1lBQzdELE9BQU8sS0FBSyxDQUFDLFVBQVUsQ0FBQztTQUN6QjtRQUVELE1BQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztRQUNoQyxPQUFPLDBCQUFTLENBQUMsS0FBSyxFQUFFLENBQUMsQ0FBQyxFQUFFLEdBQUcsRUFBRSxFQUFFO1lBQ2pDLE1BQU0sQ0FBQyxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztZQUN0QixPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDM0MsQ0FBQyxDQUFDLENBQUM7SUFDTCxDQUFDO0NBQ0Y7QUF6Q0QsZ0NBeUNDIn0= |
@@ -0,1 +1,2 @@ | ||
import { makeExecutableSchema } from "graphql-tools"; | ||
import { isNone } from "./lib/is-none"; | ||
@@ -5,3 +6,2 @@ import { ScalarApolloLink, withScalars } from "./lib/link"; | ||
import { FunctionsMap, ParsingFunctionsObject } from "./types/functions-map"; | ||
import { makeExecutableSchema } from "graphql-tools"; | ||
export { FunctionsMap, isNone, mapIfArray, ParsingFunctionsObject, ScalarApolloLink, withScalars, makeExecutableSchema, }; |
@@ -0,6 +1,6 @@ | ||
import { makeExecutableSchema } from "graphql-tools"; | ||
import { isNone } from "./lib/is-none"; | ||
import { ScalarApolloLink, withScalars } from "./lib/link"; | ||
import { mapIfArray } from "./lib/map-if-array"; | ||
import { makeExecutableSchema } from "graphql-tools"; | ||
export { isNone, mapIfArray, ScalarApolloLink, withScalars, makeExecutableSchema, }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN2QyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsV0FBVyxFQUFFLE1BQU0sWUFBWSxDQUFDO0FBQzNELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUVoRCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFckQsT0FBTyxFQUVMLE1BQU0sRUFDTixVQUFVLEVBRVYsZ0JBQWdCLEVBQ2hCLFdBQVcsRUFDWCxvQkFBb0IsR0FDckIsQ0FBQyJ9 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdkMsT0FBTyxFQUFFLGdCQUFnQixFQUFFLFdBQVcsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUMzRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFHaEQsT0FBTyxFQUVMLE1BQU0sRUFDTixVQUFVLEVBRVYsZ0JBQWdCLEVBQ2hCLFdBQVcsRUFDWCxvQkFBb0IsR0FDckIsQ0FBQyJ9 |
@@ -5,2 +5,2 @@ import { buildClientSchema } from "graphql"; | ||
export const graphqlSchemaObj = buildClientSchema(introspectionSchemaResult); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGhxbC1zY2hlbWEuZml4dHVyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL19fdGVzdHNfXy9ncmFwaHFsLXNjaGVtYS5maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxTQUFTLENBQUM7QUFFNUMsT0FBTyx5QkFBeUIsTUFBTSxzQkFBc0IsQ0FBQztBQUU3RCxhQUFhO0FBQ2IsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsaUJBQWlCLENBQUMseUJBQXlCLENBQUMsQ0FBQyJ9 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGhxbC1zY2hlbWEuZml4dHVyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL19fdGVzdHNfXy9ncmFwaHFsLXNjaGVtYS5maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxTQUFTLENBQUM7QUFDNUMsT0FBTyx5QkFBeUIsTUFBTSxzQkFBc0IsQ0FBQztBQUU3RCxhQUFhO0FBQ2IsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsaUJBQWlCLENBQUMseUJBQXlCLENBQUMsQ0FBQyJ9 |
import { FieldNode, FragmentDefinitionNode, SelectionNode } from "graphql"; | ||
import { Dictionary } from "lodash"; | ||
import { Dictionary } from "../types/dictionary"; | ||
import { MutOrRO } from "../types/mut-or-ro"; | ||
@@ -4,0 +4,0 @@ import { ReducedFieldNode } from "./node-types"; |
@@ -12,6 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
}; | ||
import { every, flatMap, fromPairs, isArray, map, uniqBy } from "lodash"; | ||
import every from "lodash.every"; | ||
import flatMap from "lodash.flatmap"; | ||
import fromPairs from "lodash.frompairs"; | ||
import uniqBy from "lodash.uniqby"; | ||
import { isFieldNode, isInlineFragmentNode } from "./node-types"; | ||
export function uniqueNodes(nodes) { | ||
return uniqBy(nodes, (fn) => JSON.stringify([fn.alias && fn.alias.value, fn.name.value])); | ||
return uniqBy(nodes, (fn) => { var _a; return JSON.stringify([(_a = fn.alias) === null || _a === void 0 ? void 0 : _a.value, fn.name.value]); }); | ||
} | ||
@@ -27,3 +30,3 @@ function getCleanedSelections(selections, fragmentMap) { | ||
return []; | ||
return isArray(nodeOrSelectionList) ? nodeOrSelectionList : nodeOrSelectionList.selectionSet.selections; // fragment node | ||
return Array.isArray(nodeOrSelectionList) ? nodeOrSelectionList : nodeOrSelectionList.selectionSet.selections; // fragment node | ||
}); | ||
@@ -50,4 +53,4 @@ } | ||
export function fragmentMapFrom(fragments) { | ||
const initialMap = fromPairs(map(fragments, (f) => [f.name.value, f])); | ||
return fromPairs(map(fragments, (f) => { | ||
const initialMap = fromPairs(fragments.map((f) => [f.name.value, f])); | ||
return fromPairs(fragments.map((f) => { | ||
const fieldNodes = replaceFragmentsOn(f.selectionSet.selections, initialMap); | ||
@@ -57,2 +60,2 @@ return [f.name.value, fieldNodes]; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjoz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TyxXQUFXLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDL0IsQ0FBQztBQUVELE1BQU0sVUFBVSxlQUFlLENBQUMsU0FBbUM7SUFDakUsTUFBTSxVQUFVLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ3RFLE9BQU8sU0FBUyxDQUNkLFNBQVMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRTtRQUNsQixNQUFNLFVBQVUsR0FBRyxrQkFBa0IsQ0FBQyxDQUFDLENBQUMsWUFBWSxDQUFDLFVBQVUsRUFBRSxVQUFVLENBQUMsQ0FBQztRQUM3RSxPQUFPLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsVUFBVSxDQUFDLENBQUM7SUFDcEMsQ0FBQyxDQUFDLENBQ0gsQ0FBQztBQUNKLENBQUMifQ== |
@@ -1,2 +0,3 @@ | ||
import { isNull, isUndefined } from "lodash"; | ||
import isNull from "lodash.isnull"; | ||
import isUndefined from "lodash.isundefined"; | ||
/** | ||
@@ -9,2 +10,2 @@ * @hidden | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtbm9uZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvaXMtbm9uZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFdBQVcsRUFBRSxNQUFNLFFBQVEsQ0FBQztBQUU3Qzs7O0dBR0c7QUFDSCxNQUFNLFVBQVUsTUFBTSxDQUFDLENBQU07SUFDM0IsT0FBTyxXQUFXLENBQUMsQ0FBQyxDQUFDLElBQUksTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3JDLENBQUMifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtbm9uZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvaXMtbm9uZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLE1BQU0sTUFBTSxlQUFlLENBQUM7QUFDbkMsT0FBTyxXQUFXLE1BQU0sb0JBQW9CLENBQUM7QUFFN0M7OztHQUdHO0FBQ0gsTUFBTSxVQUFVLE1BQU0sQ0FBQyxDQUFNO0lBQzNCLE9BQU8sV0FBVyxDQUFDLENBQUMsQ0FBQyxJQUFJLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNyQyxDQUFDIn0= |
import { ApolloLink, Observable } from "apollo-link"; | ||
import { isInputType, isLeafType } from "graphql"; | ||
import { pickBy } from "lodash"; | ||
import pickBy from "lodash.pickby"; | ||
import { mapIfArray } from "./map-if-array"; | ||
@@ -63,3 +63,3 @@ import { isListTypeNode, isNonNullTypeNode, isOperationDefinitionNode } from "./node-types"; | ||
const o = operation.query.definitions.find(isOperationDefinitionNode); | ||
const varDefs = (o && o.variableDefinitions) || []; | ||
const varDefs = (o === null || o === void 0 ? void 0 : o.variableDefinitions) || []; | ||
varDefs.forEach((vd) => { | ||
@@ -89,2 +89,2 @@ const key = vd.variable.name.value; | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUF5QixVQUFVLEVBQWEsTUFBTSxhQ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MsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDO0lBQ3RHLENBQUM7Q0FDRjtBQUVELE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBRyxDQUFDLElBQTRCLEVBQWMsRUFBRTtJQUN0RSxPQUFPLElBQUksZ0JBQWdCLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDcEMsQ0FBQyxDQUFDIn0= |
@@ -1,2 +0,1 @@ | ||
import { isArray } from "lodash"; | ||
/** | ||
@@ -7,4 +6,4 @@ * @hidden | ||
export function mapIfArray(a, fn) { | ||
return isArray(a) ? a.map(fn) : a; | ||
return Array.isArray(a) ? a.map(fn) : a; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLWlmLWFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9tYXAtaWYtYXJyYXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFFBQVEsQ0FBQztBQUVqQzs7O0dBR0c7QUFDSCxNQUFNLFVBQVUsVUFBVSxDQUN4QixDQUFtQixFQUNuQixFQUEyQjtJQUUzQixPQUFPLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3BDLENBQUMifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLWlmLWFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9tYXAtaWYtYXJyYXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHO0FBQ0gsTUFBTSxVQUFVLFVBQVUsQ0FDeEIsQ0FBbUIsRUFDbkIsRUFBMkI7SUFFM0IsT0FBTyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDMUMsQ0FBQyJ9 |
import { GraphQLError, isEnumType, isInputObjectType, isListType, isNonNullType, isObjectType, isScalarType, } from "graphql"; | ||
import { isArray, reduce } from "lodash"; | ||
import reduce from "lodash.reduce"; | ||
import { isNone } from "./is-none"; | ||
@@ -56,3 +56,3 @@ function ensureNullable(type) { | ||
parseArray(value, type, fieldNode) { | ||
return isArray(value) ? value.map((v) => this.treatValue(v, type.ofType, fieldNode)) : value; | ||
return Array.isArray(value) ? value.map((v) => this.treatValue(v, type.ofType, fieldNode)) : value; | ||
} | ||
@@ -75,2 +75,2 @@ parseNestedObject(value, givenType, fieldNode) { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyc2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9wYXJzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUVMLFlBQVksRUFhWixVQUFVLEVBQ1YsaUJBQWlCLEVBQ2pCLFVBQVUsRUFDVixhQUFhLEVBQ2IsWUFBWSxFQUNaLFlBQVksR0FDYixNQUFNLFNBQVMsQ0FBQztBQUNqQixPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLFFBQVEsQ0FBQztBQUd6QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBS25DLFNBQVMsY0FBYyxDQUFDLElBQTBDO0lBQ2hFLE9BQU8sYUFBYSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ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UIsQ0FDekIsS0FBVSxFQUNWLFNBQStHLEVBQy9HLFNBQTJCO1FBRTNCLElBQUksQ0FBQyxLQUFLLElBQUksQ0FBQyxTQUFTLElBQUksQ0FBQyxTQUFTLENBQUMsWUFBWSxJQUFJLENBQUMsU0FBUyxDQUFDLFlBQVksQ0FBQyxVQUFVLENBQUMsTUFBTSxFQUFFO1lBQ2hHLE9BQU8sS0FBSyxDQUFDO1NBQ2Q7UUFFRCxNQUFNLElBQUksR0FBRyxJQUFJLENBQUMsaUJBQWlCLENBQUMsS0FBSyxFQUFFLFNBQVMsQ0FBQyxDQUFDO1FBRXRELE9BQU8sSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMseUJBQXlCLENBQUMsS0FBSyxFQUFFLElBQUksRUFBRSxTQUFTLENBQUMsWUFBWSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUM7SUFDdkcsQ0FBQztJQUVTLGlCQUFpQixDQUN6QixLQUFVLEVBQ1YsSUFBMEc7UUFFMUcsSUFBSSxpQkFBaUIsQ0FBQyxJQUFJLENBQUMsSUFBSSxZQUFZLENBQUMsSUFBSSxDQUFDO1lBQUUsT0FBTyxJQUFJLENBQUM7UUFDL0QsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVO1lBQUUsT0FBTyxJQUFJLENBQUM7UUFFbkMsTUFBTSxTQUFTLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBQ3hELE9BQU8saUJBQWlCLENBQUMsU0FBUyxDQUFDLElBQUksWUFBWSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQztJQUNwRixDQUFDO0NBQ0YifQ== |
import { getNullableType, isEnumType, isListType, isScalarType, } from "graphql"; | ||
import { has, mapValues } from "lodash"; | ||
import { isNone } from "./is-none"; | ||
import { mapIfArray } from "./map-if-array"; | ||
import has from "lodash.has"; | ||
import mapValues from "lodash.mapvalues"; | ||
import { isNone, mapIfArray } from ".."; | ||
export class Serializer { | ||
@@ -40,2 +40,2 @@ constructor(schema, functionsMap, removeTypenameFromInputs) { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWFsaXplci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvc2VyaWFsaXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsZUFBZSxFQU1mLFVBQVUsRUFDVixVQUFVLEVBQ1YsWUFBWSxHQUNiLE1BQU0sU0FBUyxDQUFDO0FBQ2pCLE9BQU8sRUFBRSxHQUFHLEVBQUUsU0FBUyxFQUFFLE1BQU0sUUFBUSxDQUFDO0FBRXhDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDbkMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRTVDLE1BQU0sT0FBTyxVQUFVO0lBQ3JCLFlBQ1csTUFBcUIsRUFDckIsWUFBMEIsRUFDMUIsd0JBQWlDO1FBRmpDLFdBQU0sR0FBTixNQUFNLENBQWU7UUFDckIsaUJBQVksR0FBWixZQUFZLENBQWM7UUFDMUIsNkJBQXdCLEdBQXhCLHdCQUF3QixDQUFTO0lBQ3pDLENBQUM7SUFFRyxTQUFTLENBQUMsS0FBVSxFQUFFLElBQXNCO1FBQ2pELElBQUksTUFBTSxDQUFDLEtBQUssQ0FBQztZQUFFLE9BQU8sS0FBSyxDQUFDO1FBRWhDLE9BQU8sSUFBSSxDQUFDLGlCQUFpQixDQUFDLEtBQUssRUFBRSxlQUFlLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztJQUM5RCxDQUFDO0lB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PLFNBQVMsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFDLEVBQUUsR0FBRyxFQUFFLEVBQUU7WUFDakMsTUFBTSxDQUFDLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDO1lBQ3RCLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUMzQyxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FDRiJ9 |
@@ -5,2 +5,4 @@ # Changelog | ||
### [0.1.10](https://github.com/eturino/apollo-link-scalars/compare/v0.1.9...v0.1.10) (2020-08-19) | ||
### [0.1.9](https://github.com/eturino/apollo-link-scalars/compare/v0.1.8...v0.1.9) (2020-08-19) | ||
@@ -7,0 +9,0 @@ |
{ | ||
"name": "apollo-link-scalars", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"author": "Eduardo Turiño <eturino@eturino.com>", | ||
@@ -56,3 +56,15 @@ "description": "custom apollo link to allow to parse custom scalars", | ||
"graphql": "^14.5.8", | ||
"lodash": "^4.17.15", | ||
"lodash.clonedeep": "^4.5.0", | ||
"lodash.every": "^4.6.0", | ||
"lodash.flatmap": "^4.5.0", | ||
"lodash.frompairs": "^4.0.1", | ||
"lodash.has": "^4.5.2", | ||
"lodash.isnull": "^3.0.0", | ||
"lodash.isnumber": "^3.0.3", | ||
"lodash.isstring": "^4.0.1", | ||
"lodash.isundefined": "^3.0.1", | ||
"lodash.mapvalues": "^4.6.0", | ||
"lodash.pickby": "^4.6.0", | ||
"lodash.reduce": "^4.6.0", | ||
"lodash.uniqby": "^4.7.0", | ||
"zen-observable-ts": "^0.8.21" | ||
@@ -64,6 +76,18 @@ }, | ||
"@commitlint/config-conventional": "^9.0.1", | ||
"@types/lodash.clonedeep": "^4.5.6", | ||
"@types/lodash.every": "^4.6.6", | ||
"@types/lodash.flatmap": "^4.5.6", | ||
"@types/lodash.frompairs": "^4.0.6", | ||
"@types/lodash.has": "^4.5.6", | ||
"@types/lodash.isnull": "^3.0.6", | ||
"@types/lodash.isnumber": "^3.0.6", | ||
"@types/lodash.isstring": "^4.0.6", | ||
"@types/lodash.isundefined": "^3.0.6", | ||
"@types/lodash.mapvalues": "^4.6.6", | ||
"@types/lodash.pickby": "^4.6.6", | ||
"@types/lodash.reduce": "^4.6.6", | ||
"@types/lodash.uniqby": "^4.7.6", | ||
"@types/graphql": "^14.5.0", | ||
"@types/inquirer": "^7.3.0", | ||
"@types/jest": "^26.0.0", | ||
"@types/lodash": "^4.14.149", | ||
"apollo-server-testing": "^2.12.0", | ||
@@ -81,2 +105,3 @@ "cz-conventional-changelog": "^3.1.0", | ||
"prettier": "^2.0.4", | ||
"prettier-plugin-organize-imports": "^1.1.1", | ||
"replace-in-file": "^6.1.0", | ||
@@ -83,0 +108,0 @@ "standard-version": "^9.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
469382
78
7905
16
45
+ Addedlodash.clonedeep@^4.5.0
+ Addedlodash.every@^4.6.0
+ Addedlodash.flatmap@^4.5.0
+ Addedlodash.frompairs@^4.0.1
+ Addedlodash.has@^4.5.2
+ Addedlodash.isnull@^3.0.0
+ Addedlodash.isnumber@^3.0.3
+ Addedlodash.isstring@^4.0.1
+ Addedlodash.isundefined@^3.0.1
+ Addedlodash.mapvalues@^4.6.0
+ Addedlodash.pickby@^4.6.0
+ Addedlodash.reduce@^4.6.0
+ Addedlodash.uniqby@^4.7.0
+ Addedlodash.clonedeep@4.5.0(transitive)
+ Addedlodash.every@4.6.0(transitive)
+ Addedlodash.flatmap@4.5.0(transitive)
+ Addedlodash.frompairs@4.0.1(transitive)
+ Addedlodash.has@4.5.2(transitive)
+ Addedlodash.isnull@3.0.0(transitive)
+ Addedlodash.isnumber@3.0.3(transitive)
+ Addedlodash.isstring@4.0.1(transitive)
+ Addedlodash.isundefined@3.0.1(transitive)
+ Addedlodash.mapvalues@4.6.0(transitive)
+ Addedlodash.pickby@4.6.0(transitive)
+ Addedlodash.reduce@4.6.0(transitive)
+ Addedlodash.uniqby@4.7.0(transitive)
- Removedlodash@^4.17.15
- Removedlodash@4.17.21(transitive)