-
Notifications
You must be signed in to change notification settings - Fork 324
Port compose.directiveArgumentMergeStrategies.test.ts to router
#8311
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
Conversation
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 14a3218cfdd0a34d973a5c81 |
|
@conwuegb, please consider creating a changeset entry in |
apollo-federation/src/schema/argument_composition_strategies.rs
Outdated
Show resolved
Hide resolved
apollo-federation/tests/composition/directive_argument_merge_strategies.rs
Outdated
Show resolved
Hide resolved
apollo-federation/tests/composition/directive_argument_merge_strategies.rs
Show resolved
Hide resolved
apollo-federation/tests/composition/directive_argument_merge_strategies.rs
Outdated
Show resolved
Hide resolved
apollo-federation/tests/composition/directive_argument_merge_strategies.rs
Outdated
Show resolved
Hide resolved
apollo-federation/tests/composition/directive_argument_merge_strategies.rs
Outdated
Show resolved
Hide resolved
apollo-federation/tests/composition/directive_argument_merge_strategies.rs
Outdated
Show resolved
Hide resolved
apollo-federation/tests/composition/directive_argument_merge_strategies.rs
Outdated
Show resolved
Hide resolved
…nwuegb/fed-686
…irective arguments (#8487)
Most argument merging strategies are not used by public-facing directives, so the following strategies have been skipped: - min - intersection - nullable_and - nullable_max - nullable_union
Doing this in favor of converting that test into a unit test, as it is not trivial in Rust to define a custom directive from an integration test. This work will be associated with a new ticket: [FED-879](https://apollographql.atlassian.net/browse/FED-879)
…nwuegb/fed-686
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 good.
Approved with a minor suggestion.
[PR#8520](#8520) ports a behavior that propagates the correct error code.
…nwuegb/fed-686
…nwuegb/fed-686
Decided in standup to forgo using rstest in order to simplify the port. All other requested changes have been made.
Port tests from compose.directiveArgumentMergeStrategies.test.ts.
The tests could not be ported 1:1 since, in their original form, they are serving more as unit tests for the individual merge strategies than as integration tests. Instead of creating directives for each merge strategy, the Rust tests use existing directives as a proxy for the merge strategies themselves. At present, two merge strategies are not being used by existing directives so they were skipped in this port:
One particular test, "errors when declaring strategy that does not match the argument type", could not be ported using existing directives because a custom directive is required to be able to achieve that particular failure case. That test will be ported as a unit test in a future PR.
This change also adds a helper function for comparing
CompositionHints.An error was surfaced due to the additional error code checking added to composition::assert_composition_errors(...), so I've fixed it in this PR as well.
Checklist