-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
Functional Schema Directives don't execute in LTR order as Legacy SchemaVisitor or directive resolvers #1606
Comments
You would combine whatever directives you need to be in LTR order (or any other order) into a single transformation function and pass multiple directive names as needed. This is essentially how directiveResolvers are currently implemented...... |
This should be better documented... |
If I understand correctly, I'd have to create a new directive / transform for every combination of these directives. I cannot reuse them by declaring them in the schema in different orders like For now, I created a new function Feel free to close this issue since my original question is clarified and there are approaches to solve these use cases. |
Closing, thanks so much! |
The behavior of schema transform based directive and SchemaVisitor based directives seems to be different in regards to their execution order if you specify multiple directives. For example
In this case, map always executed before filter regardless of placement on the field. I believe that schemaTransforms being an array introduces this order.
Are these two apis (SchemaVisitor vs functional) supposed to be interchangeable or complementary, especially since
schemaDirectives
is marked as Legacy?Is there an example where I can see how to rewrite a directive with the new API while preserving the order?
The text was updated successfully, but these errors were encountered: