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

Method _Mutation_addStorage

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

Source from the content-addressed store, hash-verified

2122}
2123
2124func (ec *executionContext) _Mutation_addStorage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2125 fc, err := ec.fieldContext_Mutation_addStorage(ctx, field)
2126 if err != nil {
2127 return graphql.Null
2128 }
2129 ctx = graphql.WithFieldContext(ctx, fc)
2130 defer func() {
2131 if r := recover(); r != nil {
2132 ec.Error(ctx, ec.Recover(ctx, r))
2133 ret = graphql.Null
2134 }
2135 }()
2136 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2137 ctx = rctx // use context from middleware stack in children
2138 return ec.resolvers.Mutation().AddStorage(rctx, fc.Args["input"].(model.AddStorageInput))
2139 })
2140 if err != nil {
2141 ec.Error(ctx, err)
2142 return graphql.Null
2143 }
2144 if resTmp == nil {
2145 if !graphql.HasFieldError(ctx, fc) {
2146 ec.Errorf(ctx, "must not be null")
2147 }
2148 return graphql.Null
2149 }
2150 res := resTmp.(*model.Storage)
2151 fc.Result = res
2152 return ec.marshalNStorage2ᚖgithubᚗcomᚋencoderᚑrunᚋoperatorᚋpkgᚋgraphᚋmodelᚐStorage(ctx, field.Selections, res)
2153}
2154
2155func (ec *executionContext) fieldContext_Mutation_addStorage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2156 fc = &graphql.FieldContext{

Callers 1

_MutationMethod · 0.95

Tested by

no test coverage detected