-
Notifications
You must be signed in to change notification settings - Fork 12
/
tenant_billable.resolvers.go
28 lines (23 loc) · 1.04 KB
/
tenant_billable.resolvers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package resolver
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
// Code generated by github.com/99designs/gqlgen version v0.17.46
import (
"context"
"github.com/99designs/gqlgen/graphql"
"github.com/openline-ai/openline-customer-os/packages/server/customer-os-api/graph/model"
"github.com/openline-ai/openline-customer-os/packages/server/customer-os-api/tracing"
)
// BillableInfo is the resolver for the billableInfo field.
func (r *queryResolver) BillableInfo(ctx context.Context) (*model.TenantBillableInfo, error) {
ctx, span := tracing.StartGraphQLTracerSpan(ctx, "QueryResolver.BillableInfo", graphql.GetOperationContext(ctx))
defer span.Finish()
tracing.SetDefaultResolverSpanTags(ctx, span)
result, err := r.Services.BillableService.GetBillableDetails(ctx)
if err != nil {
tracing.TraceErr(span, err)
graphql.AddErrorf(ctx, "Failed to fetch billable info")
return nil, nil
}
return result, err
}