Last active
October 21, 2019 10:20
-
-
Save jericbas/78c4b59a1b3c4422f113b1ca3da0494d to your computer and use it in GitHub Desktop.
extend types in GraphQL is not working in importSchema
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
# const { importSchema } = require("graphql-import"); | |
# importSchema("app/graphql/schema.graphql") | |
# Fixed | |
const { | |
ApolloServer, | |
gql | |
} = require("apollo-server-express"); | |
const fs = require("fs"); | |
const typeDefs = gql` | |
${fs.readFileSync(__dirname.concat("/schema.graphql"), "utf8")} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment