Documentation ¶
Index ¶
- Variables
- func DefaultErrorPresenter(log zerolog.Logger) func(ctx context.Context, e error) *gqlerror.Error
- func GqlGetNestedSubFields(ctx context.Context, fields []graphql.CollectedField, targetFields ...string) ([]graphql.CollectedField, bool)
- func GqlGetSubFields(ctx context.Context, fields []graphql.CollectedField, targetField string) ([]graphql.CollectedField, bool)
- func GqlHasFields(fields []graphql.CollectedField, targetFields ...string) bool
- func NewGraphQlServer(es graphql.ExecutableSchema, log zerolog.Logger, enableIntrospection bool) *handler.Server
- func ValidateDateDirective(ctx context.Context, obj interface{}, next graphql.Resolver, ...) (res interface{}, err error)
- func ValidateDecimalDirective(ctx context.Context, obj interface{}, next graphql.Resolver, ...) (res interface{}, err error)
- func ValidateIntDirective(ctx context.Context, obj interface{}, next graphql.Resolver, ...) (res interface{}, err error)
- func ValidateStringDirective(ctx context.Context, obj interface{}, next graphql.Resolver, ...) (res interface{}, err error)
- type ValidateDateRelative
- type ValidateDateRules
- type ValidateDecimalRules
- type ValidateIntRules
- type ValidateStringRules
Constants ¶
This section is empty.
Variables ¶
View Source
var MB int64 = 1 << 20
Functions ¶
func DefaultErrorPresenter ¶ added in v0.0.6
func GqlGetNestedSubFields ¶ added in v0.7.1
func GqlGetNestedSubFields(ctx context.Context, fields []graphql.CollectedField, targetFields ...string) ([]graphql.CollectedField, bool)
GqlGetNestedSubFields will return the nested target field if found.
func GqlGetSubFields ¶ added in v0.7.1
func GqlGetSubFields(ctx context.Context, fields []graphql.CollectedField, targetField string) ([]graphql.CollectedField, bool)
GqlGetSubFields will return the target field if found.
func GqlHasFields ¶ added in v0.7.1
func GqlHasFields(fields []graphql.CollectedField, targetFields ...string) bool
GqlHasFields will return true if any of the target fields exist.
func NewGraphQlServer ¶
func ValidateDateDirective ¶ added in v0.0.20
func ValidateDecimalDirective ¶ added in v0.5.2
func ValidateIntDirective ¶ added in v0.7.2
func ValidateStringDirective ¶
Types ¶
type ValidateDateRelative ¶ added in v0.0.20
type ValidateDateRules ¶ added in v0.0.20
type ValidateDateRules struct { BeforeDate *scalars.GqlDate `json:"beforeDate"` BeforeRelative *ValidateDateRelative `json:"beforeRelative"` AfterDate *scalars.GqlDate `json:"afterDate"` AfterRelative *ValidateDateRelative `json:"afterRelative"` }
type ValidateDecimalRules ¶ added in v0.5.2
type ValidateIntRules ¶ added in v0.7.2
Click to show internal directories.
Click to hide internal directories.