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

feat(meta): Passes meta to result description functions [#1904] #1910

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

bever1337
Copy link
Contributor

The internal and public interfaces for result descriptions are getting a little spread out, but I didn't see an easy solution to simplify the result description callback interface without a breaking change. This seems perfectly functional and passes tests. I didn't see any existing testing for calculateProvidedBy, so I didn't try to take that on.

After feedback, I will be glad to update the corresponding docs.

References #1904

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 20fd4d8:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
rsk-github-issues-example Configuration
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration

@markerikson
Copy link
Collaborator

Seems reasonable. Thanks!

@markerikson markerikson merged commit d4e95ca into reduxjs:master Jan 13, 2022
@bever1337
Copy link
Contributor Author

Thanks @markerikson . I'll put together a second PR for docs changes in the next couple of days.

@@ -513,6 +513,7 @@ export function calculateProvidedByThunk(
isFulfilled(action) ? action.payload : undefined,
isRejectedWithValue(action) ? action.payload : undefined,
action.meta.arg.originalArgs,
action.meta,
Copy link
Member

@phryneas phryneas Jan 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for chiming in late, but I'm like 80% sure that this is the "wrong meta".

I'm pretty sure this would need to be action.meta.baseQueryMeta.

Can you please verify this?

@phryneas
Copy link
Member

phryneas commented Feb 3, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants