Skip to content

Instantly share code, notes, and snippets.

@jericbas
Last active October 21, 2019 10:20
Show Gist options
  • Save jericbas/78c4b59a1b3c4422f113b1ca3da0494d to your computer and use it in GitHub Desktop.
Save jericbas/78c4b59a1b3c4422f113b1ca3da0494d to your computer and use it in GitHub Desktop.
extend types in GraphQL is not working in importSchema
# 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