Skip to content

Feat lit-query: add initial lit-query package#10501

Closed
chughgaurav wants to merge 23 commits into
TanStack:mainfrom
chughgaurav:feature/lit-query-adapter
Closed

Feat lit-query: add initial lit-query package#10501
chughgaurav wants to merge 23 commits into
TanStack:mainfrom
chughgaurav:feature/lit-query-adapter

Conversation

@chughgaurav
Copy link
Copy Markdown
Contributor

@chughgaurav chughgaurav commented Apr 14, 2026

🎯 Changes

Adds an initial @tanstack/lit-query package that brings TanStack Query Core to Lit via reactive controllers.

  • New Features

Included in this PR:

  • QueryClientProvider and query-client resolution helpers
  • query, mutation, infinite-query, and queries controllers
  • useIsFetching, useIsMutating, and useMutationState
  • queryOptions, infiniteQueryOptions, and mutationOptions
  • Lit examples covering basic usage, pagination, and SSR
  • unit/type tests for controller lifecycle, client switching, counters/state, and inference
  • Documentation

    • New package README with installation, quick-start, API surface, and example instructions.
  • Tests / E2E

    • Comprehensive unit + Playwright E2E suites and helpers covering smoke, error recovery, lifecycle, pagination, mutations, and SSR.

Notes

This PR is focused on the initial package integration and API surface for Lit.

✅ 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).

Summary by CodeRabbit

  • New Features
    • Added @tanstack/lit-query package, a TanStack Query integration for Lit components
    • Introduced reactive controllers for queries, mutations, and infinite queries
    • Added QueryClientProvider component for context management
    • Included hooks for tracking fetching/mutating state and mutation status
    • Provided example applications demonstrating pagination, server-side rendering, and core functionality

Loading
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