Combining header with BatchHttpLink

Hey all,

I’m trying to find a way to combine headers for batch graphql requests without having to either provide some odd custom fetch implementation or writing a custom BatchHttpLink myself.

We are using a bit of a custom version of persisted queries where we’re sending the persisted query hash as a header value in addition to it being sent in the query body, due to some external constraints.
We’re doing that currently by simply having a custom link that adds the header to the context.

For batch operations, we want to do the same (a list of hashes in the header) - but I’m not able to figure out how I could achieve that. For each operation in the batch I want to add its hash to the header.

Does anyone know of a way to get there?

Thanks in advance!