Describe the issue
Using the GraphQLProtocol.graphqlTransportWs gives "No element" error when fetching data from Tibber.
Tibber uses GraphQL to provide livedata stream from their power reader.
An Api explorer is available here: https://developer.tibber.com/explorer
Note: Press "Load demo token" and "Load example query" to "realtime subscription", press play. See the data I am trying to reach.
Expected behavior
When subscribed the data received should be the same as the API Explorer.
Device / execution context
iOS emulator, no localhost issues since everything is online.
Other useful/optional fields
I have rather limited background using GraphQL so this could a "beginners error". If so I hope some more experienced could show / describe what the error message actually is?
Tibber has some requirements, and setting the user-agent was not an option I found:
Websocket subscription client requirements
Clients must set user-agent header when calling GraphQL API and when opening websocket connection. Both platform and driver version must be indicated. E.g. Homey/10.0.0 com.tibber/1.8.3
Clients must implement graphql-transport-ws sub-protocol
Clients must implement jitter and exponential backoff when retrying requests to API
Clients must dynamically query websocket server url
Describe the issue Using the GraphQLProtocol.graphqlTransportWs gives "No element" error when fetching data from Tibber.
Tibber uses GraphQL to provide livedata stream from their power reader. An Api explorer is available here: https://developer.tibber.com/explorer Note: Press "Load demo token" and "Load example query" to "realtime subscription", press play. See the data I am trying to reach.
To Reproduce
Code says a lot and related to the API docs https://developer.tibber.com/docs/overview#breaking-websocket-change I need to fetch the wss:// address first (which works fine) and then split with a subscription query.
Expected behavior When subscribed the data received should be the same as the API Explorer.
Device / execution context iOS emulator, no localhost issues since everything is online.
Other useful/optional fields
I have rather limited background using GraphQL so this could a "beginners error". If so I hope some more experienced could show / describe what the error message actually is?
Tibber has some requirements, and setting the user-agent was not an option I found:
Websocket subscription client requirements
Clients must set user-agent header when calling GraphQL API and when opening websocket connection. Both platform and driver version must be indicated. E.g. Homey/10.0.0 com.tibber/1.8.3 Clients must implement graphql-transport-ws sub-protocol Clients must implement jitter and exponential backoff when retrying requests to API Clients must dynamically query websocket server url