-
Notifications
You must be signed in to change notification settings - Fork 9
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 pre-merge validation rule to ensure that there are no missing field arguments #89
Comments
This issue highlights a gap in validation that arises when arguments - both required and optional - are mismatched across subgraphs. While schemas can technically compose, the ambiguity in expected execution behavior can create runtime challenges. The Problem:From a technical perspective, fields with differing arguments are still considered equal as long as their return type and shared arguments are compatible. However, this equivalence introduces ambiguity in execution behavior when arguments differ. Example with Required Arguments:# Schema A
type Example {
field(arg1: String!, arg2: Int!): Int
}
# Schema B
type Example {
field(arg1: String!): Int
} In this case:
However, when a query provides
Example with Optional Arguments:# Schema A
type Example {
field(where: Filter): [Values]
}
# Schema B
type Example {
field(order: [OrderBy]): [Values]
} Here, both
The ambiguity raises similar questions:
Open Questions:
|
The assumption here was wrong. Arguments & Input Objects should be merged by intersection |
Probably similar to
External Argument Missing
, but for all fields (not only external fields).The text was updated successfully, but these errors were encountered: