Created
August 24, 2019 09:26
-
-
Save arminyahya/3944da59031ec3fc0d0944fdab04149b 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
var express = require('express'); | |
var express_graphql = require('express-graphql'); | |
var { schema, root} = require('./schema'); | |
var isAuth = require('./middleware/is-auth'); | |
var app = express(); | |
app.use(isAuth) | |
app.use('/graphql', express_graphql({ | |
schema: schema, | |
rootValue: root, | |
graphiql: true | |
})); | |
app.listen(4000, () => console.log('Express GraphQL Server Now Running On localhost:4000/graphql')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment