Skip to content

Commit

Permalink
Add doc about the cache viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
BoD committed Oct 23, 2023
1 parent 35e4c8a commit 35fee13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/source/testing/android-studio-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ For the plugin to be able to fetch the metrics, you need to configure your proje
- API key: should start with `service:` or `user:`
- Graph ID: can be found on your graph page in Apollo Studio or is filled automatically if you provide a `service:` API key

### Normalized cache viewer

The plugin provides a graphical tool to inspect a normalized cache database. To open it, go to <kbd>View</kbd> | <kbd>
Tool Windows</kbd> | <kbd>Apollo Normalized Cache</kbd>.
From there you can either drag and drop a `.db` file to the tool window to open it, or click on "Open file..." to pick
the file to open.

There is also a "Pull from device" option to pull the cache database from a connected device or emulator.

Once the cache is open, you can search for a record by ID, or browse them from the left side. Clicking on a record will
show its fields and their values on the right side.

<img src="images/cache-viewer.png" width="640" alt="Normalized cache viewer"/>

## Weekly snapshots

If you wish to try the latest features, you can install the weekly snapshots. To do so, add the following repository in <kbd>Settings</kbd> | <kbd>Plugins</kbd> | <kbd>⚙</kbd>️ | <kbd>Manage Plugin Repositories</kbd> | <kbd>+</kbd>: `https://raw.githubusercontent.com/apollographql/apollo-kotlin/main/intellij-plugin/snapshots/plugins.xml`.
Expand Down
Binary file added docs/source/testing/images/cache-viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions intellij-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This plugin for Android Studio and IntelliJ helps you work with the
- Integration with the [GraphQL IntelliJ Plugin](https://plugins.jetbrains.com/plugin/8097-js-graphql): the structure of the Apollo project is automatically contributed, so there is no need to create a `graphql.config.yml` / `.graphqlconfig` file
- Navigation Kotlin code ⇄ GraphQL definitions
- Unused operations and fields highlighting
- Normalized cache viewer
- Migration helpers:
- Apollo Android 2.x → Apollo Kotlin 3.x
- Apollo Kotlin 3.x → Apollo Kotlin 4.x
Expand Down

0 comments on commit 35fee13

Please sign in to comment.