makeExecutableSchema
import { makeExecutableSchema } from 'graphql-tools';
const executableSchema = makeExecutableSchema({
typeDefs,
resolvers,
});
makeExecutableSchema
import { makeExecutableSchema } from 'graphql-tools';
const executableSchema = makeExecutableSchema({
typeDefs,
resolvers,
});
Root Resolver
let resolvers = {
Query: {
getBooks: () => { /* logic to return books */ }
},
Mutation: {
createBook(parent, args, context, info) {
/* Logic to create a book */
}
}
}