You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add support for data services extending BaseDataService (MetaMask#27921)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
Replace the default `QueryClient` with a custom `QueryClient` from
`createUIQueryClient`. This establishes the query client required for
using the `BaseDataService` pattern from the core repo, which handles
cache syncing. Existing UI-only queries should work as they did
previously.
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
## **Related issues**
https://consensyssoftware.atlassian.net/browse/WPC-445
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it changes how the global React Query
`QueryClient` is constructed and introduces messenger-backed
call/subscribe plumbing that could affect caching and network behavior
across the app.
>
> **Overview**
> Switches `ReactQueryService` to build its `queryClient` via
`@metamask/react-data-query`’s `createUIQueryClient`, passing an Engine
messenger adapter to support data services and cache syncing while
keeping the existing default query options.
>
> Adds a `DATA_SERVICES` registry (currently empty) for wiring in
available data services, updates unit tests to validate the new client
defaults and cache clearing behavior, and adds the new
`@metamask/react-data-query` dependency (plus lockfile updates).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
088a264. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
0 commit comments