Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- `apollo`
- Relax graphql version, resolve missing types "Boolean", "String" [#1355](https://github.com/apollographql/apollo-tooling/pull/1355)
- Add `service:list` and tests [#1358](https://github.com/apollographql/apollo-tooling/pull/1358)
- Add `service:list` and tests [#1358](https://github.com/apollographql/apollo-tooling/pull/1358) and header [#1377](https://github.com/apollographql/apollo-tooling/pull/1377)
- Update `service:list` test to use a simulated time to prevent relative dates causing snapshot failures [#1374](https://github.com/apollographql/apollo-tooling/pull/1374)
- `apollo-codegen-core`
- <First `apollo-codegen-core` related entry goes here>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Loading Apollo Project [completed]
Fetching list of services for graph engine [started]
Fetching list of services for graph engine [completed]

name URL last updated
───────── ───────────────────────────── ─────────────────────────
accounts http://localhost:4001/graphql 13 May 2019 (a month ago)
inventory http://localhost:4002/graphql 16 May 2019 (a month ago)
products http://localhost:4003/graphql 16 May 2019 (a month ago)
Expand Down
9 changes: 5 additions & 4 deletions packages/apollo/src/commands/service/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,16 @@ function formatHumanReadable({
process.env.NODE_ENV === "test" ? new Date("2019-06-13") : undefined
)
)
.sort((s1, s2) =>
s1.name.toUpperCase() > s2.name.toUpperCase() ? 1 : -1
)
.filter(Boolean),
{
columns: [
{ key: "name", label: "Name" },
{ key: "name", label: "name" },
{ key: "url", label: "URL" },
{ key: "updatedAt", label: "Last Updated At" }
{ key: "updatedAt", label: "last updated" }
],
// Override `printHeader` so we don't print a header
printHeader: () => {},
// The default `printLine` will output to the console; we want to capture the output so we can test
// it.
printLine: line => {
Expand Down