Re:Ask HN: Were you happy moving your API from REST to GraphQL?
by supahfly_remix on Thursday July 19, 2018 @09:27AM
(#17566029)
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.
Re:Ask HN: Were you happy moving your API from REST to GraphQL?
by asimpletune on Thursday July 19, 2018 @09:33AM
(#17566079)
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.
Re:Ask HN: Were you happy moving your API from REST to GraphQL?
by the99thguy on Thursday July 19, 2018 @09:32AM
(#17566073)
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.
Re:Ask HN: Were you happy moving your API from REST to GraphQL?
by supahfly_remix on Thursday July 19, 2018 @09:37AM
(#17566114)
Thanks. That helps!
The main disappointment is that input types are not nearly as expressive as output types.