-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use GraphQL mutations for FLEx metadata updates #973
Merged
Merged
Conversation
This file contains 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
Base automatically changed from
feat/extract-langtags-from-flex-projects
to
develop
July 23, 2024 02:06
rmunn
force-pushed
the
feat/gql-mutations-for-flex-metadata
branch
from
July 23, 2024 02:08
27288f0
to
cfdb9a6
Compare
hahn-kev
previously approved these changes
Jul 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, though I'd prefer the update missing versions be left in the controller as I intend to call them manually via swagger and that's much better than trying to call the mutation manually
Corresponding ProjectController methods will be removed later.
Now the UI updates itself when the GraphQL query is run, and the GraphQL cache is automatically updated with the correct values.
Instead of GraphQL calls, the batch "update X where missing" calls are more useful as HTTP POSTs so that they can be easily called from the Swagger UI. We're never going to call those from the frontend anyway.
rmunn
force-pushed
the
feat/gql-mutations-for-flex-metadata
branch
from
July 25, 2024 04:21
cb7f2f7
to
bebba76
Compare
hahn-kev
approved these changes
Jul 25, 2024
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.
Fixes #970.
This changes
updateLexEntryCount
andupdateLanguageList
from being HTTP POST queries to being GraphQL mutations, which means the GraphQL cache is automatically updated when they run. Previously, you could "lose" the updated entry count for a project by navigating away from it and back to the project without a browser reload, because the result of callingupdateLexEntryCount
was being stored on the page but not actually sent to the GraphQL query cache, and the second time the project loaded the GraphQL cache would serve up stale data.Now that those two updates are using GraphQL mutations, and returning the updated values from the mutation, the GraphQL query cache is doing its job and caching the updated values, so navigating away from a project and back to it works as it should.