-
Notifications
You must be signed in to change notification settings - Fork 146
Conversation
Provided interface types are named with a leading underscore, this will allow nodes with multiple labels (the concrete type with no underscore, plus some number of interfaces that all have an underscore prefix.) to work with fields referencing interfaces.
Codecov Report
@@ Coverage Diff @@
## master #301 +/- ##
=======================================
Coverage 95.47% 95.47%
=======================================
Files 10 10
Lines 2345 2345
=======================================
Hits 2239 2239
Misses 106 106
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #301 +/- ##
=======================================
Coverage 95.47% 95.47%
=======================================
Files 10 10
Lines 2345 2345
=======================================
Hits 2239 2239
Misses 106 106
Continue to review full report at Codecov.
|
Thanks for the PR @kraney! And apologies for taking so long to respond. Instead of choosing the correct interface label based on naming convention what we'd like to do is identify all the implementing types of an interface and pass those implementing types as an array of valid node labels as a Cypher parameter. Then the Cypher query can check to see which of those labels the node has and the Cypher query can return the correct implementing type. For example, this is how we did it in and you can see how the generated Cypher queries work with this "valid types" Cypher parameter: Would you be interested in working on that logic for this PR instead of using the underscore based convention? |
OK, makes sense. If I can find time, I can give a try at that approach. |
Great. If not we'll get to it as part of fixing up interface handling (as well as ensuring the generated mutations handle the multiple label approach for interface types) |
I believe this change has been obsoleted by my colleague over at #336 and can be closed. |
This is perhaps more of a workaround than a real fix
Provided interface types are named with a leading underscore, this will
allow nodes with multiple labels (the concrete type with no underscore,
plus some number of interfaces that all have an underscore prefix) to
work with fields referencing interfaces.