GraphQL

Introduction

  • It is a solution that provide flexibility on response data format from server

  • The data format is defined from client side

Flow

  • Here is the format of query

  • Include operation type and request fields

  • The client will send request on one single API end point with query definition

  • The server will implement the logic based the operation type and definition

  • The data with specific format will be sent back to client

Operation Types

  • There are 3 types - Query, Mutation, Subscription

Query

  • Acts like get method of API to fetch the data

Mutation

  • Acts like post, put, delete method of API to modify the data

Subscription

  • The server will active push message to client subscribed

Last updated

Was this helpful?