Configure ApolloProvider to always use fresh tokens #1609
Merged
thedavidprice merged 6 commits intoredwoodjs:mainfrom Jan 7, 2021
Merged
Configure ApolloProvider to always use fresh tokens #1609thedavidprice merged 6 commits intoredwoodjs:mainfrom
thedavidprice merged 6 commits intoredwoodjs:mainfrom
Conversation
…hToken to be deparacated
peterp
reviewed
Jan 7, 2021
peterp
reviewed
Jan 7, 2021
| @@ -20,12 +23,33 @@ const ApolloProviderWithFetchConfig: React.FunctionComponent<{ | |||
| config?: Omit<ApolloClientOptions<InMemoryCache>, 'cache'> | |||
| }> = ({ config = {}, children }) => { | |||
| const { uri, headers } = useFetchConfig() | |||
Member
There was a problem hiding this comment.
We could remove headers here since this is where the auth-token and type came from previously.
Member
There was a problem hiding this comment.
Doing so would save you an extra re-render.
Contributor
Author
There was a problem hiding this comment.
Yeah I intentionally didn't do that, wanted to remove this if/when FetchContext is removed if it makes sense?
Co-authored-by: Peter Pistorius <[email protected]>
peterp
reviewed
Jan 7, 2021
dthyresson
reviewed
Jan 7, 2021
This was
linked to
issues
Jan 7, 2021
Contributor
|
I like that the LGTM 🚀 |
thedavidprice
added a commit
that referenced
this pull request
Jan 7, 2021
This reverts commit ef14ece.
thedavidprice
added a commit
that referenced
this pull request
Jan 7, 2021
Contributor
|
REVERTED See #1611 |
dac09
added a commit
to dac09/redwood
that referenced
this pull request
Jan 12, 2021
…h-tokens * 'main' of github.com:redwoodjs/redwood: Move whatwg-fetch from devDep to dep Adds mockCurrentUser() to api-side jest v0.22.1 v0.22.0 Revert "Configure ApolloProvider to always use fresh tokens (redwoodjs#1609)" (redwoodjs#1611) Configure ApolloProvider to always use fresh tokens (redwoodjs#1609) Ignore *.scenarios.* files. (redwoodjs#1607) upgrade prisma v2.12.1 (redwoodjs#1604) Test Scenarios (redwoodjs#1465) Use relative path to config stories location (redwoodjs#1509)
1 task
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starts fix for #1576. Implements proposal and discussion in #1608
Verified only with firebase, but individual provider changes will be added later.