-
Notifications
You must be signed in to change notification settings - Fork 527
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
Add failing test for macro deprecated field in SDL render #1045
Add failing test for macro deprecated field in SDL render #1045
Conversation
Thanks, good find. It seems like adding the directive is moving in the right direction... |
I started looking at this, but it's quite difficult to figure out what needs to be done for someone unfamiliar with the internals. Is the idea to introduce a Phase that'd extend relevant nodes' |
FWIW here's the workaround we have used to re-add directives back at the time https://gist.github.com/zoldar/d617f2037854ccfc26cd428e11df6ed7 |
We are also seeing this issue (upgrading from 1.5.5 to 1.6.5 removed all the deprecation warnings from our introspected schema). Are there any updates on fixing this bug? I am hesitant to update, for this reason :-/. |
@binaryseed Hi, let me clarify the situation so that I could potentially tackle on the issue:
BTW, I have found that |
@ymtszw that forum post is out of date. Absinthe does support calling directives in SDL. |
@benwilson512 Thanks, now it became clearer. Shame I haven't caught up with the latest features. So the missing part is: in macro-defined schema, collaterally add "deprecated" directives in nodes when they have I could possibly investigate this field in coming weekend(s). Any other guidance would be welcome if any. |
I would still really love to tackle on this but couldn't have taken my time. Maybe soon... FWIW our use case:
For this workflow, we compare |
Related attempt: #1110 |
I've created a PR to apply directives at the schema which also covers deprecations. This would also cover the |
Awesome! Here’s the PR if anyone else is curious: #1140 |
A field that is deprecated in the macro defined schema's is not rendered as deprecated in SDL. See this failing test case. This is a regression from Absinthe 1.5.5
In 1352d8f the deprecation directive was no longer special-cased, which works for SDL defined schema's, but not in macro defined schema's. The difference being that the macro schema's don't add a
deprecated
directive toAbsinthe.Blueprint.Schema.FieldDefinition.directives
, so it only relies on theFieldDefinition.deprecation
field.SDL schema's directives do add the
deprecated
directive to thedirectives
field, so they are rendered correctly in SDL. They rely on this directive expansion to set the deprecation field.We could either special case the
deprecated
directive again in the SDL renderer, or use the macro schema to add adeprecated
directive when deprecating a field (perhaps through a schema phase)