HomeToolsAbout a20k

Apollo

What is it

An open-source library for server-side GraphQL operation handling

import { ApolloClient, HttpLink } from '@apollo/client'; const client = new ApolloClient({ link: new HttpLink({ uri: 'your client uri goes here', fetchOptions: { ... } }), });

Query = Request

Resolver

  • how and where to fetch the data corresponding to a field
  • API schema and database schemas are decoupled with GraphQL
    • e.g. resolver can be used to create a missing country field on an address schema

Schema = GraphQL has a typed schema system

Apollo vs GraphQL

Apollo is set of tools for working with GraphQL

  • It is primarily an open-source library for server-side GraphQL operation handling

Apollo has both client and server libraries

  • Server library helps you build the GQL APIs
  • Client library helps you consume the APIs from your front end application
© VincentVanKoh