Created
July 20, 2016 18:03
-
-
Save callmephilip/4c73fb95543ad88ea25ca6d329fd5bf9 to your computer and use it in GitHub Desktop.
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
import graphqlHTTP from 'express-graphql'; | |
const app = express(); | |
app.use('/graphql', graphqlHTTP(function(request) { | |
return { | |
schema: MyGraphQLSchema, | |
graphiql: true, | |
context: sessionToken: request.headers && request.headers.authorization | |
}; | |
})); | |
app.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment