Hacker News new | ask | show | jobs
by supahfly_remix 2894 days ago
I'm only familiar with REST and not GraphQL, but this sounds interesting. Just from the name GraphQL sounds like a query language -- how can one do operations that change state (i.e., analogous to PUT/POST) rather than just query it? Thanks.
2 comments

It’s a QL in the sense that it accepts a client specified schema, that looks how the client wants the data to be returned.

How does it mutate then? SQL can mutate, I’m not sure why this would be any different. Basically, like SQL’s UPDATE, and INSERT, GQL can have “methods” associated with parts of the schema.

The name is a little misleading in that regard. GraphQL has mutations that tell the server to change data rather than just return a query.
Thanks. That helps!