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

Docs - extend detail for Queries & endpoints #1074

Conversation

Shrugsy
Copy link
Collaborator

@Shrugsy Shrugsy commented May 19, 2021

Related to #964

  • Add brief descriptions to the query hooks
  • Add brief descriptions to the query hook options
  • Add brief tip about skipToken on the Conditional Fetching page
  • Shift 'Anatomy of an endpoint' into a larger section at end of page
  • Flesh out property details & examples in 'anatomy of an endpoint'
  • Miscellaneous order re-arranging
  • Update defaultSerializeQueryArgs shown in docs as per actual version
  • Update links to specific sections of endpoint anatomy where applicable

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 19, 2021

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 4b629cb:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
rsk-github-issues-example Configuration

@Shrugsy
Copy link
Collaborator Author

Shrugsy commented May 19, 2021

FYI the netlify docs won't currently build for this, but after #1073 they should be fine


Defaults to:

```ts no-transpile
Copy link
Collaborator

Choose a reason for hiding this comment

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

❓ Do we really need to copy the entire implementation here? Seems like a written description of behavior would be sufficient.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm I agree. A written description would certainly cover it.

However, can you think of a theoretical example for a custom version of serializeQueryArgs someone might want to use rather than the default? If so, I think that would be beneficial as a snippet

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI I've replaced this with a written description, but I can't think of a realistic example someone would use to override it

- Add brief descriptions to the query hooks
- Add brief descriptions to the query hook options
- Add brief tip about `skipToken` on the `Conditional Fetching` page
- Shift 'Anatomy of an endpoint' into a larger section at end of page
- Flesh out property details & examples in 'anatomy of an endpoint'
- Miscellaneous order re-arranging
- Update `defaultSerializeQueryArgs` shown in docs as per actual version
- Update links to specific sections of endpoint anatomy where applicable
  replace with written explanation of behaviour
@Shrugsy Shrugsy force-pushed the docs/extend-detail-for-queries-and-endpoints branch from dc7ceea to 405cd43 Compare May 21, 2021 20:15
@netlify
Copy link

netlify bot commented May 21, 2021

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

Built with commit 4b629cb

https://deploy-preview-1074--redux-starter-kit-docs.netlify.app

@Shrugsy
Copy link
Collaborator Author

Shrugsy commented May 22, 2021

@markerikson following on from #964 (comment)

I've removed the 'query hook return types' & 'mutation hook trigger type' codeblocks, and instead replaced them with written descriptions/bullet points like so:

https://deploy-preview-1074--redux-starter-kit-docs.netlify.app/usage/rtk-query/queries#frequently-used-query-hook-return-values
https://deploy-preview-1074--redux-starter-kit-docs.netlify.app/usage/rtk-query/mutations#frequently-used-mutation-hook-return-values

Let me know if you think any of them probably wouldn't "frequently used" enough to warrant being there, or if you have any other recommendations

@Shrugsy
Copy link
Collaborator Author

Shrugsy commented May 22, 2021

@akursat please let me know if you have any opinions on these changes, following your comment: #964 (comment)

Note that both the query & mutation endpoint definitions are proposed to move to createApi#endpoints as part of this PR

@markerikson
Copy link
Collaborator

Do it.

@markerikson markerikson merged commit 8cd2545 into reduxjs:feature/v1.6-integration May 22, 2021
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.

2 participants