Skip to content
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

[apollo-ksp] Initial support for interfaces #5351

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

martinbonnin
Copy link
Contributor

Initial support for interfaces. The processor will look for descendant of Kotlin interfaces and make sure they are corresponds to the possible types of a given field:

interface Event

@ApolloObject
class MessageEvent(
    val channelId: String,
    val message: String
): Event

@ApolloObject
class AckEvent: Event {
  val ack: String = "ack"
}

Copy link

netlify bot commented Nov 3, 2023

Deploy Preview for apollo-android-docs canceled.

Name Link
🔨 Latest commit 13e8175
🔍 Latest deploy log https://app.netlify.com/sites/apollo-android-docs/deploys/6548aaf35928d80008b8306a

Copy link
Contributor

@BoD BoD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

val superTypes = entry.value.classDeclaration.superTypes.map { it.resolve().declaration.acClassName() }

superTypes.forEach {
logger.warn("${entry.value.className} extends $it")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 shouldn't be there

@martinbonnin martinbonnin merged commit b8b1031 into main Nov 6, 2023
9 checks passed
@martinbonnin martinbonnin deleted the better-validation-for-interfaces branch November 6, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants