Hacker News new | ask | show | jobs
by typedef_struct 2052 days ago
Is GQL still an abstraction that doesn't map at all to the underlying datastore, so that any given query can be arbitrarily slow?
1 comments

Kind-of, but there are workarounds. There are a number of plugins to various GraphQL servers that can compute a query complexity and disallow queries that exceed the complexity. You can also restrict arbitrary queries and only the queries in your codebase (e.g., to prevent external people from executing extremely costly queries).

Kind-of because you can structure your database to work well with GraphQL, especially using DataLoader to solve N+1 problems.