graphql icon indicating copy to clipboard operation
graphql copied to clipboard

WIP: Interface relation query fixes

Open jnterry opened this issue 2 years ago • 0 comments

Description

Fixes a server error when filtering by connection fields in a where clause when the target of the relation is an interface.

Issue

This is a proof of concept to resolve https://github.com/neo4j/graphql/issues/1049 and may well not be an acceptable final solution.

This PR makes interfaces more of a first-class citizen by passing information about them down through the Context object which may be a useful starting point to solve various other bugs querying interfaces (of which there are many).

Note that the generated cypher query tends to be slow if an interface has many implementors. I would be happy to attempt to optimize the query, add unit tests, docs etc if this approach of making interface information available in the Context seems sensible. I expect it would also be helpful in supporting feature requests such as https://github.com/neo4j/graphql/issues/146

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • [ ] Documentation has been updated
  • [ ] TCK tests have been updated
  • [ ] Integration tests have been updated
  • [ ] Example applications have been updated
  • [ ] New files have copyright header
  • [ ] TCK tests have been updated
  • [ ] Integration tests have been updated
  • [ ] Example applications have been updated
  • [ ] New files have copyright header
  • [ ] CLA (https://neo4j.com/developer/cla/) has been signed

jnterry avatar Feb 25 '22 15:02 jnterry