fix(graph): tolerate missing subject in Origins resolver #428
Reference in New Issue
Block a user
Delete Branch "fix/origins-resolver-tolerate-no-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Originsreturned an error when no JWT subject was presentFindEventsquery and rendering an empty event listEventsresolver behavior and return[]instead, so partial-auth requests still render eventsWhy
On cold start (especially mobile), the Auth0 SDK can be in a stale state where
isAuthenticatedis true butgetAccessTokenSilently()returns no usable token. Apollo then sent an unauthenticatedFindEventsquery that included theOriginsfield, which errored and nulled out the entire response. Users had to log out and back in to see events.Test plan
go test ./graph/...