[Question] When using custom fetch for http link, how can we pass some parameter to the options argument?
Opened this issue · 0 comments
amadeu01 commented
Where does the options
come from?
const customFetch = (uri, options) => {
const { operationName } = JSON.parse(options.body);
return fetch(`${uri}/graph/graphql?opname=${operationName}`, options);
};
const link = createHttpLink({ fetch: customFetch });
The above example can be found at the documentation. But, it is not clear how can I change the value of the option from the query? How does the query impact over the option
argument?