Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Constraint struct { ID func(childComplexity int) int Operation func(childComplexity int) int Property func(childComplexity int) int Values func(childComplexity int) int } Distribution struct { ID func(childComplexity int) int Percentage func(childComplexity int) int Variant func(childComplexity int) int } Evaluation struct { CreatedAt func(childComplexity int) int FlagID func(childComplexity int) int FlagKey func(childComplexity int) int FlagVersion func(childComplexity int) int ID func(childComplexity int) int Value func(childComplexity int) int } EvaluationResults struct { Evaluations func(childComplexity int) int Total func(childComplexity int) int } Flag struct { CreatedAt func(childComplexity int) int DefaultVariantWhenOff func(childComplexity int) int DefaultVariantWhenOn func(childComplexity int) int Description func(childComplexity int) int Enabled func(childComplexity int) int ID func(childComplexity int) int Key func(childComplexity int) int Name func(childComplexity int) int Rules func(childComplexity int) int UpdatedAt func(childComplexity int) int Variants func(childComplexity int) int } FlagResults struct { Flags func(childComplexity int) int Total func(childComplexity int) int } FlagRule struct { Constraints func(childComplexity int) int Distributions func(childComplexity int) int ID func(childComplexity int) int } Mutation struct { CreateFlag func(childComplexity int, input flaggio.NewFlag) int CreateFlagRule func(childComplexity int, flagID string, input flaggio.NewFlagRule) int CreateSegment func(childComplexity int, input flaggio.NewSegment) int CreateSegmentRule func(childComplexity int, segmentID string, input flaggio.NewSegmentRule) int CreateVariant func(childComplexity int, flagID string, input flaggio.NewVariant) int DeleteEvaluation func(childComplexity int, id string) int DeleteFlag func(childComplexity int, id string) int DeleteFlagRule func(childComplexity int, flagID string, id string) int DeleteSegment func(childComplexity int, id string) int DeleteSegmentRule func(childComplexity int, segmentID string, id string) int DeleteUser func(childComplexity int, id string) int DeleteVariant func(childComplexity int, flagID string, id string) int Ping func(childComplexity int) int UpdateFlag func(childComplexity int, id string, input flaggio.UpdateFlag) int UpdateFlagRule func(childComplexity int, flagID string, id string, input flaggio.UpdateFlagRule) int UpdateSegment func(childComplexity int, id string, input flaggio.UpdateSegment) int UpdateSegmentRule func(childComplexity int, segmentID string, id string, input flaggio.UpdateSegmentRule) int UpdateVariant func(childComplexity int, flagID string, id string, input flaggio.UpdateVariant) int } Query struct { Flag func(childComplexity int, id string) int Flags func(childComplexity int, search *string, offset *int, limit *int) int Ping func(childComplexity int) int Segment func(childComplexity int, id string) int Segments func(childComplexity int, offset *int, limit *int) int User func(childComplexity int, id string) int Users func(childComplexity int, search *string, offset *int, limit *int) int } Segment struct { CreatedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Rules func(childComplexity int) int UpdatedAt func(childComplexity int) int } SegmentRule struct { Constraints func(childComplexity int) int ID func(childComplexity int) int } User struct { Context func(childComplexity int) int Evaluations func(childComplexity int, search *string, offset *int, limit *int) int ID func(childComplexity int) int UpdatedAt func(childComplexity int) int } UserResults struct { Total func(childComplexity int) int Users func(childComplexity int) int } Variant struct { Description func(childComplexity int) int ID func(childComplexity int) int Value func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type MutationResolver interface { Ping(ctx context.Context) (bool, error) CreateFlag(ctx context.Context, input flaggio.NewFlag) (*flaggio.Flag, error) UpdateFlag(ctx context.Context, id string, input flaggio.UpdateFlag) (*flaggio.Flag, error) DeleteFlag(ctx context.Context, id string) (string, error) CreateVariant(ctx context.Context, flagID string, input flaggio.NewVariant) (*flaggio.Variant, error) UpdateVariant(ctx context.Context, flagID string, id string, input flaggio.UpdateVariant) (*flaggio.Variant, error) DeleteVariant(ctx context.Context, flagID string, id string) (string, error) CreateFlagRule(ctx context.Context, flagID string, input flaggio.NewFlagRule) (*flaggio.FlagRule, error) UpdateFlagRule(ctx context.Context, flagID string, id string, input flaggio.UpdateFlagRule) (*flaggio.FlagRule, error) DeleteFlagRule(ctx context.Context, flagID string, id string) (string, error) CreateSegmentRule(ctx context.Context, segmentID string, input flaggio.NewSegmentRule) (*flaggio.SegmentRule, error) UpdateSegmentRule(ctx context.Context, segmentID string, id string, input flaggio.UpdateSegmentRule) (*flaggio.SegmentRule, error) DeleteSegmentRule(ctx context.Context, segmentID string, id string) (string, error) CreateSegment(ctx context.Context, input flaggio.NewSegment) (*flaggio.Segment, error) UpdateSegment(ctx context.Context, id string, input flaggio.UpdateSegment) (*flaggio.Segment, error) DeleteSegment(ctx context.Context, id string) (string, error) DeleteUser(ctx context.Context, id string) (string, error) DeleteEvaluation(ctx context.Context, id string) (string, error) }
type QueryResolver ¶
type QueryResolver interface { Ping(ctx context.Context) (bool, error) Flags(ctx context.Context, search *string, offset *int, limit *int) (*flaggio.FlagResults, error) Flag(ctx context.Context, id string) (*flaggio.Flag, error) Segments(ctx context.Context, offset *int, limit *int) ([]*flaggio.Segment, error) Segment(ctx context.Context, id string) (*flaggio.Segment, error) Users(ctx context.Context, search *string, offset *int, limit *int) (*flaggio.UserResults, error) User(ctx context.Context, id string) (*flaggio.User, error) }
type Resolver ¶
type Resolver struct { FlagRepo repository.Flag VariantRepo repository.Variant RuleRepo repository.Rule SegmentRepo repository.Segment UserRepo repository.User EvaluationRepo repository.Evaluation }
Resolver is the root resolver for the GraphQL server.
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns the mutation resolver.
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver User() UserResolver }
Click to show internal directories.
Click to hide internal directories.