How to use the react-query.queryCache.refetchQueries function in react-query

To help you get started, we’ve selected a few react-query examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Mines-Paristech-Students / Portail-des-eleves / frontend / src / components / associations / page / create / AssociationCreatePage.tsx View on Github external
onSuccess: () => {
      sendSuccessToast("Page créée.");
      history.push(`/associations/${association.id}`);
      return queryCache.refetchQueries("pages.list");
    },
    onError: (errorAsUnknown) => {
github Mines-Paristech-Students / Portail-des-eleves / frontend / src / components / repartitions / NewRepartition.tsx View on Github external
onSuccess: () => {
      queryCache.refetchQueries(["campaigns.list"]);
    },
    onError: (errorAsUnknown) => {
github Mines-Paristech-Students / Portail-des-eleves / frontend / src / components / user / profile / edit / EditUserProfile.tsx View on Github external
onSuccess: () => {
          queryCache.refetchQueries(["profile.get"]);
          sendSuccessToast("Profil mis à jour.");
        },
        onError: (errorAsUnknown) => {
github Mines-Paristech-Students / Portail-des-eleves / frontend / src / components / associations / library / management / AssociationLoanableEdit.tsx View on Github external
onSuccess: () => {
      sendSuccessToast("Modifications enregistrées");
      queryCache.refetchQueries("loanables.get");
      queryCache.refetchQueries("loanables.list");
    },
    onError: () => sendErrorToast("Une erreur est survenue"),
github Mines-Paristech-Students / Portail-des-eleves / frontend / src / components / associations / events / edit / AssociationEditEvent.tsx View on Github external
onSuccess: () => {
      queryCache.refetchQueries(["events.list"]);
      sendSuccessToast("Événement supprimé.");

      history.push(`/associations/${association.id}/evenements`);
    },
    onError: (errorAsUnknown) => {
github Mines-Paristech-Students / Portail-des-eleves / frontend / src / components / associations / library / management / AssociationLoanableEdit.tsx View on Github external
onSuccess: () => {
      sendSuccessToast("Modifications enregistrées");
      queryCache.refetchQueries("loanables.get");
      queryCache.refetchQueries("loanables.list");
    },
    onError: () => sendErrorToast("Une erreur est survenue"),
github Mines-Paristech-Students / Portail-des-eleves / frontend / src / components / associations / events / create / AssociationCreateEvent.tsx View on Github external
onSuccess: (response) => {
      queryCache.refetchQueries(["events.list"]);
      sendSuccessToast("Événement créé.");
    },
    onError: (errorAsUnknown) => {