-
Notifications
You must be signed in to change notification settings - Fork 469
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
apollo client:push update output to include more details #1290
Conversation
This updates the operation registration command to use the new resolver that returns more information, namely added operations and invalidation messages associated with the operation. The `apollo client:push` command then ouputs this information
Fixes #1272? It would be great to get @mgeraci 's feedback on this - he suggested this idea to me fairly recently while we stepped through an issue they faced. Edited to remove unintended tone (possibly snarky 😬), apologies if this was interpreted with anything but a neutral/positive attitude. Thanks @evans! |
@trevor-scheer That's a great idea! I'll see how to work that into the PR |
} client to the ${serviceName} service in Engine` | ||
); | ||
if (!registrationSuccess) { | ||
if (invalidOperations) { |
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.
Is it possible for !registrationSuccess && !invalidOperations
? I only ask in case it's a possible scenario, and if it has any semantics that we can communicate.
I don't imagine so, but I'd suggest that we throw or log something if that's the case.
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.
Right now it shouldn't be possible, though maybe in the future. I'll add an error message!
} | ||
} else { | ||
if (newOperations && newOperations.length) { | ||
task.title = `Added ${ |
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.
Small nit: Added 6 to Apollo Platform
reads a bit awkward. I'll offer some suggestions, but please feel free to disregard / use your discretion.
Successfully {registered|pushed|added} 6 operations (optional: to the operation {registry|safelist})
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.
I like it!
Co-Authored-By: Trevor Scheer <trevor.scheer@gmail.com>
Sorry I didn't get in here before the merge, but this looks like a great set of improvements! Did it end up hitting #1272 — there are tons of great messaging improvements here, but I wasn't sure if this change also errors out if it finds an invalid operation. Either way, great work! |
This updates the operation registration command to use the new resolver
that returns more information, namely added operations and invalidation
messages associated with the operation. The
apollo client:push
commandthen outputs this information
Happy path:
Sad path:
TODO:
*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.