Using @defer under an array field will return multiple patches. Patches are unique combinations of label
and path
{
items {
id
...frag @defer(label: "my-label")
}
}
fragment frag on Item {
title
}
Initial result:
{
"data": {
"items": [
{ "id": 1 },
{ "id": 2 },
{ "id": 3 },
]
}
}
Patches:
- Multiple Patches
{
"label": "my-label",
"path": ["items", 0],
"data": { "title": "chair" }
}
{
"label": "my-label",
"path": ["items", 1],
"data": { "title": "table" }
}
{
"label": "my-label",
"path": ["items", 2],
"data": { "title": "lamp" }
}