Add nested key entity support for GraphQL Federation#1476
Add nested key entity support for GraphQL Federation#1476JBodkin-Amphora wants to merge 3 commits into
Conversation
Signed-off-by: James Bodkin <james.bodkin@amphora.net>
436ea02 to
d0ce0fb
Compare
Signed-off-by: James Bodkin <james.bodkin@amphora.net>
c7b49dc to
c09b84b
Compare
|
@bclozel Would it be possible to get some feedback on this PR? |
rstoyanchev
left a comment
There was a problem hiding this comment.
@JBodkin-Amphora you're proposing the binding to be done from the full representation map. Is that based on something concrete, and is it not possible for example that it might be a submap under a specific key?
|
@rstoyanchev The representation map is populated by the GraphQL Federation Gateway based on the There are two unit tests in this PR that show the different field sets:
The first case is easy to identify, as the representation map will contain 3 fields: The second case is more difficult to identify, as it will contain Since the argument binder already supports recursion, further nested keys should be supported already. |
|
I have some concerns about the approach, even changing the checking to a map doesn't help in the instance of null values. I've been playing around locally and this seems to be better in my mind and matches against what the apollo federation js library does. It needs some defensive programming and probably caching as we don't want to parse the fields on every request. |
Signed-off-by: James Bodkin <james.bodkin@amphora.net>
This pull request adds support for nested keys in GraphQL Federation when using the EntityMapping annotation. Additionally, isOmitted is always set to false for entity mapping, as the GraphQL Gateway will not send requests when the object is null