enables extension of graphql schema

This commit is contained in:
James
2020-05-18 21:19:50 -04:00
parent 4de1b3ab51
commit a2a795024c
3 changed files with 21 additions and 0 deletions

View File

@@ -39,6 +39,16 @@ class GraphQL {
this.initCollections();
this.initGlobals();
this.Query = {
...this.Query,
...(this.config.queries),
};
this.Mutation = {
...this.Mutation,
...(this.config.mutations),
};
const query = new GraphQLObjectType(this.Query);
const mutation = new GraphQLObjectType(this.Mutation);
const schema = new GraphQLSchema({ query, mutation });