fix(compilation): mark middleware, resolve, resolve_type macro ast as runtime - #1454
Open
novaugust wants to merge 2 commits into
Open
fix(compilation): mark middleware, resolve, resolve_type macro ast as runtime#1454novaugust wants to merge 2 commits into
middleware, resolve, resolve_type macro ast as runtime#1454novaugust wants to merge 2 commits into
Conversation
middleware, resolve, resolve_type macro ast as runtimemiddleware, resolve, resolve_type macro ast as runtime
bryanjos
approved these changes
Aug 28, 2026
bryanjos
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me! Thanks! I'm going to keep it open a bit longer to see if @cschiewek or @benwilson512 have any opinions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_bustertool. 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