Intended outcome:
MutationOptions
should include context
and pass it to the link.
Actual outcome:
Mutations do not accept context as an argument, only queries do.
Version
FWIW, I'm currently using the following link as a workaround at the top of my link stack:
import { ApolloLink } from 'apollo-link';
export default new ApolloLink((operation, forward) => {
if (operation.variables.myContext) {
operation.setContext({
...operation.variables.myContext,
});
delete operation.variables.myContext;
}
return forward(operation);
});
Fixed in the next rc!
Also 馃憢 鉂わ笍
which release is this? @jbaxleyiii
Patched in 2.0.3 (https://github.com/apollographql/apollo-client/pull/2419#issuecomment-346376432)
Most helpful comment
Fixed in the next rc!
Also 馃憢 鉂わ笍