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

task(docs): Updates docs to include result description meta param [#1904] #1934

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bever1337
Copy link
Contributor

@bever1337 bever1337 commented Jan 17, 2022

Updates docs to reflect changes after PR-1910 was merged.

References

Note: this should also be attached to #1926.

@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 939e8ac:

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

@bever1337
Copy link
Contributor Author

The CI looks grumpy, but it seems appropriate to fail deploys from unsolicited PRs. Please let me know if there are additional tests I can run to validate docs changes

@markerikson
Copy link
Collaborator

The docs builds have been finicky ever since we switched to Yarn v3, although it seems to be more something to do with Netlify caching somehow. Usually a "Clear Cache and Rebuild" command on the Netlify dashboard resolves it.

@netlify
Copy link

netlify bot commented Jan 18, 2022

✔️ Deploy Preview for redux-starter-kit-docs ready!

🔨 Explore the source changes: 939e8ac

🔍 Inspect the deploy log: https://app.netlify.com/sites/redux-starter-kit-docs/deploys/61e64d0dcccf0a86af07e2b5

😎 Browse the preview: https://deploy-preview-1934--redux-starter-kit-docs.netlify.app

Copy link
Member

@msutkowski msutkowski left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together! I had a quick thought while reading through this, but it's not blocking. Let's see if anyone else chimes in :)

@@ -398,6 +398,7 @@ When using the function notation, both the `providesTags` and `invalidatesTags`
- result: `ResultType` | `undefined` - The result returned by a successful query. The type corresponds with `ResultType` as [supplied to the built endpoint](#typing-query-and-mutation-endpoints). In the error case for a query, this will be `undefined`.
- error: `ErrorType` | `undefined` - The error returned by an errored query. The type corresponds with `Error` as [supplied to the `baseQuery` for the api](#typing-a-basequery). In the success case for a query, this will be `undefined`.
- arg: `QueryArg` - The argument supplied to the `query` property when the query itself is called. The type corresponds with `QueryArg` as [supplied to the built endpoint](#typing-query-and-mutation-endpoints).
- meta: `MetaType` | `undefined` - The optional `meta` value returned by `baseQuery`
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, this is tricky to communicate. When using fetchBaseQuery, this will actually be a combination of baseQueryMeta (the type FetchBaseQueryMeta) and a maybe user-defined SomeCustomInjectedMetaAUserProvides. This results in an object that looks like: { request: Request, response?: Response, ...someCustomInjectedMeta }. This will be present for any fulfilled or rejected request.

This might be fine for now, but we'll definitely want to revisit this as well as the Adding Meta information to queries section in customizing-queries.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I appreciate the clarification. Let me chew on this feedback and I can push another iteration.

Copy link
Collaborator

Choose a reason for hiding this comment

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

little confused by this comment - when is baseQueryMeta not determined by the baseQuery? (#4098 not withstanding, which i just discovered)


1. the result as the first argument,
1. the response error as the second argument,
1. the argument originally passed into the `query` method as the third argument,
Copy link
Member

Choose a reason for hiding this comment

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

This is generally difficult to read.

Was it (passed into the query method) and is now the third argument to invalidatesTags?
or
Was it (passed into the query method as the third argument)?

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

Successfully merging this pull request may close these issues.

6 participants