Skip to content

Commit

Permalink
Update Section 4 -- Composition.md
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSenn authored Oct 3, 2024
1 parent 224f9db commit 16ad1fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/Section 4 -- Composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This counter-example demonstrates an invalid usage:

```graphql counter-example
extend type Query {
usersByRole(role: String!): [User] @lookup
usersByIds(ids: [ID!]!): [User!] @lookup
}

type User {
Expand All @@ -71,7 +71,9 @@ type User {
}
```

Here, `usersByRole` returns a list of `User` objects, which violates the requirement that a `@lookup` field must return a single object.
Here, `usersByIds` returns a list of `User` objects, which violates the requirement that a `@lookup` field must return a single object.

//TODO explain the `@requires`

### Merge

Expand Down

0 comments on commit 16ad1fc

Please sign in to comment.