Replies: 5 comments 2 replies
-
+1 for this! |
Beta Was this translation helpful? Give feedback.
-
Neither the Graphiql tab nor the Cache tab in Apollo DevTools show reactive variables. We did thankfully discover that the Queries tab, if you go to it's I don't know if this makes a difference, but we do have type field policies defined under the top level Query that expose these reactive variables. When we go to the root query we rather expected these local-only fields to be shown, but they, nor any other local-only fields, are shown. Changing this might be worth creating a new discussion thread, but for now, I am attaching this only as a note to this Reactive Variables ticket, as all of our local-only fields are for reactive-variables. It would be an enormous improvement to the Apollo DevTools to show Reactive Variables, and to show Local-Only fields. |
Beta Was this translation helpful? Give feedback.
-
Hi @hwillson, I'm relatively new to AC3 and really wanted to be able to introspect the reactive variables and have a mutation history listed in the Dev Tools myself so here's what I did ( I'm new to AC3 so improvements could likely be made here ) in the interim. I created a wrapper function that essentially fires a writeQuery ( write to cache ) and a Mutation. Whenever I manipulate my reactive variable, I use this wrapper function to do so. The changes are tracked in Apollo Dev Tools as we fire a mutation for every reactive variable modification through this wrapper and the cache is modified as such.
I set up my cache variables like so:
The activeUserClientVar variable properties are as follows:
This is just a primary solution for the interim. I really hope that the Apollo team weighs in and provides introspection for reactive variables because they are very powerful and it's difficult to track changes across a complex application without said changes in Apollo Dev Tools. I know this is not a solution but hopefully this helps tide you over while they work on the feature request. Note:
And get the cacheKey and associated client variables from said dictionary in the wrapper. Instead of:
|
Beta Was this translation helpful? Give feedback.
-
Hello, I was wondering if there's any update on this ticket 🙂 |
Beta Was this translation helpful? Give feedback.
-
Hello, I saw this post, so is there any updates to see reactiveVariables in devtools? I don't want to add mobx or redux to app where I've already have apollo, but without devtools support reactive variables looks same unsupported as react context/provider. |
Beta Was this translation helpful? Give feedback.
-
Migrated from: #337
I use Reactive Variables to manage my local state and I cannot inspect reactive variables in apollo devtools even when I use
typePolicies
.It would be nice to see values in the cache tab, especially when I've added some client fields to existing entity. I understand that technically this values are not part of the cache, but I think it could've been marked as local or something.
Also I would like to have an ability to inspect reactive variables, maybe as a different tab, where all variables are listed (display name support?).
Also I'd like to add that previous approach, using client resolvers worked with devtools
Beta Was this translation helpful? Give feedback.
All reactions