feat(graphql_devtools_extension): Add DevTools extension to display GraphQLClient cache #1449
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this change?
Add DevTools Extension to display GraphQL cache inspired by Apollo Client.
graphql_cache_inspector.mp4
To create DevTools Extension
To create DevTools Extension, using devtools_extension and these are required.
packages/graphql_devtools_extension/
packages/graphql/extension/config.yaml
packages/graphql/extension/build/
(this is gitignored but you should add before publishing to Pub.dev) 1packages/graphql_devtools_extension/
DevTools Extension must be built by Flutter web app,
packages/graphql_devtools_extension/
contains DevTools Extension's Flutter web code 2. Alsopackages/graphql/lib/src/graphql_client.dart
has logic to interact with application with graphql and DevTools Extension.packages/graphql/extension/config.yaml
This file has DevTools Extension configuration.
packages/graphql/extension/build/
This directory is not included because of
.gitignore
.However you need to create this directory by this command.3
Footnotes
https://pub.dev/packages/devtools_extensions#what-if-i-dont-want-the-extensiondevtoolsbuild-contents-checked-into-source-control ↩
https://pub.dev/packages/devtools_extensions#create-a-devtools-extension ↩
https://pub.dev/packages/devtools_extensions#create-a-devtools-extension:~:text=define%3Duse_simulated_environment%3Dtrue-,Use%20a%20real%20DevTools%20Environment,-To%20use%20a ↩