Use Salesforce Features While Offline

Although LWC Offline is intended to “just work” when you use features while offline, there are nuances and additional considerations for using some features while offline. This chapter provides details for how to use these features effectively in LWCs to make them offline-ready.

  • Use GraphQL While Mobile and Offline

    GraphQL, often shortened to GQL, is a flexible, powerful query language for accessing record and other data. You can think of GraphQL as a modern equivalent of SQL, the query language for relational databases.

  • Use Apex While Mobile and Offline

    Use Apex-backed wire adapters and imperative Apex in your Lightning web components to call Apex methods in your org.

  • Use Images in an LWC Offline-Enabled Component

    Lightning Web Components supports multiple ways of referencing graphics assets in a component. Not all of these methods work when the component runs offline. LWC Offline supports several methods of referencing images in your offline-ready Lightning web components.

  • Upload Images While Offline

    Upload files, such as images, to Salesforce, even when your mobile client is offline. For example, upload photos of equipment installed during a service call, even if there’s no Internet service available. Images upload when your mobile device regains network service.

  • Use Third-Party JavaScript in an LWC Offline-Enabled Component

    Use static resources to provide access to third-party JavaScript libraries in your Lightning web components. To enable JavaScript libraries in static resources to be used while offline, follow these guidelines.

  • Navigation

    Build navigation for Lightning web components.