Skip to content

support GraphQL subscriptions#60

Closed
SydoxX wants to merge 25 commits intofifemon:masterfrom
FHOOEAIST:subscription-support
Closed

support GraphQL subscriptions#60
SydoxX wants to merge 25 commits intofifemon:masterfrom
FHOOEAIST:subscription-support

Conversation

@SydoxX
Copy link

@SydoxX SydoxX commented May 28, 2021

Closes #57

@SydoxX SydoxX marked this pull request as ready for review June 4, 2021 13:07
@SydoxX SydoxX marked this pull request as draft June 4, 2021 13:07
@SydoxX SydoxX marked this pull request as ready for review June 4, 2021 13:17
@SydoxX SydoxX changed the title [Draft] support GraphQL subscriptions support GraphQL subscriptions Jun 4, 2021
@SydoxX
Copy link
Author

SydoxX commented Jun 4, 2021

I did not find any documentation if Grafana officially supports proxying websockets. For now only the Browser option supports websockets and therefor subscriptions.

@retzkek
Copy link
Contributor

retzkek commented Jun 4, 2021

This looks really nice, thanks! Subscriptions were on my "nice to have" long-term roadmap, I really appreciate you taking this on. Give me a few days to review all these changes.

Can you recommend a datasource to test this with? Otherwise I'll just implement subscriptions in the test datasource (which should support it regardless for demonstration).

@SydoxX
Copy link
Author

SydoxX commented Jun 5, 2021

Unfortunately I tested it locally on an internal Hasura server.

@retzkek
Copy link
Contributor

retzkek commented Aug 26, 2021

@SydoxX I'm really sorry it took so long for me to look at this. I finally added subscriptions to the test datasource, and have a couple immediate comments:

  1. I don't think it's a safe assumption that the subscription websockets endpoint is the same as the query endpoint. It's probably best to add a new configuration option, which could default to the same endpoint.
  2. Grafana does appear to proxy websockets, at least when looking at "live" Loki logs in Explore.

@SydoxX
Copy link
Author

SydoxX commented Aug 26, 2021

@SydoxX I'm really sorry it took so long for me to look at this. I finally added subscriptions to the test datasource, and have a couple immediate comments:

1. I don't think it's a safe assumption that the subscription websockets endpoint is the same as the query endpoint. It's probably best to add a new configuration option, which could default to the same endpoint.

2. Grafana does appear to proxy websockets, at least when looking at "live" Loki logs in Explore.
  1. Indeed, I'll add another config option.
  2. Thanks for the heads-up, I'll see if I can get proxied websockets working.

@SydoxX
Copy link
Author

SydoxX commented Sep 16, 2021

Added text field to enter websocket url and also added some info boxes about GraphQL subscriptions.

@SydoxX
Copy link
Author

SydoxX commented Sep 16, 2021

I updated grafana in the package.json to version 8.1.4 but unfortunately this results in an endless loop while executing npm install. But I suspect this is a problem on my side.

@SydoxX SydoxX closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support GraphQL subscriptions

2 participants