Was experimenting with upgrading this project (nice work btw) to Apollo 3, and noticed there is apparently a change in Apollo 3's apollo-link which breaks the current version of apollo-link-refresh-token (0.2.7 at the time of writing).
I see apollo-link-token-refresh relies on Apollo v2's operation.toKey(), and since Apollo 3 has dropped this (version 2, version 3) a workaround is needed.
I happened to see apollo-link's test mocks seem to generate keys based on request and tried to re-purpose that helper function to fix things.
Well, I was able to get TypeScript happy again, but I'm not sure if this is actually a good idea.
I'm curious your opinion! What do you think?
I believe the point of the key is that it should be unique - not 100% sure if this actually guarantees that.
PR - strictly a WIP
Fork
Docs on stateful links
Was experimenting with upgrading this project (nice work btw) to Apollo 3, and noticed there is apparently a change in Apollo 3's
apollo-linkwhich breaks the current version ofapollo-link-refresh-token(0.2.7 at the time of writing).I see
apollo-link-token-refreshrelies on Apollo v2'soperation.toKey(), and since Apollo 3 has dropped this (version 2, version 3) a workaround is needed.I happened to see
apollo-link's test mocks seem to generate keys based on request and tried to re-purpose that helper function to fix things.Well, I was able to get TypeScript happy again, but I'm not sure if this is actually a good idea.
I'm curious your opinion! What do you think?
I believe the point of the key is that it should be unique - not 100% sure if this actually guarantees that.
PR - strictly a WIP
Fork
Docs on stateful links