graphile-build
Advanced tools
Comparing version 4.0.0-rc.3 to 4.0.0-rc.4
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.resolveNode = exports.MutationPayloadQueryPlugin = exports.ClientMutationIdDescriptionPlugin = exports.MutationPlugin = exports.QueryPlugin = exports.NodePlugin = exports.StandardTypesPlugin = exports.defaultPlugins = exports.buildSchema = exports.getBuilder = exports.singularize = exports.pluralize = exports.upperCamelCase = exports.constantCase = exports.camelCase = exports.upperFirst = exports.formatInsideUnderscores = exports.constantCaseAll = undefined; | ||
exports.resolveNode = exports.MutationPayloadQueryPlugin = exports.ClientMutationIdDescriptionPlugin = exports.SubscriptionPlugin = exports.MutationPlugin = exports.QueryPlugin = exports.NodePlugin = exports.StandardTypesPlugin = exports.defaultPlugins = exports.buildSchema = exports.getBuilder = exports.singularize = exports.pluralize = exports.upperCamelCase = exports.constantCase = exports.camelCase = exports.upperFirst = exports.formatInsideUnderscores = exports.constantCaseAll = undefined; | ||
@@ -78,5 +78,6 @@ var _utils = require("./utils"); | ||
const builder = new _SchemaBuilder2.default(); | ||
for (const plugin of plugins) { | ||
for (let i = 0, l = plugins.length; i < l; i++) { | ||
const plugin = plugins[i]; | ||
if (typeof plugin !== "function") { | ||
throw new Error("Expected a list of plugin functions, instead list contained a non-function: " + _util2.default.inspect(plugin)); | ||
throw new Error(`Expected a list of plugin functions, instead list contained a non-function at index ${i}: ${_util2.default.inspect(plugin)}`); | ||
} | ||
@@ -101,2 +102,3 @@ builder._setPluginName(plugin.displayName || plugin.name); | ||
exports.MutationPlugin = _plugins.MutationPlugin; | ||
exports.SubscriptionPlugin = _plugins.SubscriptionPlugin; | ||
exports.ClientMutationIdDescriptionPlugin = _plugins.ClientMutationIdDescriptionPlugin; | ||
@@ -103,0 +105,0 @@ exports.MutationPayloadQueryPlugin = _plugins.MutationPayloadQueryPlugin; |
@@ -10,3 +10,6 @@ "use strict"; | ||
const { extend } = build; | ||
const { scope: { isMutationInput, fieldName }, Self } = context; | ||
const { | ||
scope: { isMutationInput, fieldName }, | ||
Self | ||
} = context; | ||
if (!isMutationInput || fieldName !== "clientMutationId" || field.description) { | ||
@@ -22,3 +25,6 @@ return field; | ||
const { extend } = build; | ||
const { scope: { isMutationPayload, fieldName }, Self } = context; | ||
const { | ||
scope: { isMutationPayload, fieldName }, | ||
Self | ||
} = context; | ||
if (!isMutationPayload || fieldName !== "clientMutationId" || field.description) { | ||
@@ -34,3 +40,7 @@ return field; | ||
const { extend } = build; | ||
const { scope: { isRootMutation }, Self, field } = context; | ||
const { | ||
scope: { isRootMutation }, | ||
Self, | ||
field | ||
} = context; | ||
if (!isRootMutation || !args.input || args.input.description) { | ||
@@ -37,0 +47,0 @@ return args; |
@@ -10,3 +10,6 @@ "use strict"; | ||
const { $$isQuery, extend, getTypeByName } = build; | ||
const { scope: { isMutationPayload }, Self } = context; | ||
const { | ||
scope: { isMutationPayload }, | ||
Self | ||
} = context; | ||
if (!isMutationPayload) { | ||
@@ -13,0 +16,0 @@ return fields; |
@@ -24,3 +24,7 @@ "use strict"; | ||
builder.hook("GraphQLSchema", (schema, build) => { | ||
const { newWithHooks, extend, graphql: { GraphQLObjectType } } = build; | ||
const { | ||
newWithHooks, | ||
extend, | ||
graphql: { GraphQLObjectType } | ||
} = build; | ||
const Mutation = newWithHooks(GraphQLObjectType, { | ||
@@ -27,0 +31,0 @@ name: "Mutation", |
@@ -85,3 +85,5 @@ "use strict"; | ||
const { getTypeByName } = build; | ||
const { scope: { isRootQuery } } = context; | ||
const { | ||
scope: { isRootQuery } | ||
} = context; | ||
if (!isRootQuery) { | ||
@@ -99,3 +101,6 @@ return interfaces; | ||
builder.hook("GraphQLObjectType:fields", (fields, build, context) => { | ||
const { scope: { isRootQuery }, fieldWithHooks } = context; | ||
const { | ||
scope: { isRootQuery }, | ||
fieldWithHooks | ||
} = context; | ||
if (!isRootQuery) { | ||
@@ -102,0 +107,0 @@ return fields; |
@@ -24,3 +24,7 @@ "use strict"; | ||
builder.hook("GraphQLSchema", (schema, build) => { | ||
const { newWithHooks, extend, graphql: { GraphQLObjectType } } = build; | ||
const { | ||
newWithHooks, | ||
extend, | ||
graphql: { GraphQLObjectType } | ||
} = build; | ||
const Subscription = newWithHooks(GraphQLObjectType, { | ||
@@ -27,0 +31,0 @@ name: "Subscription", |
{ | ||
"name": "graphile-build", | ||
"version": "4.0.0-rc.3", | ||
"version": "4.0.0-rc.4", | ||
"description": "Build a GraphQL schema from plugins", | ||
@@ -31,4 +31,5 @@ "main": "node8plus/index.js", | ||
"debug": ">=2 <3", | ||
"graphql-parse-resolve-info": "4.0.0-rc.3", | ||
"graphql-parse-resolve-info": "4.0.0-rc.4", | ||
"lodash": ">=4 <5", | ||
"lru-cache": ">=4 <5", | ||
"pluralize": "7.0.0" | ||
@@ -35,0 +36,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
220004
1293
6
+ Addedlru-cache@>=4 <5
+ Addedgraphql-parse-resolve-info@4.0.0-rc.4(transitive)
+ Addedlru-cache@4.1.5(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedyallist@2.1.2(transitive)
- Removedgraphql-parse-resolve-info@4.0.0-rc.3(transitive)