How do I convert an object to a string for the header? rhai script for router.
let subGraphHeaders = #{
loginName: loginName,
isPrimary: sPrimary
};
request.subgraph.headers["user"] = json::stringify(subGraphHeaders); // something like this
When I do it this way, it works, but I need to add more value from claims
request.subgraph.headers["user"] = `{"loginName":"${loginName}", "isPrimary":${isPrimary}}`