-
Notifications
You must be signed in to change notification settings - Fork 327
Adapt connectors expansion and validation to handle abstract types (interfaces and unions) #8143
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
base: benjamn/SchemaTypeRef-instead-of-Node-ObjectType
Are you sure you want to change the base?
Conversation
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: dec2409d5cdf91b7c16e84b1 |
4244cb9 to
6aef3e2
Compare
7e3a018 to
daa3c07
Compare
a7d8dc6 to
542122e
Compare
daa3c07 to
58c3f1e
Compare
4ae2941 to
eef1acc
Compare
eef1acc to
43f056a
Compare
58c3f1e to
d136783
Compare
d136783 to
331d46f
Compare
2a35586 to
756e131
Compare
331d46f to
4655d8e
Compare
0c91f46 to
d355501
Compare
4655d8e to
51ded4c
Compare
|
Going back to draft status because this PR needs a rework to make better use of |
51ded4c to
2d03e6b
Compare
|
@benjamn, please consider creating a changeset entry in |
2d03e6b to
018fdc8
Compare
018fdc8 to
2c0bb3c
Compare
|
Update: this PR has gotten a lot simpler (just two commits now!), but I still need to add proper |
a93d0b6 to
f3aafe4
Compare
2c0bb3c to
65f2f4d
Compare
a77dfd2 to
8d679e0
Compare
f769f51 to
1e6c80d
Compare
8d679e0 to
eaf069f
Compare
1e6c80d to
9cd4372
Compare
eaf069f to
e16d56d
Compare
9cd4372 to
1aafc27
Compare
e16d56d to
9f44e1c
Compare
1aafc27 to
f823c7d
Compare
9f44e1c to
41756d9
Compare
ca6ee21 to
53fc018
Compare
Note that we now have distinct `NamedSelection::parse_v0_3` and `NamedSelection::parse_v0_4` functions to preserve the differences between the versions for backwards/forwards compatibility.
Note: shape-based validation does work for v0.3, since -> method shape checking was quietly reenabled in v0.3 to support URI templating validation and a few other use cases, but it's important to match the old behavior we shipped.
41756d9 to
56ab2fc
Compare
53fc018 to
d6d88b7
Compare
Note
This PR builds on #8616 and #8626
Supporting the
...syntax in the JSONSelection mapping language (PR #7957) allowed for conditional selections, which allows for conditionally determining the__typenameof an object in GraphQL, which enables the use of abstract types (or type polymorphism): interfaces and union types that might be one of several concrete types, with the exact__typenameand associated fields determined at runtime.This PR updates the rest of the connectors system (beyond the JSONSelection language) to tolerate abstract types: relaxing validation to allow for abstract types, but also validating the fields of each concrete type; rewriting expansion to understand interfaces, unions, and JSONSelection strings that compute their
__typenameand other fields; and updating theshapecrate to support this new functionality. The new expansion and validation traversal logic is nowShape-based, which is the achievement that allows for static analysis of conditional__typenameselections.