Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const ultimateSchemaString = mergeTypes([
readFileSync('./schema/datamodel.graphql').toString(),
readFileSync('./schema/dataops.graphql').toString(),
readFileSync('./schema/directives.graphql').toString(),
readFileSync('./generated/prisma.graphql').toString()
], {
all: true
});
const ultimateSchema = makeExecutableSchema({
typeDefs: ultimateSchemaString,
resolvers,
directiveResolvers
});
const server = new GraphQLServer({
schema: ultimateSchema,
context: (req) => {
return {
...req,
db: PrismaDBConnection
};
}
});
server.start(() => console.log('Server is running on http://localhost:4000'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.