Hacker News new | ask | show | jobs
by fire_lake 747 days ago
A GraphQL schema is a contract though.

And the REST API can still get hammered by the client - they could do an N + 1 query on their side. With GraphQL at least you can optimize this without adding a new endpoint.

1 comments

Yes, GraphQL is a "contract" in the sense that a blank check is also a "contract".
You can whitelist queries in most systems though. In development mode allow them to run whatever query, and then lock it in to the whitelist for production. If that type of control is necessary.