Release Preview

This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

GraphQL API (68.0)

Download OpenAPI specification:Download

GraphQL API provides a single endpoint that returns exactly what you request for. You can introspect the schema to define your request with the data you need. The schema contains concrete representations of Salesforce objects, following the object-level and field-level security settings of the context user.

To learn how to authenticate and authorize requests, see Authorization.

To learn what's new with GraphQL API and see versioned reference changes, see Release Notes.

Send Query

Execute a GraphQL query.

Before you can send a GraphQL API query, make sure you set up authorization by following a Quick Start. You need an API access token to authenticate your requests via a client like Altair or Postman. For example requests, see the Postman Collection.

Request Body schema: application/json
object

The extensions to the input.

operationName
string

The operation that’s being executed.

query
required
string

The GraphQL query.

object

The variables for the query.

Responses

Request samples

Content type
application/json
{
  • "query": "query accounts { uiapi { query { Account { edges { node { Name { value } } } } } } }"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "errors": [
    ],
  • "extensions": { }
}