spring-projects-experimental / spring-fu

Configuration DSLs for Spring Boot
Apache License 2.0
1.67k stars 139 forks source link

Add GraphQL support #207

Open sdeleuze opened 5 years ago

sdeleuze commented 5 years ago

There seems to be 2 way of supporting GraphQL:

We need to see which one is the more relevant.

FVershinin commented 5 years ago

I started working on it.

sdeleuze commented 5 years ago

Awesome, thanks!

sdeleuze commented 5 years ago

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

FVershinin commented 5 years ago

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 commented 5 years ago

There seems to be 2 way of supporting GraphQL:

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.
sdeleuze commented 5 years ago

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

sdeleuze commented 5 years ago

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

sdeleuze commented 3 years ago

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