ReasonJun

GraphQL : Concept 본문

Backend/GraphQL

GraphQL : Concept

ReasonJun 2023. 9. 4. 22:25
728x90

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. It is a declarative language, which means that you describe what data you want, not how to get it. This makes it more efficient and flexible than traditional REST APIs.

 

GraphQL is organized in terms of types and fields, not endpoints. This means that you can ask for exactly the data you need, without having to make multiple requests. For example, if you want to get the name and age of a user, you can simply ask for the name and age fields on the User type.

 

GraphQL is a powerful tool that can be used to build more efficient and flexible APIs. It is supported by a growing number of libraries and frameworks, making it easy to get started.

 

Here are some of the benefits of using GraphQL:

  • Efficiency: GraphQL can be more efficient than traditional REST APIs because it allows you to ask for exactly the data you need. This can reduce the number of requests that need to be made, and it can also improve performance.
  • Flexibility: GraphQL is a more flexible language than REST APIs. You can ask for data in any order, and you can also nest queries. This makes it easier to build complex applications.
  • Scalability: GraphQL can be scaled to handle large amounts of traffic. This is because GraphQL servers can cache queries and results, which reduces the load on the database.

If you are looking to build a more efficient, flexible, and scalable API, then GraphQL is a good option to consider.

Here are some of the popular GraphQL implementations:

  • Apollo Client: A JavaScript client library for GraphQL.
  • Relay: A JavaScript framework for building GraphQL applications.
  • GraphQL Yoga: A TypeScript framework for building GraphQL applications.
  • Hasura GraphQL Engine: A serverless GraphQL engine that can be used to build APIs without writing any code.

 

728x90

'Backend > GraphQL' 카테고리의 다른 글

GraphQL : Fetch Policy  (0) 2023.09.06
GraphQL : Normalization  (0) 2023.09.06
GraphQL : Cache  (0) 2023.09.06
GraphQL : Apollo  (0) 2023.09.05
GraphQL : Resolver  (0) 2023.09.04
Comments