Skip to content

refactor(solid-query): remove 'Solid' prefix from 'SolidQueryOptions', 'SolidInfiniteQueryOptions', and 'SolidMutationOptions'#10500

Open
sukvvon wants to merge 3 commits intomainfrom
refactor/solid-query-remove-solid-prefix
Open

refactor(solid-query): remove 'Solid' prefix from 'SolidQueryOptions', 'SolidInfiniteQueryOptions', and 'SolidMutationOptions'#10500
sukvvon wants to merge 3 commits intomainfrom
refactor/solid-query-remove-solid-prefix

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 14, 2026

🎯 Changes

Remove Solid prefix from option types:

  • SolidQueryOptionsQueryOptions
  • SolidInfiniteQueryOptionsInfiniteQueryOptions
  • SolidMutationOptionsMutationOptions

Why

In TanStack Query, adapters that need framework-specific reactivity wrapping define two layers of option types:

  • Pure option type (e.g., QueryOptions, MutationOptions) — the plain options object
  • Hook option type (e.g., UseQueryOptions, UseMutationOptions) — wraps the pure type with framework reactivity (Accessor for Solid, MaybeRef/MaybeRefDeep for Vue)

Adapters without wrapping (react-query, preact-query, svelte-query, angular-query) define only the hook type directly.

vue-query already follows this pattern without a framework prefix:

  • QueryOptionsUseQueryOptions = MaybeRef<...>
  • MutationOptionsUseMutationOptions = MaybeRefDeep<MutationOptions> | () => ...

solid-query was the only adapter using a framework prefix (SolidQueryOptions, SolidInfiniteQueryOptions, SolidMutationOptions). This PR removes the prefix for consistency.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

…, 'SolidInfiniteQueryOptions', and 'SolidMutationOptions'
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

📝 Walkthrough

Walkthrough

The PR removes the "Solid" prefix from three exported option type names in the @tanstack/solid-query package: SolidQueryOptions, SolidInfiniteQueryOptions, and SolidMutationOptions are renamed to QueryOptions, InfiniteQueryOptions, and MutationOptions. The refactor is applied consistently across type definitions, re-exports, implementation files, and type tests. A changeset entry documents the patch release.

Changes

Cohort / File(s) Summary
Changeset Entry
.changeset/five-lizards-camp.md
Records patch release documenting the refactor that removes "Solid" prefix from exported option type names.
Type Definitions
packages/solid-query/src/types.ts
Renamed core option interfaces (SolidQueryOptionsQueryOptions, SolidInfiniteQueryOptionsInfiniteQueryOptions, SolidMutationOptionsMutationOptions) and updated corresponding Use*Options type aliases to reference the renamed interfaces.
Public Exports
packages/solid-query/src/index.ts
Updated re-exported type names from Solid*Options to *Options in the export statement.
Option Type Implementations
packages/solid-query/src/queryOptions.ts, infiniteQueryOptions.ts, mutationOptions.ts, useQueries.ts
Updated imports and internal type references to use the renamed *Options types while maintaining function signatures and runtime behavior.
Type Tests
packages/solid-query/src/__tests__/mutationOptions.test-d.tsx, useQueries.test-d.tsx, useQueries.test.tsx
Updated type assertions, imported types, and parameter type annotations to reference the renamed MutationOptions and QueryOptions types.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Solid names depart with grace,
QueryOptions claim their place,
No prefix clouds the type today,
Cleaner APIs light the way!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main refactoring change: removing the 'Solid' prefix from three option types in solid-query.
Description check ✅ Passed PR description is comprehensive and follows the template with all required sections completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/solid-query-remove-solid-prefix

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 14, 2026

View your CI Pipeline Execution ↗ for commit 8d47051

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded <1s View ↗
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 35s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-14 17:53:00 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

🚀 Changeset Version Preview

1 package(s) bumped directly, 23 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/solid-query 5.99.0 → 5.99.1 Changeset
@tanstack/angular-query-experimental 5.99.0 → 5.99.1 Dependent
@tanstack/angular-query-persist-client 5.99.0 → 5.99.1 Dependent
@tanstack/eslint-plugin-query 5.99.0 → 5.99.1 Dependent
@tanstack/preact-query 5.99.0 → 5.99.1 Dependent
@tanstack/preact-query-devtools 5.99.0 → 5.99.1 Dependent
@tanstack/preact-query-persist-client 5.99.0 → 5.99.1 Dependent
@tanstack/query-async-storage-persister 5.99.0 → 5.99.1 Dependent
@tanstack/query-broadcast-client-experimental 5.99.0 → 5.99.1 Dependent
@tanstack/query-core 5.99.0 → 5.99.1 Dependent
@tanstack/query-devtools 5.99.0 → 5.99.1 Dependent
@tanstack/query-persist-client-core 5.99.0 → 5.99.1 Dependent
@tanstack/query-sync-storage-persister 5.99.0 → 5.99.1 Dependent
@tanstack/react-query 5.99.0 → 5.99.1 Dependent
@tanstack/react-query-devtools 5.99.0 → 5.99.1 Dependent
@tanstack/react-query-next-experimental 5.99.0 → 5.99.1 Dependent
@tanstack/react-query-persist-client 5.99.0 → 5.99.1 Dependent
@tanstack/solid-query-devtools 5.99.0 → 5.99.1 Dependent
@tanstack/solid-query-persist-client 5.99.0 → 5.99.1 Dependent
@tanstack/svelte-query 6.1.16 → 6.1.17 Dependent
@tanstack/svelte-query-devtools 6.1.16 → 6.1.17 Dependent
@tanstack/svelte-query-persist-client 6.1.16 → 6.1.17 Dependent
@tanstack/vue-query 5.99.0 → 5.99.1 Dependent
@tanstack/vue-query-devtools 6.1.16 → 6.1.17 Dependent

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 14, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10500

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10500

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10500

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10500

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10500

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10500

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10500

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10500

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10500

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10500

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10500

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10500

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10500

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10500

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10500

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10500

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10500

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10500

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10500

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10500

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10500

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10500

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10500

