-
-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
Description
Hello,
when you create a upload link, you can only set the headers once.
This is a problem when you refresh your authentication token.
Apollo allows to pass a function to the connecitonParams so that every time a request is made the token is fetched. This is better.
What is possible:
createUploadLink({ uri: "SOME URI", headers: { Authorization: "Bearer " + get(token) } })
What I need:
createUploadLink({ uri: "SOME URI", headers: () => { return { Authorization: "Bearer " + get(token) } } })
Currently, when I do this no headers are passed.
Could you fix this?
Kind Regards
Luca