Exposed build output to api

This commit is contained in:
2023-02-24 23:59:02 -07:00
parent 712a7b1429
commit 7e7c49c2e7
3 changed files with 19 additions and 7 deletions
+10
View File
@@ -217,6 +217,16 @@ func createSchema(db database.Database) (graphql.Schema, error) {
return nil, nil
},
},
"buildOutput": &graphql.Field{
Type: graphql.String,
Description: "Logs of the top level container build for the run.",
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
if run, ok := p.Source.(database.Run); ok {
return string(run.BuildOutput), nil
}
return nil, nil
},
},
"stdout": &graphql.Field{
Type: graphql.String,
Description: "The stdout used to validate the run.",