simple-graphql
Advanced tools
Comparing version 4.1.5 to 4.1.6
import * as graphql from 'graphql'; | ||
import { SGInterfaceContext, SGQueryConfigMap, SGResolverContext, SGTypeContext } from '..'; | ||
declare const _default: (queryConfigMaps: Array<SGQueryConfigMap>, context: SGResolverContext & SGTypeContext & SGInterfaceContext) => { | ||
import { SGHookOptionsMap, SGInterfaceContext, SGQueryConfigMap, SGResolverContext, SGTypeContext } from '..'; | ||
declare const _default: (queryConfigMaps: Array<SGQueryConfigMap>, context: SGResolverContext & SGTypeContext & SGInterfaceContext, nodeQueryConfig?: { | ||
hookOptions?: SGHookOptionsMap | undefined; | ||
} | undefined) => { | ||
[key: string]: graphql.GraphQLFieldConfig<any, any, { | ||
@@ -5,0 +7,0 @@ [argName: string]: any; |
@@ -40,3 +40,3 @@ "use strict"; | ||
const StringHelper_1 = __importDefault(require("../utils/StringHelper")); | ||
exports.default = (queryConfigMaps, context) => { | ||
exports.default = (queryConfigMaps, context, nodeQueryConfig) => { | ||
const queries = {}; | ||
@@ -97,2 +97,3 @@ const addQuery = (name, options) => { | ||
resolve: context.hookQueryResolve('node', { | ||
hookOptions: nodeQueryConfig === null || nodeQueryConfig === void 0 ? void 0 : nodeQueryConfig.hookOptions, | ||
output: { | ||
@@ -99,0 +100,0 @@ properties: { |
@@ -23,3 +23,3 @@ "use strict"; | ||
sequelize: sequelize, | ||
schemas: applyPluginsToSchemas_1.default(config.schemas || [], plugins, buildOptions.plugin || {}), | ||
schemas: applyPluginsToSchemas_1.default(config.schemas || [], plugins, buildOptions.defaultPlugin || {}), | ||
models: {}, | ||
@@ -46,3 +46,3 @@ services: {}, | ||
sgContext.typeConfig = (typeName) => fieldTypeContext.typeConfig(typeName); | ||
sgContext.models = applyPluginsToModels_1.default(buildSequelizeModels_1.default(sequelize, config.schemas || [], sgContext), plugins, buildOptions.plugin || {}); | ||
sgContext.models = applyPluginsToModels_1.default(buildSequelizeModels_1.default(sequelize, config.schemas || [], sgContext), plugins, buildOptions.defaultPlugin || {}); | ||
sgContext.services = buildServices_1.default(config.services || [], sgContext); | ||
@@ -52,3 +52,3 @@ const rootQueries = buildRootQueries_1.default([ | ||
config.queries || {} | ||
], context); | ||
], context, buildOptions.nodeQueryConfig); | ||
const payloadFields = {}; | ||
@@ -55,0 +55,0 @@ const rootQueryObject = new graphql_1.GraphQLObjectType({ |
@@ -280,3 +280,6 @@ import { GraphQLFieldResolver, GraphQLInputType, GraphQLInterfaceType, GraphQLOutputType, GraphQLResolveInfo } from 'graphql'; | ||
export declare type SGBuildOptions = { | ||
plugin?: SGPluginOptionsMap; | ||
defaultPlugin?: SGPluginOptionsMap; | ||
nodeQueryConfig?: { | ||
hookOptions?: SGHookOptionsMap; | ||
}; | ||
}; | ||
@@ -283,0 +286,0 @@ export declare type SGBuildConfig = { |
{ | ||
"name": "simple-graphql", | ||
"version": "4.1.5", | ||
"version": "4.1.6", | ||
"description": "The simple way to generates GraphQL schemas and Sequelize models from your models definition.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
327105
180
4852