Skip to main content

Posts

Showing posts from December, 2023

What is GraphQL and Salesforce GraphQL ?

  GraphQL is a query language for APIs (Application Programming Interfaces) created by Facebook in 2012 and open-sourced in 2015. It provides a more efficient, powerful, and flexible alternative to traditional RESTful APIs. With GraphQL, clients can request only the specific data they need from a server, allowing them to fetch multiple resources in a single request. This solves the over-fetching or under-fetching of data commonly associated with REST APIs, where endpoints often return more or less data than needed. Key components of GraphQL include: Schema: Defines the data structure and types available in the API. It describes what queries can be made and what data can be retrieved. Queries: Clients can request specific data by writing queries that match the structure of the API's schema. These queries are sent to the server, which responds with exactly the requested data. Mutations: Used to modify data on the server. Unlike queries that retrieve data, mutations create, update,...