create-node-ts-graphql-server/GraphQL/schema/index.ts
Alejandro Lembke Barrientos b55b0f61a9 PR-448199:
Adding files from first version.
Creating GraphQL server with their controllers and their models, squema and resolvers.
Adding support to webpack and typescript.
2022-05-25 21:08:50 +00:00

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});