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?

Discussion (3)

_lexedwards profile image
Alex Edwards • Edited on

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

darthknoppix profile image
Seth Corker Author

Have you used GROQ before?

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