chore: handle push of unchanged schema

This commit is contained in:
2022-10-14 22:41:56 +02:00
parent eb41e24002
commit b1124d6350
10 changed files with 866 additions and 61 deletions
+13
View File
@@ -4,6 +4,7 @@ import (
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
"gitlab.com/unboundsoftware/schemas/domain"
"gitlab.com/unboundsoftware/schemas/graph/model"
)
func (r *Resolver) fetchSubGraph(subGraphId string) (*domain.SubGraph, error) {
@@ -14,3 +15,15 @@ func (r *Resolver) fetchSubGraph(subGraphId string) (*domain.SubGraph, error) {
}
return subGraph, nil
}
func (r *Resolver) toGqlSubGraph(subGraph *domain.SubGraph) *model.SubGraph {
return &model.SubGraph{
ID: subGraph.ID.String(),
Service: subGraph.Service,
URL: subGraph.Url,
WsURL: subGraph.WSUrl,
Sdl: subGraph.Sdl,
ChangedBy: subGraph.ChangedBy,
ChangedAt: subGraph.ChangedAt,
}
}