blob: 7619f748436506d1da445768669519d029035ea8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package resolvers
import (
"context"
"image/color"
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/graphql/graph"
)
var _ graph.LabelResolver = &labelResolver{}
type labelResolver struct{}
func (labelResolver) Name(ctx context.Context, obj *bug.Label) (string, error) {
return obj.String(), nil
}
func (labelResolver) Color(ctx context.Context, obj *bug.Label) (*color.RGBA, error) {
rgba := obj.RGBA()
return &rgba, nil
}
|