Skip to content

fix: pass error type generic to defineQueryOptions in @pinia/colada plugin#3483

Merged
mrlubos merged 4 commits intohey-api:mainfrom
lukaspodmelle:fix/pinia-colada-query-error-type
Mar 3, 2026
Merged

fix: pass error type generic to defineQueryOptions in @pinia/colada plugin#3483
mrlubos merged 4 commits intohey-api:mainfrom
lukaspodmelle:fix/pinia-colada-query-error-type

Conversation

@lukaspodmelle
Copy link
Contributor

Summary

  • Adds TError (and TData, TResponse) type generics to defineQueryOptions calls in the @pinia/colada plugin
  • Previously only mutations had correctly typed errors via UseMutationOptions<TResponse, TData, TError>, while queries defaulted to ErrorDefault (Error)

Closes #3482

Test plan

  • All 111 plugin tests pass
  • 6 pinia/colada snapshots updated to include generics on defineQueryOptions

@bolt-new-by-stackblitz
Copy link

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

@pullfrog
Copy link

pullfrog bot commented Mar 3, 2026

Error

agent completed without reporting progress

Pullfrog  | Rerun failed job ➔View workflow run | Triggered by Pullfrogpullfrog.com𝕏

@vercel
Copy link

vercel bot commented Mar 3, 2026

@lukaspodmelle is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 3, 2026
@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2026

🦋 Changeset detected

Latest commit: 8e5a578

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

@dosubot dosubot bot added the bug 🔥 Broken or incorrect behavior. label Mar 3, 2026
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 40.31%. Comparing base (3be5ff2) to head (8e5a578).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...enapi-ts/src/plugins/@pinia/colada/queryOptions.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3483   +/-   ##
=======================================
  Coverage   40.31%   40.31%           
=======================================
  Files         483      483           
  Lines       17560    17560           
  Branches     5317     5317           
=======================================
  Hits         7080     7080           
  Misses       8427     8427           
  Partials     2053     2053           
Flag Coverage Δ
unittests 40.31% <0.00%> (ø)

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.

@mrlubos mrlubos merged commit ce29020 into hey-api:main Mar 3, 2026
4 of 20 checks passed
@hey-api hey-api bot mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🔥 Broken or incorrect behavior. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: @pinia/colada plugin missing error type generic on defineQueryOptions

2 participants