Sunday, 8 December 2024

GraphQL

 Query language specification & runtime for APIs.

Single endpoint for all resources to be aggregated.

Efficient because only necessary data is requested.


TYPES :

Query : Entry point for read operations

Mutation : Entry point for create,update and delete.


EDGES :

Handles lists or relationships between nodes.

Links multiple nodes with info about the relationship.


NODES :

Individual data object or entity in schema.

Often encapsulate specific fields of the data.


ex :


query accounts {

  uiapi {

    query {

   Account {

     edges {

    node {

   Id

   Name {

      value

   }

}

   }

}

  

  }


}


No comments:

Post a Comment