-
Notifications
You must be signed in to change notification settings - Fork 24
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
defer classes to talk to gateway #518
Conversation
@@ -1,7 +1,16 @@ | |||
package graphql.nadel | |||
|
|||
import graphql.incremental.DelayedIncrementalPartialResult | |||
import org.reactivestreams.Publisher | |||
|
|||
open class ServiceExecutionResult @JvmOverloads constructor( |
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.
can we make ServiceExecutionResult
sealed
, and not make NadelncrementalServiceExecutionResult
open
?
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.
oh yeah, forgot to change that back
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.
@felipe-gdr Hmm, I'm not sure if this is what we want actually. Sealed types cannot be instantiated, but it needs to be instantiated here in IntrospectionService.kt
(causing the build error)
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.
Ah right
[A sealed class is abstract by itself, it cannot be instantiated directly](https://kotlinlang.org/docs/sealed-classes.html#location-of-direct-subclasses)
We could create a ServiceExecutionResultImpl
class that extends it and instantiate that instead.
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.
Changed, thanks
No description provided.