@@ -99,6 +99,16 @@ type OrbPublishResponse struct {
9999 }
100100}
101101
102+ // The OrbImportVersionResponse type matches the data shape of the GQL response for
103+ // importing an orb version.
104+ type OrbImportVersionResponse struct {
105+ ImportOrbVersion struct {
106+ Orb Orb
107+
108+ Errors GQLErrorsCollection
109+ }
110+ }
111+
102112// The OrbPromoteResponse type matches the data shape of the GQL response for
103113// promoting an orb.
104114type OrbPromoteResponse struct {
@@ -579,7 +589,7 @@ func OrbQuery(cl *graphql.Client, configPath string) (*ConfigResponse, error) {
579589
580590// OrbImportVersion publishes a new version of an orb using the provided source and id.
581591func OrbImportVersion (cl * graphql.Client , orbSrc string , orbID string , orbVersion string ) (* Orb , error ) {
582- var response OrbPublishResponse
592+ var response OrbImportVersionResponse
583593
584594 query := `
585595 mutation($config: String!, $orbId: UUID!, $version: String!) {
@@ -608,11 +618,11 @@ func OrbImportVersion(cl *graphql.Client, orbSrc string, orbID string, orbVersio
608618 return nil , errors .Wrap (err , "unable to import orb version" )
609619 }
610620
611- if len (response .PublishOrb .Errors ) > 0 {
612- return nil , response .PublishOrb .Errors
621+ if len (response .ImportOrbVersion .Errors ) > 0 {
622+ return nil , response .ImportOrbVersion .Errors
613623 }
614624
615- return & response .PublishOrb .Orb , nil
625+ return & response .ImportOrbVersion .Orb , nil
616626}
617627
618628// OrbPublishByID publishes a new version of an orb by id
0 commit comments