Passing environment variable from Apollo Router to Rhai Script

Hello all,

I am currently migrating from Apollo Gateway to Apollo Router and I need to re-develop all the plugins we made in typescript to rhai script.

The challenge is interesting and I managed to do most of the work but I could not find my answer to how should I pass environment variable from Apollo Router to my rhai scripts ?
Should I make a custom router and make all the plugins from scratch with Rust, then pass the env var through the router config file ?

Doing rhai script is fine, but I do not want to explore Rust since it seems to be more complex, especially if it’s just for env var…

Thanks in advance !

1 Like

Hey @taingk , we have this logged as a feature request on our end and you can track it in this GitHub issue.