-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow maps as arguments in macros #1226
Allow maps as arguments in macros #1226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
I think the best place to convert the AST to maps would be in the Schema.Notation module. This to prevent the AST from leaking into other parts of Absinthe.
We can limit support to literal maps only for now. This would most closely match the SDL notation.
Note that this issue also happens elsewhere: #1024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best place to convert the AST to maps would be in the Schema.Notation module.
Agreed, this is a notation concern not a blueprint concern.
67ce2c9
to
b326789
Compare
Thanks for the feedback. I moved the logic to Notation as you both recommended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
When this will be released? |
This cause |
Hey @hauleth please file an issue with the relevant info on this. |
I found more info - it works, but when the keys are binaries, not when keys are atoms. I will try to post more info when I will find time to spare. |
The |
This is one approach to possibly solve the issue #1225
My main goal is to support passing a map in the arguments for a directive that is wrapped in an
extend
macro.