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

invalidateQuery()-helper #118

Merged
merged 18 commits into from
Mar 3, 2021
Merged

invalidateQuery()-helper #118

merged 18 commits into from
Mar 3, 2021

Conversation

KATT
Copy link
Member

@KATT KATT commented Mar 2, 2021

  • allows you to use trpc.invalidateQuery([path, input]) in a type-safe way

@vercel
Copy link

vercel bot commented Mar 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

www – ./www

🔍 Inspect: https://vercel.com/trpc/www/EGohBqfeow8jjuD6Dw4ccb1FYjQF
✅ Preview: https://www-git-feature-cache-key.tmp.trpc.io

chat – ./examples/next-ssg-chat

🔍 Inspect: https://vercel.com/trpc/chat/DM1FKoCkvPMcdr1g88fYcesdh3r6
✅ Preview: https://chat-git-feature-cache-key.tmp.trpc.io

hello-world – ./examples/next-hello-world

🔍 Inspect: https://vercel.com/trpc/hello-world/5t6HrNPquif4DMY2TQE3AUXuiLCr
✅ Preview: https://hello-world-git-feature-cache-key.tmp.trpc.io

@codecov-io
Copy link

Codecov Report

Merging #118 (8749faf) into main (88b88e1) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #118      +/-   ##
==========================================
+ Coverage   95.63%   95.66%   +0.02%     
==========================================
  Files          13       13              
  Lines         481      484       +3     
  Branches       71       73       +2     
==========================================
+ Hits          460      463       +3     
  Misses         21       21              
Impacted Files Coverage Δ
packages/react/src/createReactQueryHooks.ts 89.65% <100.00%> (+0.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88b88e1...8749faf. Read the comment docs.

- [React-specific helpers (`@trpc/react`)](#react-specific-helpers-trpcreact)
- [`useInfiniteQuery()`](#useinfinitequery)
- [`invalidateQuery()`](#invalidatequery)
- [`ssr()`: Server-side rendering (SSR / SSG)](#ssr-server-side-rendering-ssr--ssg)
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree on moving this all under a React-specific section, but ssr().createCaller() is not react specific. Then again, I'd just do router.createCaller outside react. Maybe just add that somewhere

Copy link
Member Author

Choose a reason for hiding this comment

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

ssr() is from @trpc/react

README.md Show resolved Hide resolved
packages/react/src/createReactQueryHooks.ts Show resolved Hide resolved
@KATT KATT merged commit fc0e6b6 into main Mar 3, 2021
@KATT KATT deleted the feature/cache-key branch March 3, 2021 08:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants