这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ahmedrowaihi
Copy link
Contributor

@ahmedrowaihi ahmedrowaihi commented Aug 6, 2025

I think we fixed tanstack frontend invalidation forever by this PR
use case:

function predicate(query: Query) {
    return query.queryKey[0].tags?.includes('Resource');
}

thank you @mrlubos for such a wonderful lib

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Aug 6, 2025

🦋 Changeset detected

Latest commit: ac3456f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hey-api/openapi-ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hey-api-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2025 1:25pm

@codecov
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 0% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 22.46%. Comparing base (ebf969d) to head (ac3456f).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...pi-ts/src/plugins/@tanstack/query-core/queryKey.ts 0.00% 43 Missing ⚠️
...ins/@tanstack/angular-query-experimental/config.ts 0.00% 2 Missing ⚠️
...api-ts/src/plugins/@tanstack/react-query/config.ts 0.00% 2 Missing ⚠️
...api-ts/src/plugins/@tanstack/solid-query/config.ts 0.00% 2 Missing ⚠️
...pi-ts/src/plugins/@tanstack/svelte-query/config.ts 0.00% 2 Missing ⚠️
...enapi-ts/src/plugins/@tanstack/vue-query/config.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2391      +/-   ##
==========================================
- Coverage   22.50%   22.46%   -0.04%     
==========================================
  Files         324      324              
  Lines       31904    31956      +52     
  Branches     1234     1234              
==========================================
  Hits         7179     7179              
- Misses      24716    24768      +52     
  Partials        9        9              
Flag Coverage Δ
unittests 22.46% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 6, 2025

Open in StackBlitz

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@2391
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@2391
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@2391

commit: ac3456f

@mrlubos
Copy link
Member

mrlubos commented Aug 6, 2025

@ahmedrowaihi

  1. What do you think about adding queryKeys.tags and infiniteQueryKeys.tags options to optionally enable/disable this setting?
  2. Should it be enabled by default? It's definitely going to make query keys larger.
  3. Any concern about potentially breaking any of the existing functionality?

@mrlubos mrlubos self-assigned this Aug 6, 2025
@ahmedrowaihi
Copy link
Contributor Author

  1. What do you think about adding queryKeys.tags and infiniteQueryKeys.tags options to optionally enable/disable this setting?

Reasonable, we should add it

  1. Should it be enabled by default? It's definitely going to make query keys larger.

Not really, we may make it disabled by default

  1. Any concern about potentially breaking any of the existing functionality?

the Infinite ? .... : undefined check was either passing a value or remove it, now I made it always set either true or false, I tested that no issues

@mrlubos
Copy link
Member

mrlubos commented Aug 6, 2025

@ahmedrowaihi great!

  1. is definitely some extra work, but I think it's worth it. Every version of the plugin needs updated types.d.ts, you should be able to copy-paste between version though.
  2. sounds good to me
  3. I meant in terms of adding these tags. However, if you're going to keep it disabled by default, this question is irrelevant

@ahmedrowaihi
Copy link
Contributor Author

@mrlubos anymore suggestions ?

Copy link
Member

@mrlubos mrlubos left a comment

Choose a reason for hiding this comment

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

The pull request looks perfect to me! I'm only submitting one change request so we get a cleaner diff if not using tags. Now that tags are disabled by default, you may also consider adding a test showing what it looks like when they're enabled. This is totally up to you though, I might not have configured tests to easily add such change

@mrlubos
Copy link
Member

mrlubos commented Aug 6, 2025

@ahmedrowaihi please rerun snapshots again so CI passes

Copy link
Member

@mrlubos mrlubos left a comment

Choose a reason for hiding this comment

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

Looking good, thank you!

@vercel vercel bot requested a deployment to Preview August 6, 2025 13:25 Abandoned
@mrlubos mrlubos merged commit b3a6f96 into hey-api:main Aug 6, 2025
15 of 17 checks passed
@github-actions github-actions bot mentioned this pull request Aug 6, 2025
@ahmedrowaihi ahmedrowaihi deleted the feat/tags branch August 6, 2025 13:57
@ahmedrowaihi
Copy link
Contributor Author

Looking good, thank you!

welcome ! yet I have another PR #2399 :'D

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