Last active
January 21, 2019 15:21
-
-
Save DavyBello/8985dd0a7f4f9cb2c93f0d1bcdad51bd to your computer and use it in GitHub Desktop.
graphql-social-auth Tutorial
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
const { ApolloServer, gql } = require('apollo-server'); | |
// The GraphQL schema | |
const typeDefs = gql` | |
type Query { | |
"A simple type for getting started!" | |
hello: String | |
} | |
`; | |
// A map of functions which return data for the schema. | |
const resolvers = { | |
Query: { | |
hello: () => 'world' | |
} | |
}; | |
const server = new ApolloServer({ | |
typeDefs, | |
resolvers, | |
}); | |
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