Closed anatol-sialitski closed 2 years ago
Query context argument should be added tot execute function. It allows to developers provide shared data between fields.
execute
This context will be available from env.context variable
env.context
For instance:
let params = { сontext: { myParameter: 'anyvalue' }, schemaOptions: { creationCallbacks: { 'portal_Site': function (context, params) { params.fields._path = { type: graphqlLib.nonNull(graphqlLib.GraphQLString), resolve: function (env) { return env.source._path + '/ ' + env.context.myParameter; } } } } } };
then
guillotineLib.execute(params)
Query context argument should be added tot
execute
function. It allows to developers provide shared data between fields.This context will be available from
env.context
variableFor instance:
then