Created
January 21, 2019 20:44
-
-
Save DavyBello/2b9e14b85029118e1fc61fb79bdb619c to your computer and use it in GitHub Desktop.
graphql-social-auth Tutorial
This file contains 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
require('./mongoose'); | |
const { ApolloServer } = require('apollo-server'); | |
const typeDefs = require('./typeDefs'); | |
const resolvers = require('./resolvers'); | |
const server = new ApolloServer({ | |
typeDefs, | |
resolvers, | |
// add request and response to graphQL context | |
context: ({ req, res }) => ({ req, res }), | |
}); | |
server.listen().then(({ url }) => { | |
console.log(`🚀 Server ready at ${url}`) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment