Skip to content

Instantly share code, notes, and snippets.

@rafaelaugustos
Created September 3, 2020 01:32
Show Gist options
  • Save rafaelaugustos/c78a12d3cf6813ab89adf419bd5e8c58 to your computer and use it in GitHub Desktop.
Save rafaelaugustos/c78a12d3cf6813ab89adf419bd5e8c58 to your computer and use it in GitHub Desktop.
import { ApolloServer } from 'apollo-server-express'
import { makeExecutableSchema } from 'graphql-tools'
import glue from 'schemaglue'
const { schema, resolver } = glue('src/graphql')
const schemaBuilded = makeExecutableSchema({
typeDefs: schema,
resolvers: resolver
})
const server = new ApolloServer({
schema: schemaBuilded
})
export default server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment