Add control graphql encoding

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-01-26 13:44:16 +01:00
parent e63fc4335a
commit 4c6127537b

View File

@@ -32,13 +32,19 @@ func NewControlConnection(p *page.Page[*coredata.Control]) *ControlConnection {
} }
} }
func NewControlEdge(f *coredata.Control) *ControlEdge { func NewControlEdge(c *coredata.Control) *ControlEdge {
return &ControlEdge{ return &ControlEdge{
Cursor: f.CursorKey(), Cursor: c.CursorKey(),
Node: NewControl(f), Node: NewControl(c),
} }
} }
func NewControl(e *coredata.Control) *Control { func NewControl(c *coredata.Control) *Control {
return &Control{} return &Control{
ID: c.ID,
Name: c.Name,
Description: c.Description,
CreatedAt: c.CreatedAt,
UpdatedAt: c.UpdatedAt,
}
} }