apollographql / apollographql/apollo-client-devtools
"Could not find client" connectToDevTools option is deprecated
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 172
- Avg merge
- 10m
- Merged PRs (30d)
- 8
Description
**Intended outcome:**
I am trying to configure my apolloClient so that I can use Apollo Client DevTools. However, connectToDevTools option is now deprecated.
```
devtools: {
enabled: true,
},
```
Should be the new option passed into the client object as per [ApolloClient Docs](https://www.apollographql.com/docs/react/api/core/ApolloClient#:~:text=connectToDevTools(optional))
**Actual outcome:**
Ultimately, devTools cannot find the client even when I set if I set
```
if (typeof window !== 'undefined') {
;(window as any).__APOLLO_CLIENT__ = apolloClient
}
```
Making the extension unusable.

**How to reproduce the issue:**
To reproduce the issue, update to versions mentioned below and Apollo Client (Web) - v3. I am running 3.12.8. Download extension and try to configure your application.
**Desktop (please complete the following information):**
- OS: macOS 14.6.1 (23G93)
- Browser: Chrome
- Browser version: 128.0.6613.120
- Extension version: 4.19.13
Contributor guide
Research direction
Start by locating the repository code that handles the deprecated connectToDevTools option and the newer devtools configuration, then reproduce the report with Apollo Client 3.12.8 and extension 4.19.13. Done means the extension can find the configured client without requiring the deprecated option or manual window assignment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100