Skip to content

Commit 6d15332

Browse files
docs: rephrase a few sentences
1 parent 46e9699 commit 6d15332

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

content/graphql/plugins.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
### Plugins
2-
3-
#### For `@nestjs/apollo` driver
1+
### Plugins with Apollo
42

53
Plugins enable you to extend Apollo Server's core functionality by performing custom operations in response to certain events. Currently, these events correspond to individual phases of the GraphQL request lifecycle, and to the startup of Apollo Server itself (read more [here](https://www.apollographql.com/docs/apollo-server/integrations/plugins/)). For example, a basic logging plugin might log the GraphQL query string associated with each request that's sent to Apollo Server.
64

@@ -49,13 +47,13 @@ GraphQLModule.forRoot({
4947

5048
> info **Hint** The `ApolloServerOperationRegistry` plugin is exported from the `@apollo/server-plugin-operation-registry` package.
5149
52-
#### For `@nestjs/mercurius` driver
50+
#### Plugins with Mercurius
5351

54-
Some mercurius specific fastify plugins have to be loaded after the mercurius plugin (read more [here](https://mercurius.dev/#/docs/plugins)) on the plugin tree.
52+
Some of the existing mercurius-specific Fastify plugins must be loaded after the mercurius plugin (read more [here](https://mercurius.dev/#/docs/plugins)) on the plugin tree.
5553

5654
> warning **Warning** [mercurius-upload](https://github.com/mercurius-js/mercurius-upload) is an exception and should be registered in the main file.
5755
58-
There is an optional `plugins` array parameter inside the `MercuriusDriver`, this array takes an object with the plugin function on the `plugin` parameter and its options inside an optional `options` parameter. Therefore, registering the [cache plugin](https://github.com/mercurius-js/cache) would be as follows:
56+
For this, `MercuriusDriver` exposes an optional `plugins` configuration option. It represents an array of objects that consist of two attributes: `plugin` and its `options`. Therefore, registering the [cache plugin](https://github.com/mercurius-js/cache) would look like this:
5957

6058
```typescript
6159
GraphQLModule.forRoot({

0 commit comments

Comments
 (0)