GraphQL in Play Framework(Java)

392 views
Skip to first unread message

Jay Hyber Carocoy

unread,
Feb 23, 2018, 2:27:10 PM2/23/18
to Play Framework
Is it possible to implement Graphql in Play Framework(Java)?

juan....@reduc.edu.cu

unread,
Feb 25, 2018, 8:56:12 PM2/25/18
to play-fr...@googlegroups.com
Hi. Sure it is! I am actively working on a Play 1.5 project whith a
GraphQL API. You can use just use com.graphql-java/graphql-java:7.0 but I
highly recommend aso using com.graphql-jav/graphql-java-tools:4.3.0.

For me, the more challenging part was translating existing examples to
Play, as all examplesI found were made for Spring. But as soon as you
understand graphql just needs a string with the query and Play just needs
to bind that string from http params, everything else will flow.

Perhaps you could get better results using Play 2.x (eg. for binding
directly from a JSON request body).

Also, if you are using Hibernate, it solves query batching for you.

Regards,
Juan Carlos

> Is it possible to implement Graphql in Play Framework(Java)?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Play Framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to play-framewor...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/play-framework/8334406b-235a-4ee1-8fbc-2b7b7eace7cd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> -------------------------------------------------------------------------------
> ---- Universidad de Camagüey "Ignacio Agramonte Loynaz", Cuba
> ----------------
> -------------------------------------------------------------------------------
> ---- 6 de noviembre de 2017
> ------------------------------------------------
> ----- Aniversario 50 de la Universidad de Camagüey "Ignacio Agramonte
> Loynaz"-
> ---- "50 años de ciencia y compromiso"
> ---------------------------------------
> -------------------------------------------------------------------------------
> ---- Aniversario 95 de la FEU
> -------------------------------------------------
> ---- https://www.reduc.edu.cu/
> ------------------------------------------------
> -------------------------------------------------------------------------------


-------------------------------------------------------------------------------
---- Universidad de Camagüey "Ignacio Agramonte Loynaz", Cuba ----------------
-------------------------------------------------------------------------------
---- 6 de noviembre de 2017 ------------------------------------------------
----- Aniversario 50 de la Universidad de Camagüey "Ignacio Agramonte Loynaz"-
---- "50 años de ciencia y compromiso" ---------------------------------------
-------------------------------------------------------------------------------
---- Aniversario 95 de la FEU -------------------------------------------------
---- https://www.reduc.edu.cu/ ------------------------------------------------
-------------------------------------------------------------------------------

Marcos Pereira

unread,
Mar 1, 2018, 3:55:21 PM3/1/18
to play-fr...@googlegroups.com

On Wed, Feb 21, 2018 at 9:36 PM, Jay Hyber Carocoy <jayhyber....@gmail.com> wrote:
Is it possible to implement Graphql in Play Framework(Java)?

--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.



--
Marcos Pereira
Software Engineer, Lightbend.com

Greg Methvin

unread,
Mar 1, 2018, 4:10:21 PM3/1/18
to play-framework
Sangria was my first thought as well but he said he was using Java. If you're willing to consider Scala it's a nice option though.

Reply all
Reply to author
Forward
0 new messages