Skip to content

Commit

Permalink
Update mutations.md (#3322)
Browse files Browse the repository at this point in the history
Currently, this piece of code would fail when executing the following query:

```
mutation {
  fruit{
    add(input: {id: "this is only a example"}) {
      id
    }
  }
}
```

With the following error: 'NoneType' object has no attribute 'fruit', as it lacks the expected field type.
  • Loading branch information
eudago committed Jan 6, 2024
1 parent 5b92d56 commit f30e2e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/general/mutations.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ class FruitMutations:

@strawberry.type
class Mutation:
fruit: FruitMutations
@strawberry.field
def fruit(self) -> FruitMutations:
return FruitMutations()
```

<Note>
Expand Down

0 comments on commit f30e2e5

Please sign in to comment.