Comments (10)
for now I've settled on just adding this to my app for now:
if (process.env.NODE_ENV === 'development') {
BrowserWindow.addDevToolsExtension( 'jdkknkkbebbapilgoeccciglkfbmbnfm' );
}
Since that seems to be working, I'll probably just keep using that.
from apollo-client-devtools.
Ok, so I did some digging and based on the Electron docs here (https://github.com/electron/electron/blob/master/docs/tutorial/devtools-extension.md) I was able to get Apollo Dev Tools working by adding the following:
BrowserWindow.addDevToolsExtension( '~/Library/Application Support/Google/Chrome/Default/Extensions/jdkknkkbebbapilgoeccciglkfbmbnfm/1.0.5_0' );
The other dev-tools work without having to specify this in my code, but adding this for Apollo Dev Tools got it working.
I'm not super familiar with the Dev Tools API's, but I'm curious if there's something that could be changed so that the Dev tools are instantiated, like the other dev tools, without the explicit call being added.
I have a feeling it might be related to how the panel is instantiated here: https://github.com/apollographql/apollo-client-devtools/blob/master/extension/devtools.js
It seems like the other dev tools create the panel without any conditions being checked, and check conditions inside the panel itself, such as Redux Dev Tools:
https://github.com/zalmoxisus/redux-devtools-extension/blob/master/src/browser/extension/devtools/index.js
from apollo-client-devtools.
Ah. . .
Digging some more, I'm seeing the React Dev Tools doing conditional creation of the panel based on similar criteria to what the Apollo Dev Tools check, however, they've added a listener to check if React is added after page load. My guess is that by time the Apollo Dev Tools are instantiated in Electron it's too early for window.__APOLLO_CLIENT__
to evaluate as true, so the Apollo dev tools just never create the panel.
I'll submit a PR for this.
from apollo-client-devtools.
We should be polling constantly for that value to show up, so it would be surprising if that were the issue.
from apollo-client-devtools.
I submitted a PR #24
Not 100% sure yet that solves the issue. I'll play with it a bit more to confirm tomorrow.
from apollo-client-devtools.
@jasonbahl Were you able to confirm if #24 fixes this issue? If so, I can merge it and release a new version of the devtools :)
from apollo-client-devtools.
Sorry. Haven't followed up. Will check today and let you know for sure
from apollo-client-devtools.
So, I'm not exactly sure how to test this locally. From what I can tell, Electron is downloading straight from the Chrome store when compiling, so I'm not quite sure how to override and have it use my local copy of Apollo Devtools instead. . .I'll dig and see if I can figure that out so I can test properly locally.
For now, my only solution has been to manually add:
if (process.env.NODE_ENV === 'development') {
BrowserWindow.addDevToolsExtension( '~/Library/Application Support/Google/Chrome/Default/Extensions/jdkknkkbebbapilgoeccciglkfbmbnfm/1.0.8_0' );
}
For the moment, that also means I have to manually keep the version number updated, which is obviously not ideal. . .
If I can get Electron to use my local copy of DevTools so I can fully test this, I'll let you know.
Thanks,
Jason
from apollo-client-devtools.
did not word for me
from apollo-client-devtools.
Unfortunately this did not work for me either.
It seems to only work for me if I delete everything in the extensions folder of electron and then add the path to the downloaded apollo-client-dev-tools chrome extension. It will work the first time it's loaded, but after quitting and reopening the application, it doesn't load anymore.
from apollo-client-devtools.
Related Issues (20)
- Finish Tailwind migration HOT 1
- Active queries disappear when used with RedwoodJS
- Dependency Dashboard
- Extension prevents websites (tested on atlassian.com) from loading styles HOT 9
- Not working! Apollo Client Devtools on Chrome latest HOT 17
- Doesn't work in latest Chromium-based MS Edge HOT 6
- Server side mutation errors are not reported in the explorer HOT 2
- Looking for client... No longer working after recent update HOT 16
- Impossible to track newly-created ApolloClients HOT 3
- Reactive Var Tab HOT 1
- Cache tab explodes causing the devtools to crash
- DevTools does not show any data for my app HOT 11
- Intermittent connection issues when first opening dev tools HOT 3
- unable to load devtool properly. Failed to execute 'postMessage' on 'Window' HOT 5
- v4.8.1 breaks Google Cloud Console on Arc & Chrome for Mac HOT 4
- Provide development apps that contains irregular cache data
- not show any data HOT 3
- Apollo Client Dev Tools get stuck HOT 3
- Extension causes query response handling to fail. Uncaught TypeError: Cannot convert object to primitive value HOT 6
- Serious memory leak issue with the devtools extension HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-client-devtools.