MCPcopy Create free account
hub / github.com/encoder-run/operator / _Mutation_addModel

Method _Mutation_addModel

pkg/graph/generated.go:1779–1808  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField)

Source from the content-addressed store, hash-verified

1777}
1778
1779func (ec *executionContext) _Mutation_addModel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1780 fc, err := ec.fieldContext_Mutation_addModel(ctx, field)
1781 if err != nil {
1782 return graphql.Null
1783 }
1784 ctx = graphql.WithFieldContext(ctx, fc)
1785 defer func() {
1786 if r := recover(); r != nil {
1787 ec.Error(ctx, ec.Recover(ctx, r))
1788 ret = graphql.Null
1789 }
1790 }()
1791 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1792 ctx = rctx // use context from middleware stack in children
1793 return ec.resolvers.Mutation().AddModel(rctx, fc.Args["input"].(model.AddModelInput))
1794 })
1795 if err != nil {
1796 ec.Error(ctx, err)
1797 return graphql.Null
1798 }
1799 if resTmp == nil {
1800 if !graphql.HasFieldError(ctx, fc) {
1801 ec.Errorf(ctx, "must not be null")
1802 }
1803 return graphql.Null
1804 }
1805 res := resTmp.(*model.Model)
1806 fc.Result = res
1807 return ec.marshalNModel2ᚖgithubᚗcomᚋencoderᚑrunᚋoperatorᚋpkgᚋgraphᚋmodelᚐModel(ctx, field.Selections, res)
1808}
1809
1810func (ec *executionContext) fieldContext_Mutation_addModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1811 fc = &graphql.FieldContext{

Callers 1

_MutationMethod · 0.95

Tested by

no test coverage detected