-
Notifications
You must be signed in to change notification settings - Fork 174
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
Rework directives #663
Rework directives #663
Conversation
|
||
private fun <T : GraphQLDirectiveContainer> wireDirectives(wrapper: WiringWrapper<T>) { | ||
val directivesContainer = wrapper.graphQlType.definition as DirectivesContainer<*> | ||
val directives = buildDirectives(directivesContainer.directives, wrapper.directiveLocation) |
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.
Still waiting for an answer to my question here but building these directives on the fly seems to be the most likely solution, assuming that SchemaDirectiveWiringEnvironment#getDirective/s
remains not deprecated and we have to supply them somehow.
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.
Note: this was fixed in graphql-java/graphql-java#2834
Still, we should only remove this once the deprecated methods are removed.
12a3b17
to
236d20c
Compare
fbfdacb
to
673b343
Compare
673b343
to
9dfa462
Compare
} | ||
|
||
@Test | ||
fun `should apply repeated directive`() { |
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.
Fix for #615
Checklist
Description
Following the addition of applied directives in v18 I wanted to have a permanent solution to how we handle directives.
This ended up being mostly a re-implementation of
SchemaGeneratorDirectiveHelper
so I'm not sure of the benefit.The upside is that we no longer depend on copy-pasted code or deprecated API methods to wire the directives.