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

Explore different Graphql servers #12

Open
ESchouten opened this issue Mar 22, 2022 · 9 comments
Open

Explore different Graphql servers #12

ESchouten opened this issue Mar 22, 2022 · 9 comments
Assignees

Comments

@ESchouten
Copy link
Owner

ESchouten commented Mar 22, 2022

With KGraphQL development being stale since august 2021 and the developer going AWOL, other graphql server libraries should be considered.

Update JUNE 2022: KGraphQL author seems to have returned, looking for maintainers

Possible candidates:
Kaguya
GraphQL Kotlin
Possible official KTOR Graphql support post 2.0 release

@ESchouten ESchouten self-assigned this Mar 22, 2022
@LSafer
Copy link

LSafer commented Jul 12, 2022

I might add my implementation https://github.com/cufyorg/kaguya 😗

It is a kotlin-friendly wrapper for graphql-java with ktor integration

You might try the template https://github.com/cufyorg/ktor-graphql-template

@ESchouten
Copy link
Owner Author

ESchouten commented Jul 15, 2022

@LSafer Looks very nice and clean! Will definitely investigate your library further soon, added it to the list above.

@Francynox
Copy link
Contributor

@ESchouten I worked for a graphql-kotlin implementation.
If you want to take a look at it it is in my fork

@ESchouten
Copy link
Owner Author

@Francynox very impressive! What's your impression of graphql-(java/kotlin)? How does it compare to kgraphql? Do you like it?

@Francynox
Copy link
Contributor

sure, i want to make a list of pros and cons of the things saw in the library

Pros

  • maintained by a dedicated team of developers, at least that's what it says in the repository. I think ExpediaGroup use this library in production too
  • subscription support
  • very powerful schema generator that allows many customizations

Cons

  • wrapper of a Java library, I don't think it's a problem... but it's not "pure" kotlin
  • I have the impression that it is a little bit slower in executing requests compared to KGraphql
  • with the current implementation of usecases schema generation takes a lot of work, a change in schema generation could result in further changes (not sure about that)

Final tought
in general i think the library is stable and his strength is definitely the schema generator; I think it has to be preferred over KGraphql as, in my opinion, its future is a bit uncertain.

@ESchouten
Copy link
Owner Author

@Francynox I agree with your points
It seems a bit more powerful which might enable (or make easier) things like customizing parameter names, which are now a0, a1 etc.

The main thing I dislike about the library is how complex it is and how much more boilerplate is involved. The only thing we're using GraphQL for is the typed API, GraphQL is not integrated into our system.

Basically what I described in #18, btw what's your opinion on this statement + issue #18?

@LSafer
Copy link

LSafer commented Jul 17, 2022

@Francynox

I have the impression that it is a little bit slower in executing requests compared to KGraphql

No, its not. At least, not like what you think

KGraphQL uses reflection for invoking the resolver and it really rely on it, to the degree you can't escape it!

I don't know about the speed of kotlin reflection but it must be slower than no reflection.

@Francynox
Copy link
Contributor

@ESchouten

The main thing I dislike about the library is how complex it is and how much more boilerplate is involved. The only thing we're using GraphQL for is the typed API, GraphQL is not integrated into our system.

You're corerct, but i think with a library like this we can integrate Graphql by adding things like recirsive queries only by manipulating the schema and the dataFetcher
However, I don't know how much work it would actually take!

Basically what I described in #18, btw what's your opinion on this statement + issue #18?

Unfortunatelly i don't know much about OpenAPI but i think if we can add recursive queries successfully it would be nice to have Rest and Graphql both working

@LSafer

I don't know about the speed of kotlin reflection but it must be slower than no reflection.

You must be right! I have not tested the speed of KGraphql and graphql-kotlin properly, mine was just an on-screen impression, expecially with the LoginUser query

@ESchouten
Copy link
Owner Author

@Francynox I'm already serving a REST API in a separate project, will add it tomorrow or the day after. OpenAPI will come later, heard the Ktor team approximate late summer release.

Repository owner deleted a comment from renato71amorim Mar 4, 2024
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

No branches or pull requests

3 participants