feat(graphql_devtools_extension): Add DevTools extension to display GraphQLClient cache#1449
Draft
lllttt06 wants to merge 4 commits intozino-hofmann:mainfrom
Draft
feat(graphql_devtools_extension): Add DevTools extension to display GraphQLClient cache#1449lllttt06 wants to merge 4 commits intozino-hofmann:mainfrom
lllttt06 wants to merge 4 commits intozino-hofmann:mainfrom
Conversation
Collaborator
|
I can ask why do not make another package outside of this repo? just asking I will review soon |
Author
|
You mean why I didn't create another package only for displaying GraphQLClient cache? More detail, I have to register Extension inside GraphQLClient constructor. // Register the extension to expose the cache to the devtools
registerExtension(
'ext.graphql.getCache',
(method, parameters) async {
return ServiceExtensionResponse.result(
jsonEncode({'value': this.cache.store.toMap()}));
}, |
…into feat-add-devtools-extension
396b343 to
3628544
Compare
Collaborator
|
Sorry for delay here! I like your work if you are willing to maintain it I am inclined to merge it if you would like. Let me know or feel free to shoot an email if you would like to discuss something in details! Cheers, |
…to feat-add-devtools-extension
Collaborator
|
unfortunately this repository do not use merge commit, but just rebase on top of main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.yamlpackages/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.darthas logic to interact with application with graphql and DevTools Extension.packages/graphql/extension/config.yamlThis 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 ↩