Skip to content

fix(compilation): mark middleware, resolve, resolve_type macro ast as runtime - #1454

Open
novaugust wants to merge 2 commits into
absinthe-graphql:mainfrom
novaugust:mark-aliases-as-runtime
Open

fix(compilation): mark middleware, resolve, resolve_type macro ast as runtime#1454
novaugust wants to merge 2 commits into
absinthe-graphql:mainfrom
novaugust:mark-aliases-as-runtime

Conversation

@novaugust

@novaugust novaugust commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greetings! It's me again, taking another stab at making some parts of the absinthe notation DSL mark aliases as runtime references to prevent adding compile-time dependencies to the graph when possible.

Context

The last attempt at this was #1430, which applied this technique to the schema's shape itself. That proved untenable without major absinthe redesigns, but I'm hoping that these macros at least really do only apply their code during runtime and so can be marked as the same.

Benefit

As for the level of benefit here, it'll obviously depend on how users write their modules. But for a rough metric, the large codebase I work with saw a 3% decrease in the number of transitive dependencies as totaled by the mix recompile_buster tool. 3% doesn't sound large, but keeping in mind that our graphql api is only a small portion of our files, i assure you it's pretty big!

Other work

I'm confident many other macros in the notation world could have this change applied to them as well. I'd love feedback on what else qualifies as a runtime macro, but just wanted to get eyes to see if it's tenable before doing more work

@novaugust novaugust changed the title fix(compilation) mark middleware, resolve, resolve_type macro ast as runtime fix(compilation): mark middleware, resolve, resolve_type macro ast as runtime Aug 11, 2026

@bryanjos bryanjos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks! I'm going to keep it open a bit longer to see if @cschiewek or @benwilson512 have any opinions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants