Closed
Description
Currently there seems no way to manipulate existing object types. It would be handy to have addField
method as follows:
const objType = new GraphQLObjectType({
name: 'SomeObject',
fields: {},
});
objType.addField('add', { name: 'add', type: GraphQLInt });
objType.getFields()
// {
// add: { name: 'add', type: GraphQLInt },
// );