graphql-kit / graphql-faker

🎲 Mock or extend your GraphQL API with faked data. No coding required.
MIT License
2.69k stars 226 forks source link

[Feature proposal] Configuration files using cosmiconfig #46

Open loicplaire opened 6 years ago

loicplaire commented 6 years ago

This is not an issue report but a proposal for the implementation of configuration files.

What would you think of adding cosmiconfig so that we could configure graphql-faker using either:

In my use case, I see the benefits of using a .config.js file so that I can use my project config file to avoid duplication e.g for the extend url.

Let me know if this is something you would consider for graphql-faker and I would be happy to implement it!

IvanGoncharov commented 6 years ago

@loicplaire I don't think it's very critical feature for Faker but if it fits in dozen lines I don't see why not 👍 Please keep it simple: sync code, config format that emulates yargs output, etc. Also, don't forget to update README.md.