-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(realtime/trusted-docs): Supports GraphQL subscriptions and truste…
…d documents (#10893) 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. --------- Co-authored-by: Josh GM Walker <[email protected]>
- Loading branch information
1 parent
d0a22f2
commit 461ca21
Showing
6 changed files
with
50 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
fix(realtime/trusted-docs): Supports GraphQL subscriptions and trusted documents (#10893) by @dthyresson | ||
|
||
Fixes: https://github.com/redwoodjs/redwood/issues/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters