Is it possible to pass extensions to the server? #1847
-
I'm investigating migrating from Apollo to urql and I'm trying to figure out if it is possible to send I tried looking at fetchOptions where you can return
I was hoping to be able to use It looks like the default fetchExchange always defaults I'm guessing what I'm trying to do is currently not possible without a custom fetchExchange, right? (Would that even be the correct approach to solve this?) Hopefully I'm missing something obvious 🤞 Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Currently we don't support this as most servers also don't really support it, I think in general it's safer to pass tokens like this: fetchOptions: () => {
return {
headers: {
authorization: "token",
},
};
}, Any specific reason you prefer using I guess if we were to add this it would be part of the |
Beta Was this translation helpful? Give feedback.
Currently we don't support this as most servers also don't really support it, I think in general it's safer to pass tokens like this:
Any specific reason you prefer using
extensions
? Generally from the graphql-spec we can see thatextensions
is meant to extend the spec.I guess if we were to add this it would be part of the
OperationContext
rather than something infetchOptions
,....