diff --git a/docs/_config.yml b/docs/_config.yml index d20ac69..1df6436 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -23,8 +23,8 @@ sidebar_categories: Platform: - platform/schema-registry - - platform/client-awareness - platform/schema-validation + - platform/client-awareness - platform/operation-registry - platform/editor-plugins - platform/tracing diff --git a/docs/source/images/schema-checks.png b/docs/source/images/schema-checks.png new file mode 100644 index 0000000..b397296 Binary files /dev/null and b/docs/source/images/schema-checks.png differ diff --git a/docs/source/images/schema-history.png b/docs/source/images/schema-history.png new file mode 100644 index 0000000..e45a692 Binary files /dev/null and b/docs/source/images/schema-history.png differ diff --git a/docs/source/img/schema-validation/service-checks.png b/docs/source/img/schema-validation/service-checks.png new file mode 100644 index 0000000..56c37b2 Binary files /dev/null and b/docs/source/img/schema-validation/service-checks.png differ diff --git a/docs/source/platform/schema-registry.md b/docs/source/platform/schema-registry.md index c0d4e59..caba4b8 100644 --- a/docs/source/platform/schema-registry.md +++ b/docs/source/platform/schema-registry.md @@ -1,102 +1,92 @@ --- -title: Registering your schema -description: How to publish your schema to the Apollo registry +title: Tracking schema change history +description: Connect to the Apollo schema registry and track changes in your schema over time --- -A schema is the center point of all GraphQL applications. It powers incredible development tools, is an always up to date set of documentation, and creates an enforcable contract between clients and servers through validation. Since this is such a center point of how teams work on GraphQL, the Apollo GraphQL Platform provides a free schema registry for teams of all sizes to use. In storing a schema in the registry, teams can share an always up to date picture of their data model into every facet of their workflow. +As GraphQL scales in an organization, teams often find that growing and evolving their schema over time becomes difficult to manage. Product teams want to move fast with GraphQL, but they also want reassurance that their code changes won't break existing clients. At scale, you might have hundreds of clients querying against a single schema. How can we ensure that adding or removing a field, type, or argument won't break existing clients and cause a service outage? -
+
+
+
+The Service Check page in Engine will have full details on the changes in the diff and which clients are affected by the changes, if any.
+
+> **Note:** If you [set up your checks on GitHub](#github), the "Details" link in your checks will take you to this special URL as well.
+
+An open-source implementation of GraphQL that helps you manage data between the cloud and your UI. The Apollo platform is pluggable into your existing architecture and features production-ready tooling across the stack ([Server](https://www.apollographql.com/docs/apollo-server/getting-started.html), [Client](https://www.apollographql.com/docs/react/), and [Engine](https://www.apollographql.com/docs/engine/)).
@@ -104,7 +102,6 @@ type User {Special fields in the Graphql response that allows you to attach extra metadata. [Apollo tracing](https://github.com/apollographql/apollo-server/tree/master/packages/apollo-tracing) is an example of an extension.
-A unit of data you are asking for in a Schema, which ends up as a field in your JSON response data.
@@ -118,7 +115,6 @@ type Author { `id`, `firstName`, and `lastName` are fields in the Author type above. -A selection set that can be reused in multiple query operations. A [GraphQL fragment](https://www.apollographql.com/docs/react/advanced/fragments.html) is a shared piece of query logic.
@@ -152,6 +148,9 @@ const typeDefs = gql`An in-browser IDE for GraphQL development and workflow. Added benefits exist such as theme change, automatic schema reloading, HTTP headers configuration, query history and GraphQL subscription support. In addition, it comes [out-of-the-box in Apollo Server 2](https://www.apollographql.com/docs/apollo-server/features/graphql-playground.html).
+The server that contains a GraphQL schema and the ability to run it. Services have runtime information, and through features of the Apollo Platform they can send metrics and maintain a history of the schemas that have been run on that service in the past.
+An in-browser IDE for GraphQL development.
@@ -184,14 +183,17 @@ mutation AddTodo($type: String!) {A technique for transforming the response of a query operation before saving it to the store by [Apollo Client's `InMemoryCache`](https://www.apollographql.com/docs/react/advanced/caching.html#normalization). The result is split into individual objects, creating a unique identifier for each object, and storing those objects in a flattened data structure.
```js -import { InMemoryCache, defaultDataIdFromObject } from 'apollo-cache-inmemory'; +import { InMemoryCache, defaultDataIdFromObject } from "apollo-cache-inmemory"; const cache = new InMemoryCache({ dataIdFromObject: object => { switch (object.__typename) { - case 'foo': return object.key; // use `key` as the primary key - case 'bar': return `bar:${object.blah}`; // use `bar` prefix and `blah` as the primary key - default: return defaultDataIdFromObject(object); // fall back to default handling + case "foo": + return object.key; // use `key` as the primary key + case "bar": + return `bar:${object.blah}`; // use `bar` prefix and `blah` as the primary key + default: + return defaultDataIdFromObject(object); // fall back to default handling } } }); @@ -243,21 +245,20 @@ query getHuman { ```js const GET_DOG_PHOTO = gql` - query dog($breed: String!) { - dog(breed: $breed) { - id - displayImage + query dog($breed: String!) { + dog(breed: $breed) { + id + displayImage + } } -}`; +`; export const queryComponent = ({ breed }) => (A GraphQL [schema](https://www.apollographql.com/docs/apollo-server/essentials/schema.html) is at the center of any GraphQL server implementation and describes the functionality available to the clients which connect to it.
-The syntax for writing GraphQL Schemas. It is otherwise known as Interface Definition Language. It is the lingua franca shared by all for building GraphQL APIs regardless of the programming language chosen.
@@ -315,19 +314,15 @@ type Query {A [development approach](https://www.apollographql.com/docs/fundamentals/tips.html#schema) for designing and building modern UIs that involves the frontend and backend teams agreeing on a Schema first, which serves as a contract between the UI and the backend before any API engineering happens.
-A central source of truth for your schema in Apollo Engine. It enables schema registration, schema validation, tracking of detailed schema changes e.g. types added, fields added, fields deprecated and looking up previous versions of schema.
-Refers to the need to evolve a schema over time. As a schema evolves, there is a potential for introducing breaking changes to clients. The Apollo CLI assists schema evolution by validating schema changes and checking for breaking changes using Apollo Engine. Read more in the [versioning guide](https://www.apollographql.com/docs/guides/versioning.html).
-The process of merging [different schemas into one GraphQL schema](./docs/graphql-tools/schema-stitching.html). These schemas can be local, remote or from third party services. In a microservice-style deployment model, where your data exists across multiple APIs, Schema stitching makes it possible to combine all of them into one schema that can be queried for all the data at once.
-A real-time GraphQL operation. A [Subscription](https://www.apollographql.com/docs/apollo-server/features/subscriptions.html) is defined in a schema like queries and mutations.
@@ -347,7 +342,6 @@ subscription onCommentAdded($repoFullName: String!){A type that qualifies the data a GraphQL field resolves. GraphQL ships with some scalar types out of the box; **Int**, **Float**, **String**, **Boolean** and **ID**. However, a [custom scalar](https://www.apollographql.com/docs/graphql-tools/scalars.html#custom-scalars) type such as **Date** can be specified in a GraphQL service implementation.
-A collection of types which characterizes the set of data that can be validated, queried and executed on a GraphQL API.
@@ -356,8 +350,8 @@ subscription onCommentAdded($repoFullName: String!){ A value that can be passed to an operation. Variables can be used to fill arguments, or be passed to directives. ```graphql -query GetUser($userId: ID!){ - user(id: $userId){ +query GetUser($userId: ID!) { + user(id: $userId) { firstName } } @@ -368,15 +362,17 @@ In the query above, `userId` is a variable. The variable and its type is declare The userId variable would be passed to the operation by `apollo-client` like this: ```js -client.query({ query: getUserQuery, variables: { userId: 1 }}); +client.query({ query: getUserQuery, variables: { userId: 1 } }); ``` -In `react-apollo` it would be passed like this: +In `react-apollo` it would be passed like this: ```jsx -A technique used to cache entire results of GraphQL queries. This process improves performance by preventing the fetching of the same results from the server if it has been obtained before. Check out the [Apollo performance guide](../guides/performance.html).
diff --git a/docs/source/tutorial/client.md b/docs/source/tutorial/client.md index 623a4d4..8fec162 100644 --- a/docs/source/tutorial/client.md +++ b/docs/source/tutorial/client.md @@ -130,7 +130,7 @@ Open `src/index.js` and add the following lines of code: _src/index.js_ -```js +```js lines=1,4,6 import { ApolloProvider } from 'react-apollo'; import React from 'react'; import ReactDOM from 'react-dom';