New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GetInputExtension method #3615
Conversation
Change |
No, why? Because you had a cast in there? Just change the code to match on |
src/GraphQL/ResolveFieldContext/ResolveFieldContextExtensions.cs
Outdated
Show resolved
Hide resolved
src/GraphQL/ResolveFieldContext/ResolveFieldContextExtensions.cs
Outdated
Show resolved
Hide resolved
Because IReadOnlyDictionary<T,U> does not inherit IDictionary<T,U> and vice versa.
Does not compile. I rewrote it and added comment. |
|
||
lock (context.OutputExtensions) | ||
private static object? GetByPath(IDictionary<string, object?>? dictionary, string path, bool useLock) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest changing the signature here to IReadOnlyDictionary
here and the is IDictionary
line. It probably makes little difference, as the ImmutableDictionary
class and even the brand-new FrozenDictionary
class supports IDictionary
as well as IReadOnlyDictionary
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #3615 +/- ##
=======================================
Coverage 83.91% 83.92%
=======================================
Files 381 381
Lines 16876 16888 +12
Branches 2715 2717 +2
=======================================
+ Hits 14162 14173 +11
- Misses 2068 2069 +1
Partials 646 646
|
Why does
IResolveFieldContext.InputExtensions
hasIReadOnlyDictionary<string, object?>
type instead ofInputs
? Because of this I have to cast extensions