DEV Community

Johannes Lichtenberger
Johannes Lichtenberger

Posted on

Thoughts on GraphQL and REST / JSONiq

Hi all,

just a quick thought... let's say you provide a generic endpoint and have JSONiq[1] like query capabilities, which is basically XQuery for JSON based NoSQL document stores. Then probably also a Websocket for maybe "subscribing" for changes on the server.

Isn't it much more powerful to have something like SQL but for tree-structured (int this case JSON) data? At least I think it's much more powerful than what GraphQL provides, but it might lack the tooling support.

That said, you can elegantly combine or round up this approach with a more generic REST API. I think you simply need to know how to serialize your objects to JSON as in GraphQL.

Kind regards and have a nice weekend :-)
Johannes

[1] http://jsoniq.org/

Top comments (0)