spring-fu icon indicating copy to clipboard operation
spring-fu copied to clipboard

Add GraphQL support

Open sdeleuze opened this issue 5 years ago • 8 comments

There seems to be 2 way of supporting GraphQL:

  • https://github.com/graphql-java/graphql-java-spring
  • https://github.com/ExpediaDotCom/graphql-kotlin

We need to see which one is the more relevant.

sdeleuze avatar May 06 '19 09:05 sdeleuze

I started working on it.

FVershinin avatar May 16 '19 19:05 FVershinin

Awesome, thanks!

sdeleuze avatar May 17 '19 05:05 sdeleuze

@FVershinin Any update? I recently found https://github.com/ExpediaDotCom/graphql-kotlin which is pretty interesting. Are you using it or another library?

sdeleuze avatar Jun 12 '19 15:06 sdeleuze

Yes. I am using this library to generate graphql schema.

Current status:

  1. Added kotlin-dsl for "ExpediaDotCom/graphql-kotlin"
  2. Added support operations "query" and "mutation"
  3. Added support for webmvc and webflux
  4. Added dsl to configure graphql
  5. Added support graphiql https://github.com/graphql/graphiql

sample: https://github.com/FVershinin/spring-fu/blob/spring-graphql/samples/kofu-servlet-graphql/src/main/kotlin/com/sample/Application.kt

my branch: https://github.com/FVershinin/spring-fu/tree/spring-graphql

Now I am trying to integrate graphql-java with WebSocket, Flux WebSocket and RSocket.

FVershinin avatar Jun 12 '19 21:06 FVershinin

There seems to be 2 way of supporting GraphQL:

  • https://github.com/graphql-java/graphql-java-spring
  • https://github.com/ExpediaDotCom/graphql-kotlin

We need to see which one is the more relevant.

They are resolving two different tasks:

  1. ExpediaDotCom/graphql-kotlin focuses on generate graphql schema.
  2. graphql-java/graphql-java-spring focuses on HTTP execution.

FVershinin avatar Jun 13 '19 19:06 FVershinin

Thanks for your feedback and the PR. I would be super interested to see how RSocket and GraphQL could be used together!

sdeleuze avatar Jun 18 '19 13:06 sdeleuze

Another source of inspiration from @tgirard12 https://github.com/tgirard12/graphql-kotlin-dsl

sdeleuze avatar Jun 29 '19 15:06 sdeleuze

Solving this issue should probably leverage the new Spring GraphQL support incubating in https://github.com/spring-projects-experimental/spring-graphql.

sdeleuze avatar Dec 07 '20 15:12 sdeleuze