Closed anatol-sialitski closed 2 years ago
Current implementation does not allow to modify interface types during schema creation how it to do for an object type.
It will be great if we able to specify interfaces in creationCallbacks too.
creationCallbacks
Example of usage:
const guillotineLib = require("/lib/guillotine"); const graphQlLib = require("/lib/graphql"); exports.post = function (req) { let input = JSON.parse(req.body); let params = { query: input.query, variables: input.variables, schemaOptions: { creationCallbacks: { 'Content': function(context, params) { // Content is an interface params.fields.testField = { type: graphQlLib.GraphQLString, resolve: function (env) { return "testValue"; } }; } } } }; return { contentType: 'application/json', headers: CORS_HEADERS, body: guillotineLib.execute(params) }; };
Current implementation does not allow to modify interface types during schema creation how it to do for an object type.
It will be great if we able to specify interfaces in
creationCallbacks
too.Example of usage: