-
-
Notifications
You must be signed in to change notification settings - Fork 34
Description
GQLCodeGen supports several formats for the schema files used to do codegen. This include formats like remote URLs or TS/JS files that generate the schema.
The way Graphql-Let works today, its config is more or less directly passed through to the underlying GQLCodeGen CLI. This means that if you set your config to something like a remote file or TS file, the schema will actually be correctly generated.
The problem arises when you change that schema and re-run codegen. Before the config is passed through to the underlying CLI, graphql-let does some hashing / processing on it to determine if it should be run. The issue is that specific processing only handles literal files. If you browse the code, you can see there's a TODO and it filters out URLs. For TS/JS files...it can be very misleading because it will work, but it will actually hash the file itself (not the result of running the file which actually makes the schema)
This both:
- Leads to situations where caching is improperly handled and does not appear to regenerate
- Decreases overall API compatibility with CodeGen