Use GraphQL API with Lightning Web Components (Pilot)

The Lightning Web Components (LWC) framework implements core Web Components standards to enable developers to create reusable components on the Salesforce platform using standard HTML, JavaScript, and CSS. You can work with Salesforce data via Lightning Data Service, which is available to your components via base components like lightning-record-form or via wire adapters and functions.

With the GraphQL wire adapter, you can query Salesforce data using SOQL-like queries with functionalities like filtering, grouping, sorting, and aggregation. Your data is managed by Lightning Data Service and you don’t need different wire adapters for each query defined in the GraphQL schema, unlike the other LWC wire adapters. The extensive benefits of using the GraphQL wire adapter simplify and speed up access to your Salesforce data from your LWC web and mobile apps.

This feature is not generally available and is being piloted with certain Customers subject to additional terms and conditions. It is not part of your purchased Services. This feature is subject to change, may be discontinued with no notice at any time in SFDC’s sole discretion, and SFDC may never make this feature generally available. Make your purchase decisions only on the basis of generally available products and features. This feature is made available on an AS IS basis and use of this feature is at your sole risk.

To participate in this pilot, contact your Salesforce account executive or email graphql-adapter@salesforce.com.

Salesforce Developers' Blog: GraphQL Wire Adapter for LWC

Lightning Web Components Dev Guide: lightning/uiGraphQLApi Wire Adapters and Functions (Pilot)