DEV Community

Seth Corker
Seth Corker

Posted on

GROQ vs. GraphQL?

Sanity CMS supports query language called GROQ but you can also query data with GraphQL.

This got me thinking, what does GROQ give me that GraphQL doesn't. I'm interested in hearing your thoughts if you've used one, the other or both! What's the deal with GROQ?


What's your experience of GROQ and is there a reason to use it over a plain GraphQL query?

Top comments (2)

Collapse
 
_lexedwards profile image
Alex Edwards • Edited

Currently using Sanity CMS in a project @ work - The team look as if they've got good momentum but specifically to Sanity, they seem to be more focused on a adaptability of GROQ. Documentation/support is more focused on GROQ, which might be detriment to users who are wanting to actively pursue GraphQL. Especially with their Gatsby plugin which is missing a couple of key features where we've had to utilise a couple of _raw fields which isn't ideal.


That said, I've looked @ GROQ, but definitely went for GraphQL for ease of use

Collapse
 
darthknoppix profile image
Seth Corker

Have you used GROQ before?

Thanks for the link, I’m leaning towards GraphQL too because of adoption.