Skip to content

Trying to get Apollo 3 compat working - feedback appreciated #5

@onpaws

Description

@onpaws

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions