Skip to content

Instantly share code, notes, and snippets.

@jericbas
Created October 21, 2019 10:12
Show Gist options
  • Save jericbas/d0de0dbecaf177f77a4b0bd519b3dd5b to your computer and use it in GitHub Desktop.
Save jericbas/d0de0dbecaf177f77a4b0bd519b3dd5b to your computer and use it in GitHub Desktop.
extend type 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