Skip to content

getting getRunningQueriesThunk() is not a function during SSR #6

@browynlouis

Description

@browynlouis

I'm trying to run rtkQuery during SSR, all goes well until it gets to dispatching the getRunningQueriesThunk and I get the following function TypeError: _features_api_subApis_propertyApi__WEBPACK_IMPORTED_MODULE_4__.propertyApi.util.getRunningQueriesThunk is not a function

export const getServerSideProps = reduxWrapper.getServerSideProps(
  (store) => async (context) => {
    const propertyId = context.params?.propertyId;

    store.dispatch(getProperty.initiate(propertyId));

    const response = await Promise.all(
      store.dispatch(propertyApi.util.getRunningQueriesThunk())
    );
    console.log(response);

    return {
      props: {},
    };
  }
);

I have tried looking for solution online, but I found none,
When I check the methods/functions of the api.util, I see the old getRunningOperationPromises and cannot find getRunningQueriesThunk
Please how can I solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions