Salesforce GraphQL API with multiple conditions

Salesforce GraphQL API with multiple conditions

In the Salesforce GraphQL API Query WHERE condition, we can use multiple conditions separated by the comma.

For Salesforce GraphQL API connection setup from PostMan, please use the following

In the following example, Accounts with Industry value equal to Technology and Annual Revenue greater than or equal to 120000 are fetched.

Example:

query technologyAndRevenue120kPlusAccount {
  uiapi {
    query {
      Account( where:  { 
            Industry: { eq: "Technology" },
            AnnualRevenue: { gte: 120000 }
        } ) {
        edges {
          node {
            Id
            Name {
              value
            }
            AccountNumber {
              value
            }
            Industry {
              value
            }
            AnnualRevenue {
              value
            }
          }
        }
      }
    }
  }
}

Leave a Reply