Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WithCalls store every result in the state #62

Closed
francobasilico opened this issue May 6, 2024 · 1 comment · Fixed by #63
Closed

WithCalls store every result in the state #62

francobasilico opened this issue May 6, 2024 · 1 comment · Fixed by #63
Assignees
Labels
enhancement New feature or request question Further information is requested released signals

Comments

@francobasilico
Copy link
Collaborator

francobasilico commented May 6, 2024

WithCalls feature is great for making the request and tracking status, errors and result.

WithCalls allows me to use onSuccess to manipulate the result But what if I don't want to store the whole result of the call?

Is there any way I can ignore storing the result and just get the benefit of the tracking status/errors?

withCalls(
    (store, dataService = inject(WebCoreDataAccessService), downloadService = inject(FileDownloaderService)) => ({
      downloadInvoice: {
        call: ({ id, fileName }: { id: string; fileName: string }) => {
          downloadService.downloadFile(`${environment.api}/invoicing/${id}`, fileName);
          return of(true);
        },

        mapPipe: 'switchMap',
      },
    }),
  ),

In this example downloadInvoice is an operation that doesn't generate result

@francobasilico francobasilico added enhancement New feature or request question Further information is requested labels May 6, 2024
gabrielguerrero pushed a commit that referenced this issue May 6, 2024
Added prop dontStoreResult to withCalls, when true the result will not be stored, and the result
prop will not be added to the store

fix #62
gabrielguerrero pushed a commit that referenced this issue May 6, 2024
Added prop dontStoreResult to withCalls, when true the result will not be stored, and the result
prop will not be added to the store

fix #62
gabrielguerrero pushed a commit that referenced this issue May 6, 2024
Added prop dontStoreResult to withCalls, when true the result will not be stored, and the result
prop will not be added to the store

fix #62
gabrielguerrero pushed a commit that referenced this issue May 6, 2024
Added prop storeResult to withCalls, when false the result will not be stored, and the result
prop will not be added to the store

fix #62
gabrielguerrero pushed a commit that referenced this issue May 6, 2024
Added prop storeResult to withCalls, when false the result will not be stored, and the result
prop will not be added to the store

fix #62
Copy link

github-actions bot commented May 6, 2024

🎉 This issue has been resolved in version 17.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested released signals
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants