How to force client side refresh of GraphQL queries for a dashboard app

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets, and reproduction steps)

Trying to build a dashboard app that will render a dynamic list of cards, and each card contains data coming from a live production system.
I want the frontend to update/run the GraphQL queries (at least) each time the user reloads the page, in order to see the relevant cards with their updated data attributes.

What have you tried so far? (please link relevant docs and other forum posts)
I have used the GraphQL Fetcher to retrieve the cards and their data. However, when I publish, the queries are never re-run on the client side. This results in the dashboard not reflecting when the underlying data changes.

(I am using Plasmic hosting for now).

I personally haven’t had any issues using the newer Data queries/operation section instead of the GraphQL Fetcher component!



It runs/returns the latest data on page load and I can use “Repeat element” to iterate any elements using the data.


This way you can also add interactive elements to update or “refresh” the queries! In this other example, my button performs a mutation to update data and then re-queries with the new data.

1 Like