mirror of
https://github.com/kou029w/hasura-rest-hands-on.git
synced 2025-02-26 02:15:18 +00:00
48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
|
# GraphQLによるデータの挿入と取得
|
||
|
|
||
|
<!--
|
||
|
TODO:
|
||
|
(GraphQLの基本)
|
||
|
-->
|
||
|
|
||
|
<!-- prettier-ignore-start -->
|
||
|
```graphql
|
||
|
mutation MyMutation {
|
||
|
insert_pages_one(object: {content: {}}) {
|
||
|
id
|
||
|
content
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
<!-- prettier-ignore-end -->
|
||
|
|
||
|

|
||
|
|
||
|
<!-- prettier-ignore-start -->
|
||
|
```graphql
|
||
|
mutation MyMutation {
|
||
|
insert_pages_one(object: {content: {hey: "hello!"}}) {
|
||
|
id
|
||
|
content
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
<!-- prettier-ignore-end -->
|
||
|
|
||
|

|
||
|
|
||
|

|
||
|
|
||
|
<!-- prettier-ignore-start -->
|
||
|
```graphql
|
||
|
query MyQuery {
|
||
|
pages_by_pk(id: 2) {
|
||
|
id
|
||
|
content
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
<!-- prettier-ignore-end -->
|
||
|
|
||
|

|