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

Method _ModelDeployment

pkg/graph/generated.go:7343–7388  ·  view source on GitHub ↗
(ctx context.Context, sel ast.SelectionSet, obj *model.ModelDeployment)

Source from the content-addressed store, hash-verified

7341var modelDeploymentImplementors = []string{"ModelDeployment"}
7342
7343func (ec *executionContext) _ModelDeployment(ctx context.Context, sel ast.SelectionSet, obj *model.ModelDeployment) graphql.Marshaler {
7344 fields := graphql.CollectFields(ec.OperationContext, sel, modelDeploymentImplementors)
7345
7346 out := graphql.NewFieldSet(fields)
7347 deferred := make(map[string]*graphql.FieldSet)
7348 for i, field := range fields {
7349 switch field.Name {
7350 case "__typename":
7351 out.Values[i] = graphql.MarshalString("ModelDeployment")
7352 case "enabled":
7353 out.Values[i] = ec._ModelDeployment_enabled(ctx, field, obj)
7354 if out.Values[i] == graphql.Null {
7355 out.Invalids++
7356 }
7357 case "cpu":
7358 out.Values[i] = ec._ModelDeployment_cpu(ctx, field, obj)
7359 if out.Values[i] == graphql.Null {
7360 out.Invalids++
7361 }
7362 case "memory":
7363 out.Values[i] = ec._ModelDeployment_memory(ctx, field, obj)
7364 if out.Values[i] == graphql.Null {
7365 out.Invalids++
7366 }
7367 default:
7368 panic("unknown field " + strconv.Quote(field.Name))
7369 }
7370 }
7371 out.Dispatch(ctx)
7372 if out.Invalids > 0 {
7373 return graphql.Null
7374 }
7375
7376 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
7377
7378 for label, dfs := range deferred {
7379 ec.processDeferredGroup(graphql.DeferredGroup{
7380 Label: label,
7381 Path: graphql.GetPath(ctx),
7382 FieldSet: dfs,
7383 Context: ctx,
7384 })
7385 }
7386
7387 return out
7388}
7389
7390var mutationImplementors = []string{"Mutation"}
7391

Calls 4

_ModelDeployment_cpuMethod · 0.95
processDeferredGroupMethod · 0.95

Tested by

no test coverage detected