apollographql / federation-hotchocolate

HotChocolate support for Apollo Federation
https://www.apollographql.com/docs/federation/
MIT License
16 stars 8 forks source link

fix: handle non-null in arg parser #18

Closed dariuszkuc closed 1 year ago

dariuszkuc commented 1 year ago

Federated ArgumentParser is used to map entity representation to method arguments. When unwrapping nested fields, current logic was not accounting to nullability of the underlying field. If the underlying field returned non-null object, parser would fail trying to find the target property on NonNull GraphQL wrapper (which obviously doesn't exist).

Updated argument parser object handling logic to unwrap non-null types.

Note: this PR only addresses the issue with non-null types. Similar bug is present when handling keys with list representations.

Resolves: https://github.com/apollographql/federation-hotchocolate/issues/6

github-actions[bot] commented 1 year ago

Apollo Federation Subgraph Compatibility Results

Federation 1 SupportFederation 2 Support
_service🟢
@key (single)🟢
@key (multi)🟢
@key (composite)🟢
repeatable @key🟢
@requires🟢
@provides🟢
federated tracing🔲
@link🟢
@shareable🟢
@tag🟢
@override🟢
@inaccessible🟢
@composeDirective🟢
@interfaceObject🟢

Learn more: