graphql-hive / graphql-hive/federation-composition

Demand Control `@listSize(sizedFields: "")` does not allow for nested selection set

Open
#305 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
53
Forks
8
Avg merge
20h 50m
Merged PRs (30d)
10

Description

In recent versions of Demand Control, the runtime supports nested selection in `sizedFields` field.

To get there, we must go through compostion first, but using something like that fails:

```graphql
type Query {
deepContainer(first: Int): DeepContainer
@listSize(slicingArguments: ["first"], sizedFields: ["results { page }"], requireOneSlicingArgument: false)
}
```

At the moment, `sizedFields` only supports a single field name, and not a nested field, pointed using selection-set format.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the composition handling for the Demand Control @listSize directive, focusing on validation or parsing of the sizedFields argument. Reproduce the issue with the DeepContainer schema shown in the report, then add coverage for the nested selection-set form and verify that composition succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.