Created
May 28, 2020 09:31
-
-
Save mugan86/c743b0c4a52cf5d88a625a81ab7f0983 to your computer and use it in GitHub Desktop.
Schema GraphQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'graphql-import-node'; | |
import { makeExecutableSchema } from 'graphql-tools'; | |
import { GraphQLSchema } from 'graphql'; | |
import resolvers from '../resolvers/resolverMap'; | |
import { mergeTypeDefs } from '@graphql-tools/merge'; | |
import { loadFilesSync } from '@graphql-tools/load-files'; | |
const typeDefs = mergeTypeDefs(loadFilesSync(`${__dirname}/**/*.graphql`)); | |
const schema: GraphQLSchema = makeExecutableSchema({ | |
typeDefs, | |
resolvers | |
}); | |
export default schema; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment