-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use supergraph schema to extract auth info (#5047)
Co-authored-by: Geoffroy Couprie <apollo@geoffroycouprie.com> Co-authored-by: Gary Pennington <gary@apollographql.com>
- Loading branch information
1 parent
c65da48
commit 0860da3
Showing
6 changed files
with
195 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,5 @@ | ||
### Use supergraph schema to extract auth info ([PR #5047](https://github.com/apollographql/router/pull/5047)) | ||
|
||
Use supergraph schema to extract auth info as auth information may not be available on the query planner's subgraph schemas. This undoes the auth changes made in #4975. | ||
|
||
By [@tninesling](https://github.com/tninesling) in https://github.com/apollographql/router/pull/5047 |
25 changes: 25 additions & 0 deletions
25
...orization/snapshots/apollo_router__plugins__authorization__tests__cache_key_metadata.snap
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,25 @@ | ||
--- | ||
source: apollo-router/src/plugins/authorization/tests.rs | ||
expression: response | ||
--- | ||
{ | ||
"data": { | ||
"currentUser": { | ||
"id": 1, | ||
"name": null, | ||
"phone": "1234" | ||
} | ||
}, | ||
"errors": [ | ||
{ | ||
"message": "Unauthorized field or type", | ||
"path": [ | ||
"currentUser", | ||
"name" | ||
], | ||
"extensions": { | ||
"code": "UNAUTHORIZED_FIELD_OR_TYPE" | ||
} | ||
} | ||
] | ||
} |
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