MCPcopy Create free account
hub / github.com/git-bug/git-bug / _Mutation_bugCreate

Method _Mutation_bugCreate

api/graphql/graph/root.generated.go:354–383  ·  view source on GitHub ↗

endregion ***************************** args.gotpl ***************************** region ************************** directives.gotpl ************************** endregion ************************** directives.gotpl ************************** region **************************** field.gotpl ******

(ctx context.Context, field graphql.CollectedField)

Source from the content-addressed store, hash-verified

352// region **************************** field.gotpl *****************************
353
354func (ec *executionContext) _Mutation_bugCreate(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
355 fc, err := ec.fieldContext_Mutation_bugCreate(ctx, field)
356 if err != nil {
357 return graphql.Null
358 }
359 ctx = graphql.WithFieldContext(ctx, fc)
360 defer func() {
361 if r := recover(); r != nil {
362 ec.Error(ctx, ec.Recover(ctx, r))
363 ret = graphql.Null
364 }
365 }()
366 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
367 ctx = rctx // use context from middleware stack in children
368 return ec.resolvers.Mutation().BugCreate(rctx, fc.Args["input"].(models.BugCreateInput))
369 })
370 if err != nil {
371 ec.Error(ctx, err)
372 return graphql.Null
373 }
374 if resTmp == nil {
375 if !graphql.HasFieldError(ctx, fc) {
376 ec.Errorf(ctx, "must not be null")
377 }
378 return graphql.Null
379 }
380 res := resTmp.(*models.BugCreatePayload)
381 fc.Result = res
382 return ec.marshalNBugCreatePayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugCreatePayload(ctx, field.Selections, res)
383}
384
385func (ec *executionContext) fieldContext_Mutation_bugCreate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
386 fc = &graphql.FieldContext{

Callers 1

_MutationMethod · 0.95

Tested by

no test coverage detected