Skip to content

Commit ac36a24

Browse files
committed
Add platform section
1 parent ec8310c commit ac36a24

2 files changed

Lines changed: 99 additions & 3 deletions

File tree

86.2 KB
Loading

docs/source/intro/platform.md

Lines changed: 99 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,100 @@
11
---
2-
title: What is the Apollo platform?
3-
description: Learn about the Apollo graph platform
4-
---
2+
title: The Apollo GraphQL platform
3+
description: How Apollo helps you go from zero to production with GraphQ
4+
---
5+
6+
Apollo is an implementation of GraphQL designed for the needs of product
7+
engineering teams building modern, data-driven applications. It
8+
encourages an agile, incremental approach and takes special care to
9+
avoid requiring any changes to existing APIs and services. Apollo puts
10+
particular emphasis on tooling and workflows.
11+
12+
Apollo is best used as a new layer in your stack that sits between
13+
your services and your applications. It's a combination of open source components, commercial
14+
extensions, and cloud services. The major pieces are:
15+
16+
<div style="text-align:center">
17+
![Graph layer](../img/platform-diagram.png)
18+
</div>
19+
20+
<h2 id="open-source">Core open source components</h2>
21+
22+
* **Apollo Server** is a JavaScript GraphQL server for defining a
23+
*schema* and a set of *resolvers* that implement each part of that
24+
*schema. Typically Apollo Server is extensible: plugins can hook in to each stage of the
25+
request pipeline and server's own lifecycle, making it possible to
26+
implement custom behaviors in add-on packages. Apollo Server supports
27+
AWS Lambda and other serverless environments.
28+
29+
* **Apollo Client** is a sophisticated GraphQL client that
30+
manages data and state in an application. Among other benefits, it
31+
enables a declarative programming style that lets developers define
32+
queries as part of UI components; the client manages all the hairy
33+
details of binding query results to the UI, managing consistency,
34+
caching, and so on. Apollo Client also supports an
35+
exceptionally elegant approach to state managment by *extending* the
36+
GraphQL schema inside the client with additional structure. Apollo Client
37+
includes integrations for React, React Native, Vue, Angular, and
38+
other view layers.
39+
40+
* **iOS and Android** clients, originally contributed by the community,
41+
make it possible to query a GraphQL API from native iOS and
42+
Android applications.
43+
44+
* **Apollo CLI** &mdash; a simple command line client that provides
45+
access to Apollo cloud services.
46+
47+
<h2 id="cloud-services">Cloud services</h2>
48+
49+
* **Schema registry** &mdash; a registry for GraphQL schemas that acts
50+
as a central source of truth for a schema, enriched with additional
51+
metadata like field-level usage statisics.
52+
53+
* **Client registry** &mdash; a registry to track each known consumer
54+
of a schema, which can include both pre-registered and ad-hoc clients.
55+
56+
* **Operation registry** &mdash; a registry of all the known operations
57+
against the schema, which similarly can include both pre-registered
58+
and ad-hoc operations.
59+
60+
* **Trace warehouse** &mdash; a data pipeline and storage layer that
61+
captures structured information about each GraphQL operation
62+
processed by an Apollo Server (or any other server that implements
63+
the Apollo trace API), including the specific set of fields accessed,
64+
the tree of resolver calls that were made with timing data for each,
65+
and important metadata such as client's identity and which version
66+
of the schema was queried.
67+
68+
<h2 id="gateway">Gateway</h2>
69+
70+
* **Apollo Gateway** &mdash; A configuration of Apollo Server and additional plugins
71+
that functions as a GraphQL gateway. The gateway composes separately deployed "micro-schemas" that reference each other into a single master schema, which looks to a client just like any regular GraphQL schema. To answer queries, the gateway builds a query plan, fetches data from each upstream GraphQL service, and assembles it all back together into a single result.
72+
73+
<h2 id="workflows">Workflows</h2>
74+
75+
On top of these components, Apollo implements some useful workflows for
76+
managing a GraphQL API. Each of these workflows makes use of several
77+
different parts of the platform, working together. Some examples are:
78+
79+
<h3 id="schema-validation">Schema change validation</h3>
80+
81+
Apollo includes a facility for checking the compatibility of a given
82+
schema against a set of previously-observed operations. This uses the
83+
trace warehouse, operation registry, and (typically) the client
84+
registry. As an example, an operation that references a missing field or
85+
an operation that doesn't pass a required argument to a field would
86+
cause an incompatibility error. The compatibility check runs statically,
87+
taking advantage of the schema's type definitions, so it doesn't require
88+
a running server.
89+
90+
<h3 id="safelisting">Safelisting</h3>
91+
92+
Apollo provides an end-to-end mechanism for *safelisting* known clients
93+
and queries, a recommended best practice that limits production use of a
94+
GraphQL API to specific pre-arranged operations. There are two parts
95+
here. First, the Apollo CLI extracts all the queries from a client
96+
codebase, computes the over-the-wire subset of the query (stripping out
97+
the part that references the client's local schema), and stores it in
98+
the operation registry. Separately, an Apollo Server plugin synchronizes
99+
the list of pre-registered operations to the server, which then rejects
100+
queries that aren't present in its local copy.

0 commit comments

Comments
 (0)