From 5ec8609b5453a0b950d3eef4ac23a301b4b0362a Mon Sep 17 00:00:00 2001 From: Ben Irvin Date: Thu, 9 Jan 2025 13:11:28 +0100 Subject: [PATCH 01/11] enhancement: add landingPage config --- docusaurus/docs/dev-docs/plugins/graphql.md | 161 +++++++++++++++++--- 1 file changed, 140 insertions(+), 21 deletions(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index cf204ff369..c01cc81858 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -53,35 +53,51 @@ npm install @strapi/plugin-graphql -Then, start your app and open your browser at [http://localhost:1337/graphql](http://localhost:1337/graphql). You should now be able to access the **GraphQL Playground** that will help you to write your GraphQL queries and mutations. +Then, start your app and open your browser at [http://localhost:1337/graphql](http://localhost:1337/graphql). You should now be able to access the **GraphQL Sandbox** that will help you to write your GraphQL queries and mutations. :::note -The GraphQL Playground is enabled by default for both the development and staging environments, but disabled in production environments. Set the `playgroundAlways` configuration option to `true` to also enable the GraphQL Playground in production environments (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql)). +The GraphQL Sandbox is enabled by default in all environments except production. Set the `landingPage` configuration option to `true` to also enable the GraphQL Playground in production environments (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql-configuration)). ::: ## Configuration -Plugins configuration are defined in the `config/plugins.js` file. This configuration file can include a `graphql.config` object to define specific configurations for the GraphQL plugin (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql)). +Plugins configuration are defined in the `config/plugins.js` file. This configuration file can include a `graphql.config` object to define specific configurations for the GraphQL plugin (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql-configuration)). -[Apollo Server](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#apolloserver) options can be set with the `graphql.config.apolloServer` [configuration object](/dev-docs/configurations/plugins#graphql). Apollo Server options can be used for instance to enable the [tracing feature](https://www.apollographql.com/docs/federation/metrics/), which is supported by the GraphQL playground to track the response time of each part of your query. From `Apollo Server` version 3.9 default cache option is `cache: 'bounded'`. You can change it in the `apolloServer` configuration. For more information visit [Apollo Server Docs](https://www.apollographql.com/docs/apollo-server/performance/cache-backends/). +[Apollo Server](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#apolloserver) options can be passed directly to Apollo with the `graphql.config.apolloServer` [configuration object](/dev-docs/configurations/plugins#graphql-configuration). Apollo Server options can be used for instance to enable the [tracing feature](https://www.apollographql.com/docs/federation/metrics/), which is supported by the GraphQL Sandbox to track the response time of each part of your query. The `Apollo Server` default cache option is `cache: 'bounded'`. You can change it in the `apolloServer` configuration. For more information visit [Apollo Server Docs](https://www.apollographql.com/docs/apollo-server/performance/cache-backends/). :::caution The maximum number of items returned by the response is limited to 100 by default. This value can be changed using the `amountLimit` configuration option, but should only be changed after careful consideration: a large query can cause a DDoS (Distributed Denial of Service) and may cause abnormal load on your Strapi server, as well as your database server. ::: +## GraphQL Configuration Options + +Here is a detailed list of configuration options supported by the GraphQL plugin. These options can be defined in the `config/plugins.js` (JavaScript) or `config/plugins.ts` (TypeScript) file. + +| Option | Type | Description | Default Value | Notes | +| ------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | --------------------------------------------------- | +| `endpoint` | String | Sets the GraphQL endpoint path. | `'/graphql'` | Example: `/custom-graphql` | +| `shadowCRUD` | Boolean | Enables or disables automatic schema generation for content types. | `true` | | +| `depthLimit` | Number | Limits the depth of GraphQL queries to prevent excessive nesting. | `10` | Use this to mitigate potential DoS attacks. | +| `amountLimit` | Number | Limits the maximum number of items returned in a single response. | `100` | Use cautiously to avoid performance issues. | +| `playgroundAlways` | Boolean | [Deprecated] Enables GraphQL Playground in all environments (deprecated). | `false` | Prefer using `landingPage` instead. | +| `landingPage` | Boolean \| Function | Enables or disables the landing page for GraphQL. Accepts a boolean or a function returning a boolean or an ApolloServerPlugin implementing `renderLandingPage`. | | `false` in production, `true` in other environments | +| `apolloServer` | Object | Passes configuration options directly to Apollo Server. | `{}` | Example: `{ tracing: true }` | + +### Example + +Below is an example of how to use these options in a Strapi configuration file: + -```js title="./config/plugins.js" - +```javascript title="./config/plugins.js" module.exports = { - // graphql: { config: { endpoint: '/graphql', shadowCRUD: true, - playgroundAlways: false, + landingPage: false, // disable Sandbox everywhere depthLimit: 7, amountLimit: 100, apolloServer: { @@ -97,18 +113,63 @@ module.exports = { ```ts title="./config/plugins.ts" - export default { - // graphql: { config: { endpoint: '/graphql', shadowCRUD: true, - playgroundAlways: false, + landingPage: false, // disable Sandbox everywhere depthLimit: 7, amountLimit: 100, - apolloServer: { - tracing: false, + }, + }, +}; +``` + + + + + +Here is an example of using a function to dynamically enable it: + + + + + +```javascript title="./config/plugins.js" +module.exports = { + graphql: { + config: { + endpoint: '/graphql', + shadowCRUD: true, + landingPage: (strapi) => { + if (env("NODE_ENV") !== "production") { + return true; + } else { + return false; + } + }, + }, + }, +}; +``` + + + + + +```ts title="./config/plugins.ts" +export default { + graphql: { + config: { + endpoint: '/graphql', + shadowCRUD: true, + landingPage: (strapi) => { + if (env("NODE_ENV") !== "production") { + return true; + } else { + return false; + } }, }, }, @@ -119,6 +180,66 @@ export default { +### CORS exceptions for Landing Page + +If the landing page is enabled in production environments (which is not recommended), CORS headers for the Apollo Server landing page must be added manually. + +To add them globally, you can merge the following into your middleware configuration: + +``` +{ + name: "strapi::security", + config: { + contentSecurityPolicy: { + useDefaults: true, + directives: { + "connect-src": ["'self'", "https:", "apollo-server-landing-page.cdn.apollographql.com"], + "img-src": ["'self'", "data:", "blob:", "apollo-server-landing-page.cdn.apollographql.com"], + "script-src": ["'self'", "'unsafe-inline'", "apollo-server-landing-page.cdn.apollographql.com"], + "style-src": ["'self'", "'unsafe-inline'", "apollo-server-landing-page.cdn.apollographql.com"], + "frame-src": ["sandbox.embed.apollographql.com"] + } + } + } +} +``` + +To add these exceptions only for the /graphql path (recommended), you can create a new middleware to handle it. For example: + + + + + +```javascript title="./middlewares/graphql-security.js" +module.exports = (config, { strapi }) => { + return async (ctx, next) => { + if (ctx.request.path === '/graphql') { + ctx.set('Content-Security-Policy', "default-src 'self'; script-src 'self' 'unsafe-inline' cdn.jsdelivr.net apollo-server-landing-page.cdn.apollographql.com; connect-src 'self' https:; img-src 'self' data: blob: apollo-server-landing-page.cdn.apollographql.com; media-src 'self' data: blob: apollo-server-landing-page.cdn.apollographql.com; frame-src sandbox.embed.apollographql.com; manifest-src apollo-server-landing-page.cdn.apollographql.com;"); + } + await next(); + }; +}; +``` + + + + + +```ts title="./middlewares/graphql-security.ts" +export default (config, { strapi }) => { + return async (ctx, next) => { + if (ctx.request.path === '/graphql') { + ctx.set('Content-Security-Policy', "default-src 'self'; script-src 'self' 'unsafe-inline' cdn.jsdelivr.net apollo-server-landing-page.cdn.apollographql.com; connect-src 'self' https:; img-src 'self' data: blob: apollo-server-landing-page.cdn.apollographql.com; media-src 'self' data: blob: apollo-server-landing-page.cdn.apollographql.com; frame-src sandbox.embed.apollographql.com; manifest-src apollo-server-landing-page.cdn.apollographql.com;"); + } + await next(); + }; +}; +``` + + + + + ## Shadow CRUD To simplify and automate the build of the GraphQL schema, we introduced the Shadow CRUD feature. It automatically generates the type definitions, queries, mutations and resolvers based on your models. @@ -940,15 +1061,14 @@ mutation { -Then on each request, send along an `Authorization` header in the form of `{ "Authorization": "Bearer YOUR_JWT_GOES_HERE" }`. This can be set in the HTTP Headers section of your GraphQL Playground. - +Then on each request, send along an `Authorization` header in the form of `{ "Authorization": "Bearer YOUR_JWT_GOES_HERE" }`. This can be set in the HTTP Headers section of your GraphQL Sandbox. ## API tokens To use API tokens for authentication, pass the token in the `Authorization` header using the format `Bearer your-api-token`. :::note -Using API tokens in the the GraphQL playground requires adding the authorization header with your token in the `HTTP HEADERS` tab: +Using API tokens in the the GraphQL Sandbox requires adding the authorization header with your token in the `HTTP HEADERS` tab: ```http { @@ -963,15 +1083,14 @@ Replace `` with your API token generated in the Strapi Admin panel. GraphQL is a query language allowing users to use a broader panel of inputs than traditional REST APIs. GraphQL APIs are inherently prone to security risks, such as credential leakage and denial of service attacks, that can be reduced by taking appropriate precautions. +### Disable introspection and Sandbox in production -### Disable introspection and playground in production - -In production environments, disabling the GraphQL Playground and the introspection query is recommended. -If you haven't edited the [configuration file](/dev-docs/configurations/plugins#graphql), it is already disabled in production by default. +In production environments, disabling the GraphQL Sandbox and the introspection query is strongly recommended. +If you haven't edited the [configuration file](/dev-docs/configurations/plugins#graphql-configuration), it is already disabled in production by default. ### Limit max depth and complexity -A malicious user could send a query with a very high depth, which could overload your server. Use the `depthLimit` [configuration parameter](/dev-docs/configurations/plugins#graphql) to limit the maximum number of nested fields that can be queried in a single request. By default, `depthLimit` is set to 10 but can be set to a higher value during testing and development. +A malicious user could send a query with a very high depth, which could overload your server. Use the `depthLimit` [configuration parameter](/dev-docs/configurations/plugins#graphql-configuration) to limit the maximum number of nested fields that can be queried in a single request. By default, `depthLimit` is set to 10 but can be set to a higher value during testing and development. :::tip To increase GraphQL security even further, 3rd-party tools can be used. See the guide about [using GraphQL Armor with Strapi on the forum](https://forum.strapi.io/t/use-graphql-armor-with-strapi/). From 7c9be00ee5682007fd5173329a14b1cc9439413f Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 9 Jan 2025 16:33:01 +0100 Subject: [PATCH 02/11] Fix broken anchor --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index c01cc81858..3940a4b030 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -1090,7 +1090,7 @@ If you haven't edited the [configuration file](/dev-docs/configurations/plugins# ### Limit max depth and complexity -A malicious user could send a query with a very high depth, which could overload your server. Use the `depthLimit` [configuration parameter](/dev-docs/configurations/plugins#graphql-configuration) to limit the maximum number of nested fields that can be queried in a single request. By default, `depthLimit` is set to 10 but can be set to a higher value during testing and development. +A malicious user could send a query with a very high depth, which could overload your server. Use the `depthLimit` [configuration parameter](/dev-docs/configurations/plugins#graphql) to limit the maximum number of nested fields that can be queried in a single request. By default, `depthLimit` is set to 10 but can be set to a higher value during testing and development. :::tip To increase GraphQL security even further, 3rd-party tools can be used. See the guide about [using GraphQL Armor with Strapi on the forum](https://forum.strapi.io/t/use-graphql-armor-with-strapi/). From 52b053476c5c26e0b15c4d583b2266c65b177629 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 9 Jan 2025 16:33:26 +0100 Subject: [PATCH 03/11] Fix broken anchor --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index 3940a4b030..a3c33d80ca 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -56,7 +56,7 @@ npm install @strapi/plugin-graphql Then, start your app and open your browser at [http://localhost:1337/graphql](http://localhost:1337/graphql). You should now be able to access the **GraphQL Sandbox** that will help you to write your GraphQL queries and mutations. :::note -The GraphQL Sandbox is enabled by default in all environments except production. Set the `landingPage` configuration option to `true` to also enable the GraphQL Playground in production environments (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql-configuration)). +The GraphQL Sandbox is enabled by default in all environments except production. Set the `landingPage` configuration option to `true` to also enable the GraphQL Playground in production environments (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql)). ::: ## Configuration From b09591456538708568f57c03a99f861d6a7c7b03 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 9 Jan 2025 16:33:48 +0100 Subject: [PATCH 04/11] Fix broken anchor --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index a3c33d80ca..4d5c669ea7 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -61,7 +61,7 @@ The GraphQL Sandbox is enabled by default in all environments except production. ## Configuration -Plugins configuration are defined in the `config/plugins.js` file. This configuration file can include a `graphql.config` object to define specific configurations for the GraphQL plugin (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql-configuration)). +Plugins configuration are defined in the `config/plugins.js` file. This configuration file can include a `graphql.config` object to define specific configurations for the GraphQL plugin (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql)). [Apollo Server](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#apolloserver) options can be passed directly to Apollo with the `graphql.config.apolloServer` [configuration object](/dev-docs/configurations/plugins#graphql-configuration). Apollo Server options can be used for instance to enable the [tracing feature](https://www.apollographql.com/docs/federation/metrics/), which is supported by the GraphQL Sandbox to track the response time of each part of your query. The `Apollo Server` default cache option is `cache: 'bounded'`. You can change it in the `apolloServer` configuration. For more information visit [Apollo Server Docs](https://www.apollographql.com/docs/apollo-server/performance/cache-backends/). From dd48904eec62592952b2992b85935356f5450f12 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 9 Jan 2025 16:34:12 +0100 Subject: [PATCH 05/11] Fix broken anchor --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index 4d5c669ea7..baac53a434 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -63,7 +63,7 @@ The GraphQL Sandbox is enabled by default in all environments except production. Plugins configuration are defined in the `config/plugins.js` file. This configuration file can include a `graphql.config` object to define specific configurations for the GraphQL plugin (see [plugins configuration documentation](/dev-docs/configurations/plugins#graphql)). -[Apollo Server](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#apolloserver) options can be passed directly to Apollo with the `graphql.config.apolloServer` [configuration object](/dev-docs/configurations/plugins#graphql-configuration). Apollo Server options can be used for instance to enable the [tracing feature](https://www.apollographql.com/docs/federation/metrics/), which is supported by the GraphQL Sandbox to track the response time of each part of your query. The `Apollo Server` default cache option is `cache: 'bounded'`. You can change it in the `apolloServer` configuration. For more information visit [Apollo Server Docs](https://www.apollographql.com/docs/apollo-server/performance/cache-backends/). +[Apollo Server](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#apolloserver) options can be passed directly to Apollo with the `graphql.config.apolloServer` [configuration object](/dev-docs/configurations/plugins#graphql). Apollo Server options can be used for instance to enable the [tracing feature](https://www.apollographql.com/docs/federation/metrics/), which is supported by the GraphQL Sandbox to track the response time of each part of your query. The `Apollo Server` default cache option is `cache: 'bounded'`. You can change it in the `apolloServer` configuration. For more information visit [Apollo Server Docs](https://www.apollographql.com/docs/apollo-server/performance/cache-backends/). :::caution The maximum number of items returned by the response is limited to 100 by default. This value can be changed using the `amountLimit` configuration option, but should only be changed after careful consideration: a large query can cause a DDoS (Distributed Denial of Service) and may cause abnormal load on your Strapi server, as well as your database server. From 945d8b34689e99e0ac11571443d88e713cc22874 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 9 Jan 2025 16:34:52 +0100 Subject: [PATCH 06/11] Add format around path --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index baac53a434..3457c8b01d 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -204,7 +204,7 @@ To add them globally, you can merge the following into your middleware configura } ``` -To add these exceptions only for the /graphql path (recommended), you can create a new middleware to handle it. For example: +To add these exceptions only for the `/graphql` path (recommended), you can create a new middleware to handle it. For example: From 5fe28a06fc03cfcb1f02dc41c5329c697986c5c5 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 9 Jan 2025 16:36:32 +0100 Subject: [PATCH 07/11] Simplify --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index 3457c8b01d..88b3d3e904 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -71,7 +71,7 @@ The maximum number of items returned by the response is limited to 100 by defaul ## GraphQL Configuration Options -Here is a detailed list of configuration options supported by the GraphQL plugin. These options can be defined in the `config/plugins.js` (JavaScript) or `config/plugins.ts` (TypeScript) file. +The following configuration options are supported by the GraphQL plugin and can be defined in the `config/plugins` file: | Option | Type | Description | Default Value | Notes | | ------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | --------------------------------------------------- | From 03c0a9990abe28eaa1a7632d50bce48347d71521 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 9 Jan 2025 16:37:32 +0100 Subject: [PATCH 08/11] =?UTF-8?q?Don't=20use=20positional=20words=20in=20d?= =?UTF-8?q?ocs=20(below=20=E2=86=92=20following)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index 88b3d3e904..09b9e80a4e 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -85,7 +85,7 @@ The following configuration options are supported by the GraphQL plugin and can ### Example -Below is an example of how to use these options in a Strapi configuration file: +The following is an example of how to use these options in a Strapi configuration file: From 81c1e0a38646fe451746566b5c5ccc65b65adce3 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 9 Jan 2025 16:38:15 +0100 Subject: [PATCH 09/11] Fix broken anchor --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index 09b9e80a4e..c26b8557c0 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -1086,7 +1086,7 @@ GraphQL is a query language allowing users to use a broader panel of inputs than ### Disable introspection and Sandbox in production In production environments, disabling the GraphQL Sandbox and the introspection query is strongly recommended. -If you haven't edited the [configuration file](/dev-docs/configurations/plugins#graphql-configuration), it is already disabled in production by default. +If you haven't edited the [configuration file](/dev-docs/configurations/plugins#graphql), it is already disabled in production by default. ### Limit max depth and complexity From 7e1944363b6cda0e2cf4111ad9ed0eec5b5744ea Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 15 Jan 2025 10:47:37 +0100 Subject: [PATCH 10/11] Update docusaurus/docs/dev-docs/plugins/graphql.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémi de Juvigny <8087692+remidej@users.noreply.github.com> --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index c26b8557c0..3756ee0a40 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -137,7 +137,7 @@ Here is an example of using a function to dynamically enable it: ```javascript title="./config/plugins.js" -module.exports = { +module.exports = ({ env }) => { graphql: { config: { endpoint: '/graphql', From a522c89c43c00d7bfdfca70089fa09e2132636a0 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Wed, 15 Jan 2025 10:47:45 +0100 Subject: [PATCH 11/11] Update docusaurus/docs/dev-docs/plugins/graphql.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémi de Juvigny <8087692+remidej@users.noreply.github.com> --- docusaurus/docs/dev-docs/plugins/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/dev-docs/plugins/graphql.md b/docusaurus/docs/dev-docs/plugins/graphql.md index 3756ee0a40..07b57fe785 100644 --- a/docusaurus/docs/dev-docs/plugins/graphql.md +++ b/docusaurus/docs/dev-docs/plugins/graphql.md @@ -159,7 +159,7 @@ module.exports = ({ env }) => { ```ts title="./config/plugins.ts" -export default { +export default ({ env }) => { graphql: { config: { endpoint: '/graphql',