score:0

Try: (using refetch)

    const { data, loading, error, refetch } = useQuery(ORGANISATIONS_QUERY);
    const useGetOrganisations = async () => {

        if (loading) {
            return 'Loading...';
        }
        if (error) {
            return `Error! ${error.message}`;
        }

        return dispatch({
            type: 'FETCH_ORGANISATIONS',
            payload: data.organizations,
        });
    };

Related Query

More Query from same tag