Update mutation using GraphQL does not trigger Initially Subscribe to Updates attribute on the data source?

Hi,

I’m using a GraphQL mutation to update a data source based on an external event. I have the “Initially Subscribe to Updates” attribute enabled, but the updated values do not seem to reflect immediately—only after a refresh or waiting for some time. Is this intended? If so, is there a workaround to get immediate updates?

Hi, and welcome to the community. Live updates will not be triggered by updates from GraphQL. What you can try to do is to trigger a Set Data Source Attributes (action node) and connect it to the correct datasource, and set the attribute Disabled to true. And then right after trigger a second Set Data Source Attributes that you connect it to the same datasource and set the attribute disabled to false. This should make it read the data.

You can read more about the Set data source attributes here

I see, thank you for the information. Since the data is being inserted from AWS, is there a way to trigger the “Set Data Source Attributes” action without having to create a separate API specifically for this purpose? For example, is there an event within Appfarm that could be used to trigger this action when data is inserted via GraphQL?

Hi, event-based triggering of actions is something that is on our list of things we are planning to support, but not in the nearest future.

Options to solve this is to make a call to a service endpoint instead of GQL so that subscribe to updates works.

Or you could also use a timer to check for new data whenever and how often you want to. And if there is changes that can trigger the action that uses Set Data Source Attributes.