ChilliCream / ChilliCream/graphql-platform
NodeResolver for interface types
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.8k
- Forks
- 810
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 98
Description
Is your feature request related to a problem?
I have an interface type with two implementing object types. Both object types refer to the same entity, so they share the same Id. This Id is also part of the aforementioned interface.
Other object types have properties referencing these Ids. Since a global Id must be unique for a type, these properties referencing the interface type can not point to a concrete implementation. They have to be serialized for the interface type. This works fine.
The problem is with object identification. I currently have no way to specify a node resolver for an interface type. So I can't fetch the interface type through the node(s) field.
The solution you'd like
The global object identification spec speaks of identifying objects, but it's never explicitly said that an object must be an object type.
I think the best solution would be to allow to define a node resolver for an interface type.
Product
Hot Chocolate
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the NodeResolver implementation and the node(s) field handling for interface types. Trace how global object identification currently selects concrete object types, then determine what behavior is required for an interface-level resolver. Done means an interface node resolver can identify and fetch the shared entity through the node(s) field without breaking concrete type resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, graphql
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100