-
-
Notifications
You must be signed in to change notification settings - Fork 786
Open
Description
graphql-platform/src/HotChocolate/Core/test/Types.Analyzers.Tests/DataLoaderTests.cs
Line 279 in b5b4f7b
public static KeyValuePair<int, Entity2> CreateLookupKey(Entity1 key) |
This seems like it is working when in fact it isn't. Because it expected that the lookup delegate return a nullable KeyValuePair<TKey, TValue>
. It does not come up during your tests because you are not compiling or checking the compilation errors, you're just snapshotting.
See the signature here:
public static IPromiseCacheObserver Create<TKey, TValue, TObservedValue>(
Func<TObservedValue, KeyValuePair<TKey, TValue>?> createLookup,
DataLoaderBase<TKey, TValue> dataLoader)
where TKey : notnull
You have to update the source generator to expect KeyValuePair<TKey, TValue>?
instead of KeyValuePair<TKey, TValue>
.
Metadata
Metadata
Assignees
Labels
No labels