fauna-gql-upload
fauna-gql-upload copied to clipboard
Feature: add watch command/flag
This is a planned feature.
It can be inconvenient to constantly call the command to upload changes. When developing functions or making changes to GraphQL documents, calling the command over and over to make your changes take effect becomes a problem.
The biggest downside of this is that every resource is uploaded, not just the ones you've made changes to. This is especially a problem in larger projects where upload times can be 30 seconds to one minute. Waiting that long after changing one line in a single file is unreasonable.
To solve this, we could add a watch command using chokidar and only upload the resources that are reported in events. This would watch the supplied resource directories in .fauna.json
as well as the files specified under codegen.documents
to update GraphQL output.