I am building a graphql query and testing at the time in postman or any other client say insomnia or anything else.I am adding some new filter for my query and testing it.
The issue is that whenever I make changes to the same Absinthe Schema, and recompile via mix recompile
or during running node recompile in iex session, It says re-compiled but the schema is never updated in the client side api or postman/insomnia or any other client, even when a new clients joins after changing the schema.
So it seems like it’s not a cache issue from client side, rather than from server .
How to fix this? This is super annoying.
Elixir uses incremental compilation — it only re-compiles modules that have changed
and the modules that depend on them.
When using grouped alias,syntax with macros, such as:
import_types Types.Relational.{Group, Person}
the compiler for some reason fail to properly register compile-time dependencies for each individual module.
As a result, changes to a type module (e.g. Person) may not trigger recompilation of the root Absinthe schema
in development, causing GraphQL changes to not appear.
Therefore, grouped import_types are banned.
Always import each type module individually:
import_types Types.Relational.Group
import_types Types.Relational.Person