blob: dc6f1b9cbac1eea3e3064e2ad79d971cf0cfe875 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package resolvers
import (
"context"
"image/color"
"github.com/MichaelMure/git-bug/graphql/graph"
)
var _ graph.ColorResolver = &colorResolver{}
type colorResolver struct{}
func (colorResolver) R(ctx context.Context, obj *color.RGBA) (int, error) {
return int(obj.R), nil
}
func (colorResolver) G(ctx context.Context, obj *color.RGBA) (int, error) {
return int(obj.G), nil
}
func (colorResolver) B(ctx context.Context, obj *color.RGBA) (int, error) {
return int(obj.B), nil
}
|