Closed myieye closed 1 week ago
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @myieye and the rest of your teammates on Graphite
90 testsβββ90 :white_check_mark:ββ5s :stopwatch: 14 suitesβββ0 :zzz: β1 filesβββββ0 :x:
Results for commit 41479915.
:recycle: This comment has been updated with latest results.
12 testsβ Β±0βββ12 :white_check_mark: Β±0βββ0s :stopwatch: Β±0s β4 suites Β±0ββββ0 :zzz: Β±0β β1 filesββ Β±0ββββ0 :x: Β±0β
Results for commit 41479915.βΒ± Comparison against base commit 9a099a3b.
:recycle: This comment has been updated with latest results.
Resolves #1180
This PR moves the JWT refreshing code into LexQueries. It's no longer quite as generic as it was before (i.e. it won't automatically trigger based on GQL types), but it's much less magical, not so tricky to wire-up and easier to test.
The middleware was pretty buggy before. The unit tests should demonstrate that it handles every situation we're expecting our users to maybe land in.
Also, previously we used the old token for the scope of the request and only refreshed it at the end. Now we look for updates up front and use the current state for the scope of the GQL Query.
Projecting a few Id's and UserId's lets us write less complicated code, so I thought it was worth it.