Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Features pages with Dev Docs content #2309

Draft
wants to merge 115 commits into
base: v6/main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
3f49973
Fix align of Ask AI button
pwizla Oct 28, 2024
f9f9143
Fix color of icon in Ask AI button
pwizla Oct 28, 2024
8124b27
Fix API category sidebar icon
pwizla Oct 28, 2024
b4f0484
Fix Upgrades category icon
pwizla Oct 28, 2024
6c69069
Hide new/updated badges in gutter on narrower viewports
pwizla Oct 28, 2024
96deccf
Remove gap between gradient and top of page on homepage
pwizla Oct 28, 2024
e3061f8
Move icons in text 2 px down
pwizla Oct 29, 2024
fe00f29
Fix custom card description color in dark mode
pwizla Oct 29, 2024
494b261
Create new features pages and merge user guide content for audit logs…
meganelacheny Nov 14, 2024
a336c8e
Add Media Library content from User Guide in new ML feature page
meganelacheny Nov 19, 2024
dacfbc3
Add RBAC content from User Guide in new RBAC feature page
meganelacheny Nov 19, 2024
61d5b34
Add SSO content from User Guide in new SSO feature page
meganelacheny Nov 19, 2024
60f59a1
Restore (deleted? 🤔) note about linters in contrib. guide
pwizla Nov 20, 2024
0338f39
Add guideflow illustration in Content Manager (test)
meganelacheny Nov 21, 2024
7a6bf04
Add CTB content from User Guide in new CTB feature page
meganelacheny Nov 21, 2024
2401ba8
Update TOC + Add lower levels to secondary TOC
meganelacheny Nov 21, 2024
cbb13be
Test Guideflow integration in Content Manager feature page
meganelacheny Nov 22, 2024
51ccaf4
Edit U&P feature page + Move API tokens UG content to new feature page
meganelacheny Nov 22, 2024
db24a77
Apply right template on all features pages
meganelacheny Nov 22, 2024
e055d81
Merge branch 'v6/new-user-guide' of github.com:strapi/documentation i…
meganelacheny Nov 22, 2024
452c575
Merge branch 'v6/design-fixes' into v6/new-user-guide
pwizla Nov 26, 2024
2d923ac
Include all Dev Docs page in TOC
pwizla Nov 26, 2024
d558e02
Make 1st details block open in QSG
pwizla Nov 26, 2024
bfceabe
Adjust sidebar content re. Dev Docs
pwizla Nov 26, 2024
ad126d0
Fix level 2 sidebar caret position
pwizla Nov 26, 2024
8e18355
Fix path
pwizla Nov 26, 2024
0f3abf3
Fix more broken links preventing the build
pwizla Nov 27, 2024
e9d0760
Fix sidebar labels for migration pages
pwizla Nov 27, 2024
ee15ae1
Fix sidebar labels for migration pages
pwizla Nov 27, 2024
32d8ae8
Merge branch 'v6/new-user-guide' of github.com:strapi/documentation i…
pwizla Nov 27, 2024
1166ffa
Remove remaining "not v5" callouts
pwizla Nov 27, 2024
f230445
Fix tip
pwizla Nov 27, 2024
75a979b
Use CMS sidebar everywhere
pwizla Nov 27, 2024
4ed8ed6
Remove beta badge on Content History
pwizla Nov 27, 2024
37e6fc6
Remove "new" badge for controllers
pwizla Nov 27, 2024
6a1dc08
Simplify Plugin APIs in TOC
pwizla Nov 27, 2024
2266825
Add Static Preview
pwizla Nov 27, 2024
84b186c
Merge branch 'v6/main' into v6/new-user-guide
meganelacheny Nov 28, 2024
127346a
Improve TOC (consistency and shortness)
pwizla Nov 28, 2024
574a6b7
Fix collapsible items color in sidebar
pwizla Nov 28, 2024
fca9933
Remove "dev docs" intro from CMS TOC
pwizla Nov 28, 2024
2bffeba
Improve Audit Logs page
meganelacheny Nov 28, 2024
48cbd52
Improve Content History page
meganelacheny Nov 28, 2024
c00ad5d
Improve Draft & Publish page
meganelacheny Nov 29, 2024
d972881
Start improving Releases feature page
meganelacheny Dec 2, 2024
1797148
Create page for Admin Panel + Add UG content + Update TOC
meganelacheny Dec 3, 2024
cac980d
Draft install and config. options
pwizla Dec 3, 2024
90456a8
Try adding GuideFlow to Admin Panel's Overview section
meganelacheny Dec 4, 2024
de3e5dc
Try adding GuideFlow to Admin Panel's Overview section (dark mode)
meganelacheny Dec 4, 2024
326d755
Rework the Documentation plugin docs
pwizla Dec 4, 2024
a2383c8
Modify admin panel feature page
meganelacheny Dec 5, 2024
42f6e4e
Rename Documentation plugin configuration headings
pwizla Dec 5, 2024
1909770
Add Guideflow component
pwizla Dec 5, 2024
d3e975c
Merge branch 'v6/new-user-guide' into v6/new-dev-docs
pwizla Dec 5, 2024
2e0ecd2
Add more vertical padding to Guideflow component to avoid cropping
pwizla Dec 5, 2024
096f5e0
Adjust padding again
pwizla Dec 5, 2024
994a653
Use Guideflow for Documentation plugin page
pwizla Dec 5, 2024
9550b6b
Update Static Preview with improvements from beta docs release
pwizla Dec 6, 2024
a88d6e9
Add identity card to Documentation plugin
pwizla Dec 6, 2024
4ab8299
Update Sentry plugin
pwizla Dec 6, 2024
ac7dc03
Update order of Strapi plugins in TOC
pwizla Dec 6, 2024
3409d86
Fix broken anchors
pwizla Dec 6, 2024
938195d
Add WIP Email docs
pwizla Dec 6, 2024
6156938
Fix consistency for Documentation id card
pwizla Dec 6, 2024
bfbf3db
Fix click-through bug in TOC
pwizla Dec 11, 2024
cee9720
Fix Growth plan badge and adjust Enterprise plan too
pwizla Dec 11, 2024
9a5b7be
Fix custom search bar (& AI) height
pwizla Dec 10, 2024
f0bf6fd
Fix secondary nav border being longer than actual content items
pwizla Dec 10, 2024
b83f4b0
Fixed font-weight of secondary navbar
pwizla Dec 10, 2024
d7d3c4a
Replace collapse/expand sidebar button with a Phosphor icon
pwizla Dec 10, 2024
2948bb7
Fix custom search bar
pwizla Dec 10, 2024
13b7fa9
Reduce bottom padding in footer
pwizla Dec 10, 2024
dbd4b0e
Update title & remove description on homepage
pwizla Dec 10, 2024
91e4c7f
Fix navbar icon aligment with text
pwizla Dec 10, 2024
b1555ab
Made a part of the styling of the Kapa.ai modal
lucasboilly Dec 6, 2024
8a47910
Rework Email feature (formerly plugin)
pwizla Dec 11, 2024
830c9a9
Fix broken links due to moving Email to features
pwizla Dec 11, 2024
89e272a
Comment out Email plugin from strapi-plugins
pwizla Dec 11, 2024
84d3e8e
Update Providers page
pwizla Dec 11, 2024
2faf174
Fix badges position on h1s
pwizla Dec 11, 2024
c73aee9
Add Growth badge where necessary
pwizla Dec 11, 2024
feeb148
Edit wording of badges position in "fundamentals" pages
pwizla Dec 11, 2024
1365a4a
Fix style
pwizla Dec 12, 2024
cd62b71
Add dev docs to i18n
pwizla Dec 12, 2024
4f9cf7f
Rewrite CustomDocCard component to use native Docusaurus Link compo.
pwizla Dec 12, 2024
79cd43b
Fix links DS API → i18n feature
pwizla Dec 12, 2024
55b64b1
Fix broken links and anchors due to i18n updates
pwizla Dec 12, 2024
93e5303
Add links for breadcrumbs in API sections
pwizla Dec 12, 2024
9febcf9
Make categories unclickable
pwizla Dec 12, 2024
81993ae
Rework GraphQL plugin docs
pwizla Dec 12, 2024
08a5aff
Fix style
pwizla Dec 12, 2024
06a33a3
Add missing GraphQL API call from usage section of GQL plugin docs
pwizla Dec 12, 2024
0133e5e
Add Growth to features cards
pwizla Dec 13, 2024
b78d6c3
Fix toc_max_heading_level for GraphQL
pwizla Dec 13, 2024
305c899
Include dev docs for upload in Media Lib. docs & create REST API page
pwizla Dec 13, 2024
0dbf435
Fix broken link
pwizla Dec 13, 2024
1d8ee7e
Add Usage with APIs to D&P feature page + rework REST API accordingly
pwizla Dec 13, 2024
d93d3a7
Fix u&b for cloud team env.
pwizla Dec 13, 2024
68474c3
Add dev docs-related info. to API tokens feature
pwizla Dec 16, 2024
d8509e4
Rework Data Management feature to include it into Features category
pwizla Dec 17, 2024
cbca56b
Update Data Management identity card
pwizla Dec 17, 2024
a7aac93
Fix modal verb usage in Data Management
pwizla Dec 17, 2024
cfc6518
Try to show again the close button of announcement bar
pwizla Dec 17, 2024
d2f6a37
Fix broken links for data management
pwizla Dec 17, 2024
62ebe02
WIP U&P rework + U&P providers
pwizla Dec 17, 2024
ae8bba0
Fix broken links introduced by U&P rework
pwizla Dec 18, 2024
3615dc7
Reformat U&P providers pages
pwizla Dec 18, 2024
c36e638
Add a little CSS fix for Kapa CTAs in dark mode
pwizla Dec 18, 2024
457de3c
SVG display fixes
pwizla Dec 18, 2024
a5ef758
Add U&P providers to sidebar and clarify email & upload ones
pwizla Dec 18, 2024
fa21ef9
Clean up Kapa CSS
pwizla Dec 19, 2024
a798a08
Fix Kapa modal button on dark mode for mobile
pwizla Dec 19, 2024
a55e699
Fix badge icon alignment
pwizla Dec 19, 2024
8e6d689
Fix sidebar padding in production
pwizla Dec 19, 2024
ccbaf98
Remove vertical align bottom causing more damage than solutions 😂
pwizla Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ The Strapi Documentation team has created a complete style guide for you to make

