Skip to content

Commit

Permalink
Update datafetching.md
Browse files Browse the repository at this point in the history
Documenting that `@DgsData` is repeatable.
Fixes: Netflix/dgs-framework#1193
  • Loading branch information
detinho authored Nov 14, 2022
1 parent 48a71d4 commit 7b2cebd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/datafetching.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ To do so you will have to leverage the `@DgsData.List` annotation, for example:
)
```

Using repeating annotations:

=== "Java"
```java
@DgsData(parentType = "Query", field = "movies")
@DgsData(parentType = "Query", field = "shows")
```

!!! tip
Both `@DgsQuery` and `@DgsMutation` can't be defined multiple times in a single method. Please use `@DgsData`
instead and explicitly define the `parentType` to match either `Query` or `Mutation`.
Expand Down

0 comments on commit 7b2cebd

Please sign in to comment.