Showing
1 changed file
with
6 additions
and
5 deletions
1 | import path from "path"; | 1 | import path from "path"; |
2 | -import { makeExecutableSchema } from "graphql-tools"; | 2 | +import { makeExecutableSchema } from "@graphql-tools/schema"; |
3 | -import { fileLoader, mergeResolvers, mergeTypes } from "merge-graphql-schemas"; | 3 | +import { mergeTypeDefs, mergeResolvers } from "@graphql-tools/merge"; |
4 | +import { loadFilesSync } from "@graphql-tools/load-files"; | ||
4 | 5 | ||
5 | -const allTypes = fileLoader(path.join(__dirname, "api/**/*.graphql")); | 6 | +const allTypes = loadFilesSync(path.join(__dirname, "api/**/*.graphql")); |
6 | -const allResolvers = fileLoader(path.join(__dirname, "api/**/*.js")); | 7 | +const allResolvers = loadFilesSync(path.join(__dirname, "api/**/*.js")); |
7 | 8 | ||
8 | const schema = makeExecutableSchema({ | 9 | const schema = makeExecutableSchema({ |
9 | - typeDefs: mergeTypes(allTypes), | 10 | + typeDefs: mergeTypeDefs(allTypes), |
10 | resolvers: mergeResolvers(allResolvers), | 11 | resolvers: mergeResolvers(allResolvers), |
11 | }); | 12 | }); |
12 | 13 | ... | ... |
-
Please register or login to post a comment