💁 While writing, please consider the [12 Rules of Technical Writing](https://handbook.strapi.io/user-success-manual/12-rules-of-technical-writing) that the Strapi Documentation team will use to assess the quality and consistency of the contribution. 😊

⚠️ **Important: Please disable any linter or automatic formatting tool(s)** before saving and submitting your files. Not doing so could, at best, add unnecessary formatting changes to the submitted PR or, at worst, prevent Docusaurus from properly rendering some pages.

### Working locally: Set up the project

To set up the Docusaurus project on your machine, perform the following steps from a terminal instance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Before going any further into this Strapi Cloud documentation, we recommend you

- **Hosting Platform** <br/> Strapi Cloud is a hosting platform that allows to deploy already existing Strapi projects created with Strapi CMS (Content Management System). Strapi Cloud is *not* the SaaS (Software as a Service) version of Strapi CMS. Feel free to refer to the [Developer Documentation](https://docs.strapi.io/dev-docs/intro) and [User Guide](https://docs.strapi.io/user-docs/intro) to learn more about Strapi CMS.

- **Strapi Cloud Pricing Plans** <br/> As a Strapi Cloud user you have the choice between 3 tiers: Developer, Pro and Team. Depending on the tier, you have access to different functionalities, support and customization options (see [Pricing page](https://strapi.io/pricing-cloud) for more details). In this Strapi Cloud documentation, the <CloudDevBadge />, <CloudProBadge />, and <CloudTeamBadge /> badges can be displayed beside a section's title to indicate for which tier the feature is available.
- **Strapi Cloud Pricing Plans** <br/> As a Strapi Cloud user you have the choice between 3 tiers: Developer, Pro and Team. Depending on the tier, you have access to different functionalities, support and customization options (see [Pricing page](https://strapi.io/pricing-cloud) for more details). In this Strapi Cloud documentation, the <CloudDevBadge />, <CloudProBadge />, and <CloudTeamBadge /> badges can be displayed below a section's title to indicate for which tier the feature is available.

- **Strapi CMS Enterprise features** <br/> Some of Strapi features, usually accessible via the Enterprise Edition of Strapi CMS, are included in some Strapi Cloud tiers (see [Pricing page](https://strapi.io/pricing-cloud) and [Information on billing & usage](/cloud/getting-started/usage-billing) for more details). These features, highlighted with an <EnterpriseBadge /> badge, are documented in the [User Guide](https://docs.strapi.io/user-docs/intro) and the [Developer Documentation](https://docs.strapi.io/dev-docs/intro).

Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/cloud/getting-started/usage-billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Strapi Cloud offers a free 14 days trial for all new accounts, and 3 paid plans:
| **Content History** | 14 days retention | N/A | 14 days retention | 90 days retention |
| | | | | |
| **Backups** | N/A | N/A | Weekly | Daily |
| **Environments** | N/A | N/A | 0 included (up to 99 extra) | 1 included (up to 99 extra) |
| **Environments** | N/A | N/A | 0 included (up to 99 extra) | 2 included (up to 99 extra) |

:::strapi Additional information on usage and features
- General features & usage:
Expand Down
2 changes: 0 additions & 2 deletions docusaurus/docs/cloud/projects/runtime-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ tags:
- Strapi Cloud
---

import NotV5 from '/docs/snippets/_not-updated-to-v5.md'

# Runtime logs

From a chosen project's dashboard, the *Runtime logs* tab displays the live logs of the project.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Admin panel bundlers
description: Learn more about configuring Vite and webpack with Strapi 5.
displayed_sidebar: cmsSidebar
sidebar_label: Bundlers
toc_max_heading_level: 4
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Admin panel deployment
description: Learn more about deploying Strapi's admin panel in various scenarios.
displayed_sidebar: cmsSidebar
sidebar_label: Deployment
toc_max_heading_level: 4
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Admin panel extension
description: Learn more about extending Strapi's admin panel.
displayed_sidebar: cmsSidebar
sidebar_label: Extension
toc_max_heading_level: 4
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Admin panel customization - URL, host, and path configuration
description: Learn more about configuring the URL, host, and path to access Strapi's admin panel.
displayed_sidebar: cmsSidebar
sidebar_label: URL, host, and port configuration
toc_max_heading_level: 4
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Admin panel customization options
description: Various options help you configure Strapi's administration panel behavior and look, so you can make it reflect your identity.
displayed_sidebar: cmsSidebar
sidebar_label: Customization options
toc_max_heading_level: 4
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Customizing the WYSIWYG editor
description: Learn more about the various strategies available to customize the WYSIWYG editor in Strapi's admin panel.
displayed_sidebar: cmsSidebar
sidebar_label: WYSIWYG editor
tags:
- admin panel
Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/dev-docs/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Strapi provides advanced built-in features for developers who'd like to get the

<CustomDocCardsWrapper>

<CustomDocCard emoji="🌍" title="Internationalization (i18n)" description="The i18n feature allows creating, managing and distributing localized content in different languages." link="/dev-docs/i18n"/>
<CustomDocCard emoji="🌍" title="Internationalization (i18n)" description="The i18n feature allows creating, managing and distributing localized content in different languages." link="/user-docs/features/internationalization"/>

<CustomDocCard title="CLI reference" description="Control Strapi through the Command Line Interface (CLI)." link="/dev-docs/cli" />

Expand All @@ -27,7 +27,7 @@ Strapi provides advanced built-in features for developers who'd like to get the

<CustomDocCard title="Templates" description="Use and create pre-made Strapi applications designed for a specific purpose." link="/dev-docs/templates" />

<CustomDocCard title="Data management" description="Use Strapi's built-in data management system to import, export, or transfer data." link="/dev-docs/data-management" />
<CustomDocCard title="Data management" description="Use Strapi's built-in data management system to import, export, or transfer data." link="/user-docs/features/data-management" />

<CustomDocCard title="Database migrations" description="Manage database migrations operations." link="/dev-docs/database-migrations" />

Expand Down
1 change: 1 addition & 0 deletions docusaurus/docs/dev-docs/api/content-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Content API
description: Learn more about Strapi 5's Content API
displayed_sidebar: cmsSidebar
sidebar_label: APIs Introduction
pagination_prev: dev-docs/setup-deployment
pagination_next: dev-docs/advanced-features
tags:
Expand Down
3 changes: 2 additions & 1 deletion docusaurus/docs/dev-docs/api/document-service/fields.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Using fields with the Document Service API
description: Use Strapi's Document Service API to select the fields to return with your queries.
sidebar_label: Fields
displayed_sidebar: cmsSidebar
tags:
- API
Expand All @@ -24,7 +25,7 @@ import IdsInResponse from '/docs/snippets/id-in-responses.md'

By default the [Document Service API](/dev-docs/api/document-service) returns all the fields of a document but does not populate any fields. This page describes how to use the `fields` parameter to return only specific fields with the query results.

:::time.p
:::tip
You can also use the `populate` parameter to populate relations, media fields, components, or dynamic zones (see the [`populate` parameter](/dev-docs/api/document-service/populate) documentation).
:::

Expand Down
1 change: 1 addition & 0 deletions docusaurus/docs/dev-docs/api/document-service/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Using filters with the Document Service API
description: This document provides information about the filters available in the Document Service API.
displayed_sidebar: cmsSidebar
sidebar_label: Filters
tags:
- API
- Content API
Expand Down
3 changes: 2 additions & 1 deletion docusaurus/docs/dev-docs/api/document-service/locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Using the locale parameter with the Document Service API
description: Use Strapi's Document Service API to work with locale versions with your queries.
displayed_sidebar: cmsSidebar
sidebar_label: Locale
tags:
- API
- Content API
Expand All @@ -21,7 +22,7 @@ tags:

# Document Service API: Using the `locale` parameter

By default the [Document Service API](/dev-docs/api/document-service) returns the default locale version of documents (which is 'en', i.e. the English version, unless another default locale has been set for the application, see [User Guide](/user-docs/settings/internationalization)). This page describes how to use the `locale` parameter to get or manipulate data only for specific locales.
By default the [Document Service API](/dev-docs/api/document-service) returns the default locale version of documents (which is 'en', i.e. the English version, unless another default locale has been set for the application, see [Internationalization (i18n) feature](/user-docs/features/internationalization)). This page describes how to use the `locale` parameter to get or manipulate data only for specific locales.

## Get a locale version with `findOne()` {#find-one}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Extending the Document Service behavior
description: This document provides information about the middlewares in the Document Service API.
toc_max_heading_level: 4
sidebar_label: Middlewares
displayed_sidebar: cmsSidebar
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Using Populate with the Document Service API
description: Use Strapi's Document Service API to populate or select some fields.
displayed_sidebar: cmsSidebar
sidebar_label: Populate
tags:
- Components
- Content API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Using Sort & Pagination with the Document Service API
description: Use Strapi's Document Service API to sort and paginate query results
displayed_sidebar: cmsSidebar
sidebar_label: Sort & Pagination
tags:
- API
- Content API
Expand Down
1 change: 1 addition & 0 deletions docusaurus/docs/dev-docs/api/document-service/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Using Draft & Publish with the Document Service API
description: Use Strapi's Document Service API to return either the draft or the published version of a document
displayed_sidebar: cmsSidebar
sidebar_label: Status
tags:
- API
- Content API
Expand Down
1 change: 1 addition & 0 deletions docusaurus/docs/dev-docs/api/document.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Documents
description: Learn what a Document is in Strapi v5
displayed_sidebar: cmsSidebar
sidebar_label: Document concept
pagination_prev: dev-docs/api/content-api
tags:
- API
Expand Down
1 change: 0 additions & 1 deletion docusaurus/docs/dev-docs/api/entity-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ unlisted: true

import EntityQueryKnex from '/docs/snippets/entity-query-knex.md'
import BackendIntroCrosslink from '/docs/snippets/backend-custom-intro-crosslink.md'
import NotV5 from '/docs/snippets/_not-updated-to-v5.md'
import ESdeprecated from '/docs/snippets/entity-service-deprecated.md'

# Entity Service API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Ordering & Pagination with the Entity Service API
description: Use Strapi's Entity Service API to order and paginate queries results.
displayed_sidebar: cmsSidebar
unlisted: true
---

import ESdeprecated from '/docs/snippets/entity-service-deprecated.md'
Expand Down
153 changes: 148 additions & 5 deletions docusaurus/docs/dev-docs/api/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ tags:
- sort
---

import NotV5 from '/docs/snippets/_not-updated-to-v5.md'

# GraphQL API

The GraphQL API allows performing queries and mutations to interact with the [content-types](/dev-docs/backend-customization/models#content-types) through Strapi's [GraphQL plugin](/dev-docs/plugins/graphql.md). Results can be [filtered](#filters), [sorted](#sorting) and [paginated](#pagination).
Expand Down Expand Up @@ -463,7 +461,7 @@ mutation CreateCategory {
```

:::tip
If the Internationalization (i18n) feature is enabled for your content-type, you can create a document for a specific locale (see [i18n documentation](/dev-docs/i18n#graphql-create)).
If the Internationalization (i18n) feature is enabled for your content-type, you can create a document for a specific locale (see [i18n documentation](/dev-docs/api/graphql#graphql-create)).
:::

### Update an existing document
Expand Down Expand Up @@ -491,7 +489,7 @@ mutation UpdateRestaurant($documentId: ID!, $data: RestaurantInput!) {
```

:::tip
If the Internationalization (i18n) feature is enabled for your content-type, you can create a document for a specific locale (see [i18n documentation](/dev-docs/i18n#graphql-update)).
If the Internationalization (i18n) feature is enabled for your content-type, you can create a document for a specific locale (see [i18n documentation](/dev-docs/api/graphql#graphql-update)).
:::

#### Update relations
Expand Down Expand Up @@ -529,7 +527,7 @@ mutation DeleteRestaurant {
```

:::tip
If the Internationalization (i18n) feature is enabled for your content-type, you can delete a specific localized version of a document (see [i18n documentation](/dev-docs/i18n#graphql-delete)).
If the Internationalization (i18n) feature is enabled for your content-type, you can delete a specific localized version of a document (see [i18n documentation](/dev-docs/api/graphql#graphql-delete)).
:::

### Mutations on media files
Expand Down Expand Up @@ -747,3 +745,148 @@ Pagination methods can not be mixed. Always use either `page` with `pageSize` or
:::tip
The default and maximum values for `pagination.limit` can be [configured in the `./config/plugins.js`](/dev-docs/configurations/plugins#graphql) file with the `graphql.config.defaultLimit` and `graphql.config.maxLimit` keys.
:::

## `locale` {#locale}

The [Internationalization (i18n)](/user-docs/features/internationalization) feature adds new features to the GraphQL API:

- The `locale` field is added to the GraphQL schema.
- GraphQL can be used:
- to query documents for a specific locale with the `locale` argument
- for mutations to [create](#graphql-create), [update](#graphql-update), and [delete](#graphql-delete) documents for a specific locale

### Fetch all documents in a specific locale {#graphql-fetch-all}

To fetch all documents <DocumentDefinition/> for a specific locale, pass the `locale` argument to the query:

<ApiCall>

<Request>

```graphql
query {
restaurants(locale: "fr") {
documentId
name
locale
}
}
```

</Request>

<Response>

```json
{
"data": {
"restaurants": [
{
"documentId": "a1b2c3d4e5d6f7g8h9i0jkl",
"name": "Restaurant Biscotte",
"locale": "fr"
},
{
"documentId": "m9n8o7p6q5r4s3t2u1v0wxyz",
"name": "Pizzeria Arrivederci",
"locale": "fr"
},
]
}
}
```

</Response>

</ApiCall>

### Fetch a document in a specific locale {#graphql-fetch}

To fetch a documents <DocumentDefinition/> for a specific locale, pass the `documentId` and the `locale` arguments to the query:

<ApiCall>

<Request title="Example query">

```graphql
query Restaurant($documentId: ID!, $locale: I18NLocaleCode) {
restaurant(documentId: "a1b2c3d4e5d6f7g8h9i0jkl", locale: "fr") {
documentId
name
description
locale
}
}
```

</Request>

<Response title="Example response">

```json
{
"data": {
"restaurant": {
"documentId": "lviw819d5htwvga8s3kovdij",
"name": "Restaurant Biscotte",
"description": "Bienvenue au restaurant Biscotte!",
"locale": "fr"
}
}
}
```

</Response>
</ApiCall>

### Create a new localized document {#graphql-create}

The `locale` field can be passed to create a localized document <DocumentDefinition/> for a specific locale (for more information about mutations with GraphQL, see [the GraphQL API documentation](/dev-docs/api/graphql#create-a-new-document)).

```graphql title="Example: Create a new restaurant for the French locale"
mutation CreateRestaurant($data: RestaurantInput!, $locale: I18NLocaleCode) {
createRestaurant(
data: {
name: "Brasserie Bonjour",
description: "Description in French goes here"
},
locale: "fr"
) {
documentId
name
description
locale
}
```

### Update a document for a specific locale {#graphql-update}

A `locale` argument can be passed in the mutation to update a document <DocumentDefinition/> for a given locale (for more information about mutations with GraphQL, see [the GraphQL API documentation](/dev-docs/api/graphql#update-an-existing-document)).

```graphql title="Example: Update the description field of restaurant for the French locale"
mutation UpdateRestaurant($documentId: ID!, $data: RestaurantInput!, $locale: I18NLocaleCode) {
updateRestaurant(
documentId: "a1b2c3d4e5d6f7g8h9i0jkl"
data: {
description: "New description in French"
},
locale: "fr"
) {
documentId
name
description
locale
}
```

### Delete a locale for a document {#graphql-delete}

Pass the `locale` argument in the mutation to delete a specific localization for a document <DocumentDefinition/>:

```graphql
mutation DeleteRestaurant($documentId: ID!, $locale: I18NLocaleCode) {
deleteRestaurant(documentId: "xzmzdo4k0z73t9i68a7yx2kk", locale: "fr") {
documentId
}
}
```
Loading