-
Notifications
You must be signed in to change notification settings - Fork 14
Claude/async typed object factory cz yhz #29
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
base: develop
Are you sure you want to change the base?
Changes from 4 commits
80d8d27
167fa30
62254bf
f6e0f33
e367a4d
1aa1318
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,7 @@ class ResultStreamAuthorizationDecorator( | |
| return stream.mapNotNull { value -> | ||
| // first, parse back to a typed instance | ||
| val valueAsTypedInstance = TypedInstance.from(instanceType, value, querySchema, source = Provided) | ||
| val evaluatedTypedInstance = policyEvaluator.evaluate(valueAsTypedInstance, queryContext, executionScope) | ||
| val evaluatedTypedInstance = kotlinx.coroutines.runBlocking { policyEvaluator.evaluate(valueAsTypedInstance, queryContext, executionScope) } | ||
| // Convert back to a raw object, since that's what we started with | ||
| evaluatedTypedInstance.toRawObject() | ||
|
||
| } | ||
|
|
||
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.
The
as Mono<Authentication>cast aftersubscribeOn(...)is a code smell and can mask type inference issues.Mono.createshould be parameterized asMono.create<Authentication> { ... }(or useMono.fromCallable/Mono.defer) so the method returns a correctly typedMono<Authentication>without an unsafe cast.