Skip to content

GraphQL

herougo edited this page Feb 5, 2025 · 1 revision

GraphQL Advantages

  • prevents over-fetching and under-fetching of data by allowing you to tailor queries and mutations to get only the fields and relations you need
  • provides more flexibility and consistency in accessing data from any resource with a single query, as well as combining data from different sources
  • Once the schema is defined, frontend and backend teams can work independently from one another

When to Use GraphQL

  • limited bandwidth (e.g. mobile)
  • Multiple data sources and you want to combine them with one endpoint

When to use REST

  • You have smaller applications with less complex data
  • You have data and operations that all clients use similarly
  • You have no requirements for complex data querying

Sources

Clone this wiki locally