commit: 8d47051

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

size-limit report 📦

Path Size
react full 11.99 KB (0%)
react minimal 9.02 KB (0%)

@sukvvon sukvvon marked this pull request as ready for review April 15, 2026 00:42
@sukvvon sukvvon requested a review from birkskyum April 15, 2026 00:44
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/solid-query/src/types.ts (1)

47-58: ⚠️ Potential issue | 🟠 Major

Public type removals are breaking; add deprecated aliases for one release cycle.

Dropping SolidQueryOptions, SolidInfiniteQueryOptions, and SolidMutationOptions will break existing imports for consumers immediately.

Compatibility bridge suggestion
 export interface QueryOptions<
   TQueryFnData = unknown,
   TError = DefaultError,
   TData = TQueryFnData,
   TQueryKey extends QueryKey = QueryKey,
 > extends UseBaseQueryOptions<
   TQueryFnData,
   TError,
   TData,
   TQueryFnData,
   TQueryKey
 > {}

+/** `@deprecated` Use QueryOptions instead. */
+export type SolidQueryOptions<
+  TQueryFnData = unknown,
+  TError = DefaultError,
+  TData = TQueryFnData,
+  TQueryKey extends QueryKey = QueryKey,
+> = QueryOptions<TQueryFnData, TError, TData, TQueryKey>
 export interface InfiniteQueryOptions<
   TQueryFnData = unknown,
   TError = DefaultError,
   TData = TQueryFnData,
   TQueryKey extends QueryKey = QueryKey,
   TPageParam = unknown,
 > extends OmitKeyof<
@@
   suspense?: boolean
 }

+/** `@deprecated` Use InfiniteQueryOptions instead. */
+export type SolidInfiniteQueryOptions<
+  TQueryFnData = unknown,
+  TError = DefaultError,
+  TData = TQueryFnData,
+  TQueryKey extends QueryKey = QueryKey,
+  TPageParam = unknown,
+> = InfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>
 export interface MutationOptions<
   TData = unknown,
   TError = DefaultError,
   TVariables = void,
   TOnMutateResult = unknown,
 > extends OmitKeyof<
   MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>,
   '_defaulted'
 > {}

+/** `@deprecated` Use MutationOptions instead. */
+export type SolidMutationOptions<
+  TData = unknown,
+  TError = DefaultError,
+  TVariables = void,
+  TOnMutateResult = unknown,
+> = MutationOptions<TData, TError, TVariables, TOnMutateResult>

Also applies to: 90-120, 143-151

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/solid-query/src/types.ts` around lines 47 - 58, Public type aliases
were removed causing breaking imports; restore deprecated aliases for one
release cycle by adding type aliases that point to the new names: create
SolidQueryOptions = QueryOptions (and SolidInfiniteQueryOptions =
InfiniteQueryOptions, SolidMutationOptions = MutationOptions) in the same module
(types.ts) so consumers keep working; mark them as deprecated with a comment
JSDoc `@deprecated` and ensure names exactly match SolidQueryOptions,
SolidInfiniteQueryOptions, SolidMutationOptions to maintain compatibility.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/solid-query/src/types.ts`:
- Around line 47-58: Public type aliases were removed causing breaking imports;
restore deprecated aliases for one release cycle by adding type aliases that
point to the new names: create SolidQueryOptions = QueryOptions (and
SolidInfiniteQueryOptions = InfiniteQueryOptions, SolidMutationOptions =
MutationOptions) in the same module (types.ts) so consumers keep working; mark
them as deprecated with a comment JSDoc `@deprecated` and ensure names exactly
match SolidQueryOptions, SolidInfiniteQueryOptions, SolidMutationOptions to
maintain compatibility.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a8a7a7de-2924-47e6-a7f8-6d01bde9c389

📥 Commits

Reviewing files that changed from the base of the PR and between 7ffa1ed and 8d47051.

📒 Files selected for processing (10)
  • .changeset/five-lizards-camp.md
  • packages/solid-query/src/__tests__/mutationOptions.test-d.tsx
  • packages/solid-query/src/__tests__/useQueries.test-d.tsx
  • packages/solid-query/src/__tests__/useQueries.test.tsx
  • packages/solid-query/src/index.ts
  • packages/solid-query/src/infiniteQueryOptions.ts
  • packages/solid-query/src/mutationOptions.ts
  • packages/solid-query/src/queryOptions.ts
  • packages/solid-query/src/types.ts
  • packages/solid-query/src/useQueries.ts

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.

1 participant