API: typo fix
This commit is contained in:
parent
1e9e268d25
commit
4dc65f6393
|
@ -75,12 +75,12 @@ type ComplexityRoot struct {
|
|||
}
|
||||
|
||||
Comment struct {
|
||||
Authenticity func(childComplexity int) int
|
||||
Author func(childComplexity int) int
|
||||
EventType func(childComplexity int) int
|
||||
SuperceededBy func(childComplexity int) int
|
||||
Text func(childComplexity int) int
|
||||
Ticket func(childComplexity int) int
|
||||
Authenticity func(childComplexity int) int
|
||||
Author func(childComplexity int) int
|
||||
EventType func(childComplexity int) int
|
||||
SupersededBy func(childComplexity int) int
|
||||
Text func(childComplexity int) int
|
||||
Ticket func(childComplexity int) int
|
||||
}
|
||||
|
||||
Created struct {
|
||||
|
@ -282,7 +282,7 @@ type CommentResolver interface {
|
|||
Author(ctx context.Context, obj *model.Comment) (model.Entity, error)
|
||||
Text(ctx context.Context, obj *model.Comment) (string, error)
|
||||
Authenticity(ctx context.Context, obj *model.Comment) (model.Authenticity, error)
|
||||
SuperceededBy(ctx context.Context, obj *model.Comment) (*model.Comment, error)
|
||||
SupersededBy(ctx context.Context, obj *model.Comment) (*model.Comment, error)
|
||||
}
|
||||
type CreatedResolver interface {
|
||||
Ticket(ctx context.Context, obj *model.Created) (*model.Ticket, error)
|
||||
|
@ -437,12 +437,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||
|
||||
return e.complexity.Comment.EventType(childComplexity), true
|
||||
|
||||
case "Comment.superceededBy":
|
||||
if e.complexity.Comment.SuperceededBy == nil {
|
||||
case "Comment.supersededBy":
|
||||
if e.complexity.Comment.SupersededBy == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Comment.SuperceededBy(childComplexity), true
|
||||
return e.complexity.Comment.SupersededBy(childComplexity), true
|
||||
|
||||
case "Comment.text":
|
||||
if e.complexity.Comment.Text == nil {
|
||||
|
@ -1664,7 +1664,7 @@ type Comment implements EventDetail {
|
|||
authenticity: Authenticity!
|
||||
|
||||
# If this comment has been edited, this field points to the new revision.
|
||||
superceededBy: Comment
|
||||
supersededBy: Comment
|
||||
}
|
||||
|
||||
type LabelUpdate implements EventDetail {
|
||||
|
@ -2640,7 +2640,7 @@ func (ec *executionContext) _Comment_authenticity(ctx context.Context, field gra
|
|||
return ec.marshalNAuthenticity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAuthenticity(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Comment_superceededBy(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
|
||||
func (ec *executionContext) _Comment_supersededBy(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
|
@ -2658,7 +2658,7 @@ func (ec *executionContext) _Comment_superceededBy(ctx context.Context, field gr
|
|||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Comment().SuperceededBy(rctx, obj)
|
||||
return ec.resolvers.Comment().SupersededBy(rctx, obj)
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
|
@ -9362,7 +9362,7 @@ func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet,
|
|||
}
|
||||
return res
|
||||
})
|
||||
case "superceededBy":
|
||||
case "supersededBy":
|
||||
field := field
|
||||
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||||
defer func() {
|
||||
|
@ -9370,7 +9370,7 @@ func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet,
|
|||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
}
|
||||
}()
|
||||
res = ec._Comment_superceededBy(ctx, field, obj)
|
||||
res = ec._Comment_supersededBy(ctx, field, obj)
|
||||
return res
|
||||
})
|
||||
default:
|
||||
|
|
|
@ -256,7 +256,7 @@ type Comment implements EventDetail {
|
|||
authenticity: Authenticity!
|
||||
|
||||
# If this comment has been edited, this field points to the new revision.
|
||||
superceededBy: Comment
|
||||
supersededBy: Comment
|
||||
}
|
||||
|
||||
type LabelUpdate implements EventDetail {
|
||||
|
|
|
@ -55,14 +55,8 @@ func (r *commentResolver) Authenticity(ctx context.Context, obj *model.Comment)
|
|||
return comment.Database.Authenticity, err
|
||||
}
|
||||
|
||||
func (r *commentResolver) SuperceededBy(ctx context.Context, obj *model.Comment) (*model.Comment, error) {
|
||||
if obj.Database.SuperceededByID == nil {
|
||||
return nil, nil
|
||||
}
|
||||
// The only route to this resolver is via event details, which is already
|
||||
// authenticated. Further access to other resources is limited to
|
||||
// authenticated routes, such as TicketByID.
|
||||
return loaders.ForContext(ctx).CommentsByIDUnsafe.Load(*obj.Database.SuperceededByID)
|
||||
func (r *commentResolver) SupersededBy(ctx context.Context, obj *model.Comment) (*model.Comment, error) {
|
||||
panic(fmt.Errorf("not implemented"))
|
||||
}
|
||||
|
||||
func (r *createdResolver) Ticket(ctx context.Context, obj *model.Created) (*model.Ticket, error) {
|
||||
|
@ -623,3 +617,19 @@ type trackerACLResolver struct{ *Resolver }
|
|||
type trackerSubscriptionResolver struct{ *Resolver }
|
||||
type userResolver struct{ *Resolver }
|
||||
type userMentionResolver struct{ *Resolver }
|
||||
|
||||
// !!! WARNING !!!
|
||||
// The code below was going to be deleted when updating resolvers. It has been copied here so you have
|
||||
// one last chance to move it out of harms way if you want. There are two reasons this happens:
|
||||
// - When renaming or deleting a resolver the old code will be put in here. You can safely delete
|
||||
// it when you're done.
|
||||
// - You have helper methods in this file. Move them out to keep these resolver files clean.
|
||||
func (r *commentResolver) SuperceededBy(ctx context.Context, obj *model.Comment) (*model.Comment, error) {
|
||||
if obj.Database.SuperceededByID == nil {
|
||||
return nil, nil
|
||||
}
|
||||
// The only route to this resolver is via event details, which is already
|
||||
// authenticated. Further access to other resources is limited to
|
||||
// authenticated routes, such as TicketByID.
|
||||
return loaders.ForContext(ctx).CommentsByIDUnsafe.Load(*obj.Database.SuperceededByID)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue