Absinthe.Schema.PersistentTerm (absinthe v1.6.0) View Source
Experimental: Persistent Term based Schema Backend
By default, Absinthe schemas are stored in a generated module. If your schema
MyAppWeb.Schema, Absinthe creates a
module containing the structs and other data that Absinthe needs at runtime
to execute GraphQL operations against that schema.
OTP introduced the
:persistent_term module to provide many of the same
performance benefits of using compiled modules, without the downsides associated
with manipulating complex structures at compile time.
This module is an experimental effort at using the
as an Absinthe schema backend. This module has been tested against against
the entire Absinthe test suite and shown to perform perhaps even better
than the compiled module.
In your schema module:
In your application's supervision tree, prior to anywhere where you'd use the schema:
where MyAppWeb.Schema is the name of your schema.