Absinth dynamic schema generation at runtime

I know this is an old post, but I’ve been digging into ways to help automate schema generation.

There are 2 related mix tasks:

mix absinthe.schema.json
mix absinthe.schema.sdl

but these generate artifacts based on defined Absinthe schemas. It sounds like you’re interested in going the other way: consuming files like this in order to generate a GraphQL schema. I like this idea a lot, but I’m not aware of anyone having implemented something like this in Elixir.

With more recent versions of Absinthe, it relies on a long list of blueprint structs to define objects and inputs, so in theory, this should totally be possible. If anyone has done work on this, I’d be very curious to see it.

Tangentially related: Absinthe & Authorisation & Generating Schemas

1 Like