Created
September 3, 2020 01:32
-
-
Save rafaelaugustos/c78a12d3cf6813ab89adf419bd5e8c58 to your computer and use it in GitHub Desktop.
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
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