You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/tutorial/production.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,17 @@ You need the following before deployment:
14
14
15
15
Now looks for a `start` script in the `package.json` file to start the app. Once the script is present, Now will be able to start the app.
16
16
17
-
Go ahead and run the `now` command from the root directory of the app.
17
+
Go ahead and run the `now` command from the root directory of the app to deploy our app to Now.
18
18
19
19
```bash
20
20
$ now
21
21
```
22
22
23
-
The `now` command immediately deploys your graph API to the cloud and returns the hosted URL. The returned URL comes in this format: `<NOW_APP_NAME>.now.sh`.
23
+
The `now` command immediately deploys our graph API to the cloud and returns the hosted URL. The returned URL comes in this format: `<NOW_APP_NAME>.now.sh`.
24
24
25
-
You can now query your graph service at `<NOW_APP_NAME>.now.sh/graphql`.
25
+
You can now query the graph service at `<NOW_APP_NAME>.now.sh/graphql`.
26
26
27
-
Now also supports direct deployment from a GitHub repository. If your graph API is publicly available on GitHub, you can deploy it via the `now` command like so:
27
+
**Note:**Now also supports direct deployment from a GitHub repository. If your graph API is publicly available on GitHub, you can deploy it via the `now` command like so:
28
28
29
29
```bash
30
30
now <github-username>/<repository-name>
@@ -36,25 +36,27 @@ Safely evolving your schema overtime requires a lot of developer efforts in ensu
36
36
37
37
[Apollo Engine](https://engine.apollographql.com), provides deep insights into your graph layer that enables you to understand, optimize, and control your graph service in production with confidence.
38
38
39
-
Once you publish your schema to Apollo Engine, it becomes the basis for comparison for validating future schemas and avoiding breaking changes. Therefore, a schema should be re-published to Apollo Engine each time a new schema is deployed.
39
+
Once we publish our schema to Apollo Engine, it becomes the basis for comparison for validating future schemas and avoiding breaking changes. Therefore, a schema should be re-published to Apollo Engine each time a new schema is deployed.
40
40
41
41
Go ahead and install the `apollo` CLI via npm:
42
42
43
43
```bash
44
44
npm install --global apollo
45
45
```
46
46
47
-
To publish a schema, start your GraphQL server and run the command below:
47
+
To publish our schema to Apollo Engine, we need an API key.
48
+
49
+
An API key can be obtained from a graph service’s _Settings_ menu within the [Apollo Engine dashboard](https://engine.apollographql.com).
50
+
51
+
Now start your GraphQL server and run the command below:
48
52
49
53
```bash
50
54
apollo schema:publish --key="<API_KEY>" --endpoint="https://<now_app_name>.now.sh/graphql"
51
55
```
52
56
53
-
**Note:** An API key can be obtained from a graph service’s _Settings_ menu within the [Apollo Engine dashboard](https://engine.apollographql.com).
54
-
55
57
The `--endpoint` flag should be set to the URL of a running GraphQL server.
56
58
57
-
Every time your schema is updated, run the `apollo schema:publish` command so that Apollo Engine can provide a history of schema changes. This allows everyone on your team to know when new types and fields are added or removed. Apollo Engine also provides a reference to the commits that introduced changes to the schema.
59
+
Every time the schema is updated, run the `apollo schema:publish` command so that Apollo Engine can provide a history of schema changes. This allows everyone on your team to know when new types and fields are added or removed. Apollo Engine also provides a reference to the commits that introduced changes to the schema.
58
60
59
61
To check the difference between the current schema and a newly published schema version, you can run the command below:
60
62
@@ -72,9 +74,7 @@ Apollo Engine identifies three categories of changes and report them to the deve
72
74
73
75
You need a bird's-eye view of your graph's API. Understanding how your schema fields, and queries operates within your graph service opens you to a whole new world of effective optimization and scaling!
74
76
75
-
In order to get access to your graph's performance metrics, hook up Apollo Server with Engine.
76
-
77
-
First, get an API key from [Engine](https://engine.apollographql.com). Now, connect to Engine by passing the API key to the Apollo Server constructor:
77
+
In order to get access to your graph's performance metrics, hook up Apollo Server with Engine. Connect to Engine by passing the API key to the Apollo Server constructor:
78
78
79
79
_src/index.js_
80
80
@@ -100,7 +100,6 @@ Apollo Engine provides all of the following features highlighted below:
100
100
***Schema Explorer:** With Engine's powerful schema registry, you can quickly explore all the types and fields in your schema with usage statistics on each field. This metric makes you understand the cost of a field. How expensive is a field? Is a certain field in so much demand?
101
101
***Schema history:** Apollo Engine’s schema history allows developers to confidently iterate a graph's schema by validating the new schema against field-level usage data from the previous schema. This empowers developers to avoid breaking changes by providing insights into which clients will be broken by a new schema.
102
102
***Performance Analytics:** Fine-grained insights into every field, resolvers and operations of your graph's execution.
103
-
***Query tracing:** The _Trace view_ in the Engine UI allows you to look at a detailed breakdown of the execution of one query, with timing for every resolver.
104
103
***Performance alerts:** You can configure notifications to be sent to various channels like Slack, and PagerDuty. Apollo Engine can be set to send alerts when a request rate, duration or error rate exceeds a certain threshold. You can effectively monitor everything going on in your graph's service.
105
104
106
105
The [Engine](https://www.apollographql.com/docs/engine/) guide provides detailed instructions on how Apollo Engine works and the setup for any type for performance or usage analytics.
0 commit comments