Skip to main content
Version: Next

Offline Execute And Cache Query

Triggers the execution of a query and cache its result for future offline use.

Description

Runs the query. The output query result contains an ordered list of objects matching the query.

Unlike Offline: Observe and Cache Query, Offline: Execute and Cache Query produces a single result, valid at the time of execution.

If the query is done when online, the result is saved in the cache entry using the cache id if provided. This allow the data to be queryable in the future even offline. (see Offline: Clear Cache Entry to clear the entry).

Feel free to explore the demo app showcasing main offline concepts in this <a href="#item=018e5b730217546bb956">demo application</a>

Inputs

  • query (Query): The query to be executed
  • Control Flow (Control Flow)
  • cache id (String): If provided, will keep the result of this query in the cache with the given name.

Outputs

  • query result (Query Result): The resulting list of objects matching the query
  • Control Flow (Control Flow)
  • error (Error Flow): Forward an error when the execution of the query fails.