This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
backend/internal/graphql/resolvers/helpers.go

17 lines
254 B
Go

package resolvers
import (
"context"
"github.com/99designs/gqlgen/graphql"
)
func shouldCount(ctx context.Context) bool {
for _, field := range graphql.CollectFieldsCtx(ctx, nil) {
if field.Name == "total" {
return true
}
}
return false
}