Environment
Unraid OS Version: 7.3.2
Are you using a reverse proxy? No. Reproduced directly against the Unraid GraphQL API.
Pre-submission Checklist
Issue Description
The arraySubscription GraphQL subscription fails when an array update is emitted because the event publisher sends the payload under array, while GraphQL resolves the subscription root field named arraySubscription.
Latest main at reproduction: 12c23d808a45e8521ded6d36bdf0c0aaf152775a.
The resolver subscribes to the array channel:
api/src/unraid-api/graph/resolvers/array/array.resolver.ts
@Subscription(() => UnraidArray)
public async arraySubscription() {
return createSubscription(PUBSUB_CHANNEL.ARRAY);
}
The publisher emits a differently named root property:
api/src/store/listeners/array-event-listener.ts
pubsub.publish(PUBSUB_CHANNEL.ARRAY, { array });
Other working subscriptions publish an object keyed by the GraphQL subscription field, for example { systemMetricsCpu: payload } and { dockerContainerStats: stats }.
Steps to Reproduce
- Subscribe directly to:
subscription { arraySubscription { id state } }
- Trigger an array state update that causes the disks state file listener to publish.
- Observe the GraphQL subscription error.
Expected Behavior
The subscription emits a non-null UnraidArray payload under arraySubscription.
Actual Behavior
The live API returns:
Cannot return null for non-nullable field Subscription.arraySubscription.
The regular array query succeeds, confirming the underlying array object is valid.
Additional Context
The relevant publisher and resolver files are unchanged between deployed API release commit f3205d978fada931da54df4255d41c07489066d9 and latest main commit 12c23d808a45e8521ded6d36bdf0c0aaf152775a.
There is currently no integration test that publishes an array event and executes the GraphQL subscription end to end.
Environment
Unraid OS Version: 7.3.2
Are you using a reverse proxy? No. Reproduced directly against the Unraid GraphQL API.
Pre-submission Checklist
Issue Description
The
arraySubscriptionGraphQL subscription fails when an array update is emitted because the event publisher sends the payload underarray, while GraphQL resolves the subscription root field namedarraySubscription.Latest
mainat reproduction:12c23d808a45e8521ded6d36bdf0c0aaf152775a.The resolver subscribes to the array channel:
api/src/unraid-api/graph/resolvers/array/array.resolver.tsThe publisher emits a differently named root property:
api/src/store/listeners/array-event-listener.tsOther working subscriptions publish an object keyed by the GraphQL subscription field, for example
{ systemMetricsCpu: payload }and{ dockerContainerStats: stats }.Steps to Reproduce
subscription { arraySubscription { id state } }Expected Behavior
The subscription emits a non-null
UnraidArraypayload underarraySubscription.Actual Behavior
The live API returns:
The regular
arrayquery succeeds, confirming the underlying array object is valid.Additional Context
The relevant publisher and resolver files are unchanged between deployed API release commit
f3205d978fada931da54df4255d41c07489066d9and latestmaincommit12c23d808a45e8521ded6d36bdf0c0aaf152775a.There is currently no integration test that publishes an array event and executes the GraphQL subscription end to end.