8000 doc: make mutation and variable match todo.graphql by kortschak · Pull Request #2958 · ent/ent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

doc: make mutation and variable match todo.graphql #2958

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

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Changes from all commits
Commits
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
9 changes: 3 additions & 6 deletions doc/md/tutorial-todo-gql-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ models:
Node:
model:
- todo/ent.Noder
Status:
model:
- todo/ent/todo.Status
```

To apply these changes, we rerun the code generation:
Expand Down Expand Up @@ -83,8 +80,8 @@ Now, we're ready to test our new GraphQL resolvers. Let's start with creating a
query multiple times (changing variables is optional):

```graphql
mutation CreateTodo($todo: TodoInput!) {
createTodo(todo: $todo) {
mutation CreateTodo($input: CreateTodoInput!) {
createTodo(input: $input) {
id
text
createdAt
Expand All @@ -95,7 +92,7 @@ mutation CreateTodo($todo: TodoInput!) {
}
}

# Query Variables: { "todo": { "text": "Create GraphQL Example", "status": "IN_PROGRESS", "priority": 1 } }
# Query Variables: { "input": { "text":"Create GraphQL Example", "status": "IN_PROGRESS", "priority": 1 } }
# Output: { "data": { "createTodo": { "id": "2", "text": "Create GraphQL Example", "createdAt": "2021-03-10T15:02:18+02:00", "priority": 1, "parent": null } } }
```

Expand Down
0