Connect to your subgraphs running on localhost from Docker
A common setup for development is running subgraphs onlocalhost
and the executing router inside Docker. To avoid requiring additional configuration steps in this environment and to make this setup more ergonomic, when running inside Docker the router will retry requests that fail to connect to a loopback address, sending them to docker.host.internal
instead.
This feature is enabled by default, but it can be disabled by setting the environment variable LOCALHOST_FALLBACK_INSIDE_DOCKER
to false
.
Hot reload the router configuration file
When working on the router configuration without changing router versions, custom modules, etc, it can be helpful to enable hot reloading of the configuration file. You can enable file watching based hot config reloading using the following configuration:config.yaml
kill -HUP <pid>
.
Hot reloading has some limitations:
- Changes to the
watch_config
section are not hot-reloaded. - Changes to flags and environment variables are not possible.
watch_config
based reloads are based on the filesystem’s modification time, edits that somehow circumvent this mechanism will not trigger a reload.