Skip to content
Snippets Groups Projects
Commit ebe2998c authored by Guillaume WANG's avatar Guillaume WANG
Browse files

use makeExecutableSchema

parent 07426ddb
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,7 @@ const context = async ({ req }): Promise<Context> => {
};
const server = new ApolloServer({
...schema,
schema,
context,
playground: {
settings: {
......
......@@ -6,16 +6,17 @@
const actionDefs = require('./typeDefs/actions.graphql');
const objectDefs = require('./typeDefs/objects.graphql');
import { resolvers } from './resolvers';
import { makeExecutableSchema } from 'graphql-tools';
const typeDefs = actionDefs.concat(objectDefs);
const schema = {
const schema = makeExecutableSchema({
typeDefs,
resolvers,
logger: {log: e => console.log(e)},
inheritResolversFromInterfaces: true,
//formatResponse: response => { console.log(JSON.stringify(response)); return response; },
//formatError: error => {console.log(JSON.stringify(error)); return error; }
};
});
export default schema;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment