Skip to content
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

Add subgraph list command #185

Merged
merged 9 commits into from
Jan 29, 2021
Merged

Add subgraph list command #185

merged 9 commits into from
Jan 29, 2021

Conversation

JakeDawkins
Copy link
Contributor

@JakeDawkins JakeDawkins commented Jan 15, 2021

This PR adds the subgraph list command, showing a table of all subgraphs, their routing urls and info about when they were last updated. We also print a url to the studio page where someone can go see these services and their respective schemas

UPDATED:
image

todo:

  • use frontendUrlRoot in stdout printing to direct to studio

@JakeDawkins JakeDawkins added feature 🎉 new commands, flags, functionality, and improved error messages status - working in progress and removed status - working in progress labels Jan 15, 2021
Copy link
Contributor

@EverlastingBugstopper EverlastingBugstopper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is coming together nicely! I think it'll be super useful. If we ever end up making graph list a thing, and someone doesn't provide a graph ref argument for subgraph list we could recommend running graph list or maybe even run it for them to give them a list of acceptable inputs.

When I ran the command for the first time on one of my federated graphs, I got this table:

+--------+-------------+--------------------------+
| Name   | Routing Url | Last Updated             |
+--------+-------------+--------------------------+
| people |             | 2020-12-18T18:29:14.795Z |
+--------+-------------+--------------------------+
| films  |             | 2020-12-18T18:28:59.734Z |
+--------+-------------+--------------------------+

I think having N/A in the service url if there isn't one would be a nice touch, in addition to formatting the Last Updated time a bit nicer.


I could also argue for a bit less verbose output by default, with an option to show this expanded table, so the output would look more like this (kinda like typical bash programs output sequential lines):

people
films

@JakeDawkins JakeDawkins linked an issue Jan 20, 2021 that may be closed by this pull request
Copy link
Member

@lrlna lrlna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had two small things, and an even smaller nit. So close though!

@JakeDawkins JakeDawkins merged commit 616ae59 into main Jan 29, 2021
@JakeDawkins JakeDawkins deleted the jake/sg-list branch January 29, 2021 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎉 new commands, flags, functionality, and improved error messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

subgraph list command
3 participants