Cache issues
Gregoirevda opened this issue · 3 comments
Reproduction:
- yarn send-introspection-query api-url-X
- write queries -> passes
- yarn send-introspection-query api-url-Y (doesn't contains queries or mutations of API X)
- yarn start -> still working
- bsb -clean-world -> still working
- changing the query -> recognise the different graphql_schema.json
In general, you see that the graphql_schema.json is cached in the ppx. Only a query change will trigger the new schema
Yes, this is an unfortunate side-effect when a PPX depends on other files than the input source file itself. Changing graphql_schema.json
requires a bsb -clean-world -make-world
to fully take effect. I'll add this to the readme.
This is similar to #13.
Does it mean the ppx isn't executed if only another piece of code is changed?
That's correct. A ppx is executed when the compiler compiles a file, which only happens when either that file or any of its dependencies - i.e. other .ml/.re files - have changed.
This basically means that ppx's never should read other files than their input. What you're seeing here is what happens when you break that rule :)