create-node-ts-graphql-server/GraphQL/schema/index.ts

17 lines
364 B
TypeScript
Raw Normal View History

import { makeExecutableSchema } from '@graphql-tools/schema';
import resolvers from'../resolvers';
import Test from './Test.gql';
// The GraphQL schema
const rootTypes = `
type Query {
test: Test
}
type Mutation {
testMutation: TestMutation
}
`;
const typeDefs = [ rootTypes, Test ];
export default makeExecutableSchema({typeDefs, resolvers});