concept Apollo Server in category graphql

appears as: Apollo Server
Fullstack GraphQL Applications With GRANDstack

This is an excerpt from Manning's book Fullstack GraphQL Applications With GRANDstack.

  • Apollo is a collection of tools for working with GraphQL, both on the client and the server. Apollo Server is a node.js library for building GraphQL APIs. Apollo Client is a JavaScript GraphQL client that has integrations for many frontend frameworks, including React.
  • Listing 2.12. index.js GraphQL server created with Apollo Server
    const ApolloServer = require('apollo-server'); #1
    
    const server = new ApolloServer({ #2
      typeDefs, #3
      resolvers, #4
      context: { db } #5
    });
    
    server.listen().then(({ url }) => { #6
      console.log(`Server ready at ${url}`);
    });