I suggest refreshing the grid in the following way: https://www.ag-grid.com/javascript-data-grid/server-side-model-updating-refresh/
Also, I’m not sure SSRM + react-query works fine together. You probably don’t need react query in this case - make direct api calls inside server side data source, as it is done in the example