mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-01-10 05:56:48 -06:00
17 lines
364 B
TypeScript
17 lines
364 B
TypeScript
|
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});
|