Skip to content
Draft
21 changes: 15 additions & 6 deletions docs/api/graphql/graphql_queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To get a specific content item by its content ID, location ID, or URL alias, use
```
{
content {
article (contentId: 62) {
article(contentId: 62) {
title
author {
name
Expand Down Expand Up @@ -52,8 +52,17 @@ The query accepts `locationId`, `remoteId`, and `urlAlias` as arguments.

```
{
item (locationId: 2) {
item(locationId: 2) {
_name
... on FolderItem {
name
}
... on LandingPageItem {
name
}
... on ArticleItem {
title
}
}
}
```
Expand Down Expand Up @@ -181,9 +190,9 @@ To get the IDs and names of all Fields in the `article` content type:
{
content {
_types {
article{
article {
_info {
fieldDefinitions{
fieldDefinitions {
id
name
}
Expand Down Expand Up @@ -318,8 +327,8 @@ Alternatively, you can query the `children` property of an `item` or `content` o

```
{
item (locationId: 2) {
_location{
item(locationId: 2) {
_location {
children {
edges {
node {
Expand Down
8 changes: 8 additions & 0 deletions docs/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ ul li li li {
background-color: var(--table-header);
}

.md-typeset table td.compare {
border: 0.05rem solid var(--md-typeset-table-color)
}

.md-nav__link[data-md-state=blur] {
color: rgb(19, 28, 38);
}
Expand All @@ -393,6 +397,10 @@ figcaption {
text-align: center;
}

a.external:not(.card) {
white-space: nowrap;
}

a.external:not(.card):after {
content: url(../images/open-in-new.svg);
font-style: normal;
Expand Down
55 changes: 55 additions & 0 deletions docs/update_and_migration/from_3.3/to_4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,61 @@ php bin/console ibexa:migrations:migrate

## Update your custom code

### GraphQL

TODO: Confirm it happens between 3.3 and 4.0

Some property names has changed and your GraphQL queries need to be updated.

TODO: Complete the list of renamed elements

| 3.3 name | 4.0 name |
|:-----------------------------|:--------------------------|
| `id` | `contentId` |
| `_info` | `_contentInfo` |
| `FolderContent` | `FolderItem` |
| `<ContentType>Content` | `<ContentType>Item` |
| `createFolderContent` | `createFolderItem` |
| `create<ContentType>Content` | `create<ContentType>Item` |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems it's only createFolder on bot sides…


TODO: Example with more renamed elements

Example of updated query

<table>
<thead><tr><th scope="col">3.3</th><th scope="col">4.0</th></tr></thead>
<tbody>
<tr><td class="compare">
```graphql
{
content {
folder(id: 1) {
_info {
name
}
}
}
}
```
</td><td class="compare">
```graphql
{
content {
folder(contentId: 1) {
_contentInfo{
name
}
}
}
}
```
</td></tr>
</tbody></table>

While revisiting GraphQL queries, you may consider the new feature `item`
allowing to fetch a content item without knowing its content type.
For more information, see [Get a content item](graphql_queries.md#get-a-content-item)

### Back office customization

The v4 version of [[= product_name =]] is using Bootstrap 5 in the back office. If you were using Bootstrap 4 for styling, you need to update and adjust all custom back office components [following the migration guide from Bootstrap 4](https://getbootstrap.com/docs/5.0/migration/).
Expand Down
Loading