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

upgrade to ktor 3 #2055

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

upgrade to ktor 3 #2055

wants to merge 4 commits into from

Conversation

TheDome0
Copy link

🔗 Related Issues

#2037

@TheDome0
Copy link
Author

there are still three tests failing, two of them due to an NPE in KtorGraphQLRequestParser where I'm not really sure what's happening

@ronjunevaldoz
Copy link

any update on this one :)

@TheDome0
Copy link
Author

TheDome0 commented Dec 6, 2024

No, because in v9 I ran into a different problematic issue where you cannot have a class which implements an interface as a response for graphql queries.

ConflictingTypesException: Conflicting class names in schema generation [class com.example.TestError, class com.example.TestError]

sealed interface Err {
    val message: String
}

data object TestError: Err {
    override val message: String = "Test error"
}

class TestQueries : Query {
    suspend fun test(): TestError = TestError
}

Removing the message property from the interface fixes it, but there are also other situations like implementing multiple interfaces (typical error union setup) where this happens.

I tried adding a custom willgenerateGraphQLType hook but then I'm getting You have redefined the type 'TestError' from being a 'GraphQLObjectType' to a 'GraphQLObjectType'.

And this does not happen in v8 / prior to Kotlin 2.0

https://github.com/TheDome0/graphql-repros

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants