You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Scenario:
I am using Apollo Client in a React Native app to handle GraphQL subscriptions. Despite receiving valid WebSocket messages, the subscription data remains undefined. Additionally:
The loading state remains true indefinitely, even after the WebSocket connection successfully receives messages.
The onData callback does not trigger, and no data is processed.
The onSubscriptionData callback (now deprecated) also does not work.
Expected Behavior:
The subscription should:
Transition the loading state to false once the data is received.
Populate subscriptionData with the data from the WebSocket message.
Trigger the onData callback, allowing the received data to be processed.
Current Scenario:
I am using Apollo Client in a React Native app to handle GraphQL subscriptions. Despite receiving valid WebSocket messages, the subscription data remains undefined. Additionally:
Expected Behavior:
The subscription should:
{ "id": "1", "type": "next", "payload": { "data": { "requestSent": { "visitationStatus": [], "lastInteracted": "2024-01-15T12:45:30.000Z", "firstname": "John", "address": "123 Mock Street, Springfield, USA", "photo": "mock-photo-id-12345", "deviceTokens": [ "APA91bMockExampleToken12345XYZ" ], "lastname": "Doe", "createdAt": "2024-01-01T08:00:00.000Z", "updatedAt": "2024-01-20T15:00:00.000Z", "showLocation": "NEARBY", "name": "John Doe", "joinMultipleGroupsPrompt": true, "personId": "mock-person-id-12345", "subheadline": "Software Engineer at MockCorp" } } } }
Here is the configuration and usage:
Apollo Client Setup:
Subscription Usage:
Environment:
The text was updated successfully, but these errors were encountered: