Created
October 15, 2019 07:02
-
-
Save nayaabkhan/2a7ffc655b630bd6d38d2255401e758e to your computer and use it in GitHub Desktop.
Merge GraphQL Modules
This file contains hidden or 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 { fileLoader, mergeResolvers, mergeTypes } from 'merge-graphql-schemas' | |
| import * as path from 'path' | |
| const schemaFiles = fileLoader(path.join(__dirname, './**/*.graphql')) | |
| const resolverFiles = fileLoader(path.join(__dirname, './**/resolvers.ts')) | |
| const typeDefs = mergeTypes(schemaFiles, { all: true }) | |
| const resolvers = mergeResolvers(resolverFiles) | |
| export { typeDefs, resolvers } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment