Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-root-schema

Package Overview
Dependencies
Maintainers
15
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-root-schema - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

37

dist/index.js

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -6,13 +6,8 @@ Object.defineProperty(exports, "__esModule", {

});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.default = createRootSchema;
var _graphqlTools = require('graphql-tools');
var _graphqlTools = require("graphql-tools");
var _lodash = require('lodash.merge');
var _lodash = _interopRequireDefault(require("lodash.merge"));
var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -22,3 +17,5 @@

// Query and Mutation must be non-empty, even if they will be extended
const rootTypes = /* GraphQL */`
const rootTypes =
/* GraphQL */
`
type Mutation {

@@ -30,14 +27,18 @@ _: String

}
`;
`; // Combine types and resolvers into an object usable by `makeExecutableSchema`
// Combine types and resolvers into an object usable by `makeExecutableSchema`
const { resolvers, typeDefs } = schemas.reduce((schemaList, schema) => ({
resolvers: (0, _lodash2.default)(schemaList.resolvers, schema.resolvers),
const {
resolvers,
typeDefs
} = schemas.reduce((schemaList, schema) => ({
resolvers: (0, _lodash.default)(schemaList.resolvers, schema.resolvers),
typeDefs: [...schemaList.typeDefs, ...(Array.isArray(schema.type) ? schema.type : [schema.type])]
}), { typeDefs: [rootTypes] });
return (0, _graphqlTools.makeExecutableSchema)(_extends({
}), {
typeDefs: [rootTypes]
});
return (0, _graphqlTools.makeExecutableSchema)({
resolvers,
typeDefs
}, options));
typeDefs,
...options
});
}
{
"name": "create-root-schema",
"version": "1.1.0",
"version": "1.2.0",
"main": "dist/index.js",

@@ -14,5 +14,12 @@ "module": "src/index.js",

"ava": {
"babel": "inherit",
"babel": {
"testOptions": {
"presets": [
"@babel/preset-env"
]
}
},
"require": [
"babel-register"
"@babel/polyfill",
"@babel/register"
]

@@ -23,3 +30,3 @@ },

[
"env",
"@babel/preset-env",
{

@@ -30,7 +37,20 @@ "targets": {

}
],
"stage-2"
]
],
"plugins": [
"transform-export-extensions"
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions"
]

@@ -43,8 +63,19 @@ },

"devDependencies": {
"ava": "^0.25.0",
"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.3",
"babel-plugin-transform-export-extensions": "^6.22.0",
"babel-preset-env": "^1.6.1",
"babel-preset-stage-2": "^6.24.1",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.4.4",
"ava": "^2.2.0",
"babel-eslint": "^9.0.0",
"eslint": "^4.19.1",

@@ -59,3 +90,3 @@ "eslint-config-gsandf": "^1.0.1",

"graphql-tools": "^4.0.4",
"lodash.merge": "^4.6.1"
"lodash.merge": "^4.6.2"
},

@@ -62,0 +93,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc