Hi all
running into what looks like a platform gap in React-based apps and want to confirm whether there's a supported path before building a workaround.
Setup: I have a GraphQL resource backing a mutation that requires a per-request header — something like an acting-user ID, used for audit/attribution on a staff-only action. This value changes on every call, so it can't just be a static resource-level header.
What works: In a classic Retool app, I have a query with the header bound directly in the Headers UI field (e.g. x-header-name: {{ some_value }}). Triggering that query from the app works fine — the header reaches the server and the request succeeds.
What doesn't work: In a backend function called from a React-based app, I'm calling the generated GraphQL resource wrapper like:
const result = await myGraphqlResource(query, variables)
There's no parameter here for per-call headers. I tried casting it to accept a third options.headers argument, but confirmed via the request/response debug output that the header never actually reaches the wire — the cast just tells TypeScript to accept an extra argument, it doesn't change what the underlying generated function does at runtime. A JS function silently ignores call-site arguments it doesn't declare.
Question: Is there a supported way to send a dynamic, per-request header on a GraphQL resource call made from backend function / workflow code in a React-based app?
Thanks ![]()