Skip to content

GraphQLOverSSE: note including an empty data field in the complete message #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

enisdenjo
Copy link
Member

@benjie benjie merged commit d285c9f into main Mar 28, 2024
@benjie benjie deleted the oversse branch March 28, 2024 08:52
@bclozel
Copy link

bclozel commented Mar 28, 2024

Is there a consistent way to detect whether clients use EventSource, or is this really a local implementation choice? If there is no consistent way, shouldn't the server always send data: with the complete event or are there downsides to doing that?

@enisdenjo
Copy link
Member Author

@bclozel there is no way to detect the client. You could manually indicate to the server through headers, but EventSource in browser doesnt allow changing headers.

graphql-sse always sends the data: , there is no reason against it. The only drawback is you send 6 more bytes, but I dont think this is a biggie.

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.

3 participants