mirror of
https://github.com/vale981/apollo-server
synced 2025-03-05 17:51:40 -05:00
docs: Fix various links in the Apollo Server 2 documentation. (#1375)
Many of these links have changed as a result of page shuffling on other repositories, such as the Engine documentation.
This commit is contained in:
parent
317d61ac00
commit
c94116e9a6
5 changed files with 5 additions and 5 deletions
|
@ -61,7 +61,7 @@ const jsSchema = makeExecutableSchema({
|
|||
|
||||
- `typeDefs` is a required argument and should be an GraphQL schema language string or array of GraphQL schema language strings or a function that takes no arguments and returns an array of GraphQL schema language strings. The order of the strings in the array is not important, but it must include a schema definition.
|
||||
|
||||
- `resolvers` is an optional argument _(empty object by default)_ and should be an object that follows the pattern explained in [documentation on resolvers](../features/resolvers.html).
|
||||
- `resolvers` is an optional argument _(empty object by default)_ and should be an object that follows the pattern explained in the [resolvers documentation](../features/data.html).
|
||||
|
||||
- `logger` is an optional argument, which can be used to print errors to the server console that are usually swallowed by GraphQL. The `logger` argument should be an object with a `log` function, eg. `const logger = { log: e => console.log(e) }`
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ class PersonalizationAPI extends RESTDataSource {
|
|||
|
||||
## Using Memcached/Redis as a cache storage backend
|
||||
|
||||
By default, resource caching will use an in memory LRU cache. When running multiple server instances, you'll want to use a shared cache backend instead. That's why Apollo Server also includes support for using [Memcached](../../../packages/apollo-server-cache-memcached) or [Redis](../../../packages/apollo-server-cache-redis) as your backing store. You can specify which one to use by creating an instance and passing it into the Apollo Server constructor:
|
||||
By default, resource caching will use an in memory LRU cache. When running multiple server instances, you'll want to use a shared cache backend instead. That's why Apollo Server also includes support for using [Memcached](https://memcached.org/) or [Redis](https://redis.io/) as cache stores via the [`apollo-server-cache-memcached`](https://www.npmjs.com/package/apollo-server-cache-memcached) and [`apollo-server-cache-redis`](https://www.npmjs.com/package/apollo-server-cache-redis) packages. You can specify which one to use by creating an instance and passing it into the `ApolloServer` constructor:
|
||||
|
||||
```js
|
||||
const { MemcachedCache } = require('apollo-server-cache-memcached');
|
||||
|
|
|
@ -7,7 +7,7 @@ Understanding the behavior of GraphQL execution inside of Apollo Server is criti
|
|||
|
||||
## Apollo Engine
|
||||
|
||||
Apollo Engine provides an integrated hub for all GraphQL performance data that is free for one million queries per month. With an API key from the [Engine UI](https://engine.apollographql.com/), Apollo Server reports performance and error data out-of-band. Apollo Engine then aggregates and displays information for [queries](https://www.apollographql.com/docs/engine/query-tracking.html), [requests](https://www.apollographql.com/docs/engine/performance.html), the [schema](https://www.apollographql.com/docs/engine/schema-analytics.html), and [errors](https://www.apollographql.com/docs/engine/error-tracking.html). In addition to aggregating data, Apollo Server provides [proactive alerts](https://www.apollographql.com/docs/engine/alerts.html), [daily slack reports](https://www.apollographql.com/docs/engine/reports.html), and [Datadog integration](https://www.apollographql.com/docs/engine/datadog.html).
|
||||
Apollo Engine provides an integrated hub for all GraphQL performance data that is free for one million queries per month. With an API key from the [Engine UI](https://engine.apollographql.com/), Apollo Server reports performance and error data out-of-band. Apollo Engine then aggregates and displays information for [queries](https://www.apollographql.com/docs/engine/features/query-tracking.html), [requests](https://www.apollographql.com/docs/engine/performance.html), the [schema](https://www.apollographql.com/docs/engine/features/performance.html), and [errors](https://www.apollographql.com/docs/engine/features/error-tracking.html). By leveraging this data, Apollo Engine offers [alerts](https://www.apollographql.com/docs/engine/features/alerts.html) via [Slack](https://www.apollographql.com/docs/engine/integrations/slack.html) and [Datadog](https://www.apollographql.com/docs/engine/integrations/datadog.html) integrations.
|
||||
|
||||
To set up Apollo Server with Engine, [click here](https://engine.apollographql.com/) to get an Engine API key. This API key can be passed directly to the Apollo Server constructor.
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Apollo Server provides reporting, persisted queries, and cache-control headers i
|
|||
|
||||
## Stand-alone Apollo Server
|
||||
|
||||
Apollo Server 2 is able to replace all the metrics-reporting functionality which once required the Apollo Engine Proxy. To enable metrics reporting in Apollo Server 2, add `ENGINE_API_KEY` as an environment variable. With this setting enabled, Apollo Server 2 will automatically send execution traces directly to Apollo Engine. In addition, by default, Apollo Server supports [persisted queries](./features/apq.html) without needing the proxy's cache. Apollo Server also sets `Cache-Control` headers for consumption by a CDN. Integrating a CDN provides an alternative to the full response caching inside of Engine proxy.
|
||||
Apollo Server 2 is able to replace all the metrics-reporting functionality which once required the Apollo Engine Proxy. To enable metrics reporting in Apollo Server 2, add `ENGINE_API_KEY` as an environment variable. With this setting enabled, Apollo Server 2 will automatically send execution traces directly to Apollo Engine. In addition, by default, Apollo Server supports [persisted queries](https://www.apollographql.com/docs/guides/performance.html#automatic-persisted-queried) without needing the proxy's cache. Apollo Server also sets `Cache-Control` headers for consumption by a CDN. Integrating a CDN provides an alternative to the full response caching inside of Engine proxy.
|
||||
|
||||
```js
|
||||
const { ApolloServer } = require('apollo-server');
|
||||
|
|
|
@ -45,7 +45,7 @@ server.listen().then(({ url }) => {
|
|||
|
||||
This is just the beginning. We have published a [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) for all of the features we will be bringing to Apollo Server soon and we would love your help! If you have any interest, you can get involved on [Github](https://github.com/apollographql/apollo-server) or by joining the [Apollo Slack](https://www.apollographql.com/slack) and going to the #apollo-server channel.
|
||||
|
||||
## Automatic Persisted Queries ([guide](https://www.apollographql.com/docs/guides/performance.html#Automatic-Persisted-Queries))
|
||||
## Automatic Persisted Queries ([guide](https://www.apollographql.com/docs/guides/performance.html#automatic-persisted-queries))
|
||||
|
||||
A persisted query is an ID or hash that can be sent to the server in place of the GraphQL query string. This smaller signature reduces bandwidth utilization and speeds up client loading times. Apollo Server enables persisted queries without additional server configuration, using an in-memory LRU cache to store the mapping between hash and query string. The persisted query cache can be configured as shown in the following code snippet. To enable persisted queries on the client, follow the [Performance Guide](https://www.apollographql.com/docs/guides/performance.html#Automatic-Persisted-Queries).
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue