Skip to content
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

fix(realtime/trusted-docs): Supports GraphQL subscriptions and trusted documents #10893

Merged
merged 7 commits into from
Jul 19, 2024

Conversation

dthyresson
Copy link
Contributor

Fixes: #10892

This PR updates the SSELink to check if there is a trusted document hash in the request. If there is, then don't also include the query.

The persisted operations plugin checks if the params has a query. If it does then raises an error that only persisted operations are allowed.

Subscriptions failed this test because the request had both the hash and a query. And since there were query details, the request was blocked.

Now, if there is a hash, the SSELink won't add back the query and thus it succeeds.

@dthyresson dthyresson self-assigned this Jun 30, 2024
@dthyresson dthyresson added this to the next-release milestone Jun 30, 2024
@dthyresson dthyresson changed the title DRAFT: fix(realtime/trusted-docs): Supports GraphQL subscriptions and trusted documents fix(realtime/trusted-docs): Supports GraphQL subscriptions and trusted documents Jul 1, 2024
@dthyresson dthyresson marked this pull request as ready for review July 1, 2024 13:39
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the SSE link is what adds the query but when using trusted docs this is not allowed?

Nice, looks good to me from what I understand.

@dthyresson dthyresson merged commit 461ca21 into main Jul 19, 2024
46 checks passed
@dthyresson dthyresson deleted the dt-trusted-docs-subs branch July 19, 2024 20:40
@Josh-Walker-GM Josh-Walker-GM modified the milestones: next-release, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug?]: Trusted Documents does not work with Realtime.
2 participants