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

Docs: Add left/right element #9696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/docs/api-reference/graphql-api/mutation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ keywords:
- mutation
---

import LeftRight from '@site/src/components/LeftRight';

# API Reference - Mutation

<LeftRight>
<section>

## **insert** (upsert) syntax {#insert-upsert-syntax}

```none
Expand All @@ -33,6 +38,9 @@ mutation [<mutation-name>] {
| on-conflict | false | [OnConflictClause](#postgres-on-conflict) | In Postgres, converts _insert_ to _upsert_ by handling conflict |
| if-matched | false | [IfMatchedClause](#sqlserver-if-matched) | In MS SQL Server, converts _insert_ to _upsert_ using a match |

</section>
<section>

**Example: Insert**

```graphql
Expand All @@ -59,6 +67,9 @@ mutation upsert_author {
}
```

</section>
</LeftRight>

## **insert_one** syntax {#insert-upsert-one-syntax}

```none
Expand Down
12 changes: 12 additions & 0 deletions docs/src/components/LeftRight.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';

const LeftRight = ({ children }) => {
return (
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))' }}>
<div style={{ paddingRight: '10px' }}>{children[0]}</div>
<div>{children[1]}</div>
</div>
);
};

export default LeftRight;