Add logging to pipeline create graphql mutation

This commit is contained in:
2023-01-31 18:47:44 -07:00
parent c1d4f3cc16
commit 1e0526a599
+7
View File
@@ -8,8 +8,11 @@ import (
"github.com/google/uuid"
"github.com/graphql-go/graphql"
"github.com/graphql-go/handler"
"github.com/op/go-logging"
)
var log = logging.MustGetLogger("cursorius-server")
func createSchema(db database.Database) (graphql.Schema, error) {
webhookType := graphql.NewObject(graphql.ObjectConfig{
Name: "Webhook",
@@ -159,6 +162,10 @@ func createSchema(db database.Database) (graphql.Schema, error) {
if err != nil {
return nil, err
}
log.Infof("Created pipeline with id: %v, name: %v, url: %v, and poll interval: %v",
pipeline.Id, pipeline.Name, pipeline.Url, pipeline.PollInterval)
return pipeline, nil
},
},