Fix graphql api not returning stdout/stderr as strings
This commit is contained in:
@@ -222,7 +222,7 @@ func createSchema(db database.Database) (graphql.Schema, error) {
|
|||||||
Description: "The stdout used to validate the run.",
|
Description: "The stdout used to validate the run.",
|
||||||
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
|
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
|
||||||
if run, ok := p.Source.(database.Run); ok {
|
if run, ok := p.Source.(database.Run); ok {
|
||||||
return run.Stdout, nil
|
return string(run.Stdout), nil
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
},
|
},
|
||||||
@@ -232,7 +232,7 @@ func createSchema(db database.Database) (graphql.Schema, error) {
|
|||||||
Description: "The stderr used to validate the run.",
|
Description: "The stderr used to validate the run.",
|
||||||
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
|
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
|
||||||
if run, ok := p.Source.(database.Run); ok {
|
if run, ok := p.Source.(database.Run); ok {
|
||||||
return run.Stderr, nil
|
return string(run.Stderr), nil
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user