the-guild-org / conductor

Conductor is a cutting-edge, open-source GraphQL Gateway, fully compliant with the GraphQL specification and designed to supercharge any API with powerful features and proxy flows.
https://the-guild.dev/graphql/gateway
MIT License
98 stars 3 forks source link

Local launch: misleading suggestion #566

Closed trkohler closed 6 months ago

trkohler commented 6 months ago

configuration file example is given in yaml (https://github.com/the-guild-org/conductor/blob/master/README.md#L55)

However, when I try to launch locally conductor with cargo run --bin conductor I have that error:

thread 'main' panicked at /Users/trkohler/open-source/conductor/libs/config/src/lib.rs:816:25:
Failed to read config file "./config.json": No such file or directory (os error 2)

config.yaml doesn't seem to work.

Is that expected behavior?

trkohler commented 6 months ago

tried with json and it worked. So seems like only json works right now? running from fresh master

YassinEldeeb commented 6 months ago

tried with json and it worked. So seems like only json works right now? running from fresh master

hey @trkohler, yaml also works, the issue is that it defaults to reading the configuration file from config.json when not specified, the first argument is the one it uses for config file location. so if you want to use yaml, you can run:

cargo run --bin conductor ./test_config/config.yaml
trkohler commented 6 months ago

I added some explanations to readme regarding that behaviour because I couldn't guess it just from the reading the source code (I didn't read too deep, to be honest). Hopefully it will save few mins for the next contributor during onboarding!

YassinEldeeb commented 6 months ago

thank you @trkohler!