Skip to content

Instantly share code, notes, and snippets.

@DavyBello
Last active January 21, 2019 15:21
Show Gist options
  • Save DavyBello/8985dd0a7f4f9cb2c93f0d1bcdad51bd to your computer and use it in GitHub Desktop.
Save DavyBello/8985dd0a7f4f9cb2c93f0d1bcdad51bd to your computer and use it in GitHub Desktop.
graphql-social-auth Tutorial
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