mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-04-20 06:37:59 -06:00
17 lines
384 B
TypeScript
17 lines
384 B
TypeScript
import { makeExecutableSchema } from '@graphql-tools/schema';
|
|
import resolvers from'@GraphQL/resolvers';
|
|
import Test from '@GraphQL/schema/Test.gql';
|
|
|
|
// The GraphQL schema
|
|
const rootTypes = `
|
|
type Query {
|
|
test: Test
|
|
}
|
|
type Mutation {
|
|
testMutation: TestMutation
|
|
}
|
|
`;
|
|
|
|
const typeDefs = [ rootTypes, Test ];
|
|
|
|
export default makeExecutableSchema({typeDefs, resolvers}); |