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

Method _Mutation_deleteStorage

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

Source from the content-addressed store, hash-verified

2256}
2257
2258func (ec *executionContext) _Mutation_deleteStorage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2259 fc, err := ec.fieldContext_Mutation_deleteStorage(ctx, field)
2260 if err != nil {
2261 return graphql.Null
2262 }
2263 ctx = graphql.WithFieldContext(ctx, fc)
2264 defer func() {
2265 if r := recover(); r != nil {
2266 ec.Error(ctx, ec.Recover(ctx, r))
2267 ret = graphql.Null
2268 }
2269 }()
2270 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2271 ctx = rctx // use context from middleware stack in children
2272 return ec.resolvers.Mutation().DeleteStorage(rctx, fc.Args["id"].(string))
2273 })
2274 if err != nil {
2275 ec.Error(ctx, err)
2276 return graphql.Null
2277 }
2278 if resTmp == nil {
2279 if !graphql.HasFieldError(ctx, fc) {
2280 ec.Errorf(ctx, "must not be null")
2281 }
2282 return graphql.Null
2283 }
2284 res := resTmp.(*model.Storage)
2285 fc.Result = res
2286 return ec.marshalNStorage2ᚖgithubᚗcomᚋencoderᚑrunᚋoperatorᚋpkgᚋgraphᚋmodelᚐStorage(ctx, field.Selections, res)
2287}
2288
2289func (ec *executionContext) fieldContext_Mutation_deleteStorage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2290 fc = &graphql.FieldContext{

Callers 1

_MutationMethod · 0.95

Tested by

no test coverage detected