diff --git a/api/resource_volumes.go b/api/resource_volumes.go index 2fe6cc1140..148a6d9d43 100644 --- a/api/resource_volumes.go +++ b/api/resource_volumes.go @@ -89,12 +89,14 @@ func (c *Client) DeleteVolume(volID string) (App *App, err error) { func (c *Client) GetVolume(volID string) (Volume *Volume, err error) { query := ` query($id: ID!) { - Volume(id: $id) { - id - name - sizeGb - region - createdAt + volume: node(id: $id) { + ... on Volume { + id + name + sizeGb + region + createdAt + } } }` diff --git a/cmd/volumes.go b/cmd/volumes.go index a547d36ea5..373adfb0b8 100644 --- a/cmd/volumes.go +++ b/cmd/volumes.go @@ -132,8 +132,9 @@ func runDestroyVolume(ctx *cmdctx.CmdContext) error { } func runShowVolume(ctx *cmdctx.CmdContext) error { + volumeID := ctx.Args[0] - volume, err := ctx.Client.API().GetVolume(ctx.AppName) + volume, err := ctx.Client.API().GetVolume(volumeID) if err != nil { return err