You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When running generation, and any glob in the config does not match any files, an error is returned and generation fails.
In our particular case, we have current SQL-based files inside dirs in lib/models, and we'd like to put graphql operations in files in those directories. Thus:
operations:
- "lib/models/*/*.graqhql"
However, we do have some nested models (e.g. lib/models/foo/bar), but if we add
- "lib/models/*/*/*.graqhql"
then the generation will exit unless actual files exist.
Describe the solution you'd like
Ideally, this should allow some globs to fail but warn instead. This would allow us to add/remove the query files as needed, without having to also update the genqlient config.
Describe alternatives you've considered
We could add/remove the directory lines as we add/remove the files. Just a bit of extra work.
It's really quite reasonable to want this to work -- you want to say to
look for queries in `pkg/**/*.graphql`, or `**/queries/*.graphql`, or
whatever. Now it does. I picked `doublestar` because it seemed a
reasonable combination of popular and well-documented.
Fixes#167. Hopefully obsoletes #327.
I have:
- [x] Written a clear PR title and description (above)
- [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
- [x] Added tests covering my changes, if applicable
- [x] Included a link to the issue fixed, if applicable
- [x] Included documentation, for new features
- [x] Added an entry to the changelog
Is your feature request related to a problem? Please describe.
When running generation, and any glob in the config does not match any files, an error is returned and generation fails.
In our particular case, we have current SQL-based files inside dirs in
lib/models
, and we'd like to put graphql operations in files in those directories. Thus:However, we do have some nested models (e.g.
lib/models/foo/bar
), but if we add- "lib/models/*/*/*.graqhql"
then the generation will exit unless actual files exist.
Describe the solution you'd like
Ideally, this should allow some globs to fail but warn instead. This would allow us to add/remove the query files as needed, without having to also update the genqlient config.
Describe alternatives you've considered
We could add/remove the directory lines as we add/remove the files. Just a bit of extra work.
Additional context
The text was updated successfully, but these errors were encountered: