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

Method ___EnumValue

pkg/graph/generated.go:8256–8300  ·  view source on GitHub ↗
(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue)

Source from the content-addressed store, hash-verified

8254var __EnumValueImplementors = []string{"__EnumValue"}
8255
8256func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
8257 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
8258
8259 out := graphql.NewFieldSet(fields)
8260 deferred := make(map[string]*graphql.FieldSet)
8261 for i, field := range fields {
8262 switch field.Name {
8263 case "__typename":
8264 out.Values[i] = graphql.MarshalString("__EnumValue")
8265 case "name":
8266 out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
8267 if out.Values[i] == graphql.Null {
8268 out.Invalids++
8269 }
8270 case "description":
8271 out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
8272 case "isDeprecated":
8273 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
8274 if out.Values[i] == graphql.Null {
8275 out.Invalids++
8276 }
8277 case "deprecationReason":
8278 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
8279 default:
8280 panic("unknown field " + strconv.Quote(field.Name))
8281 }
8282 }
8283 out.Dispatch(ctx)
8284 if out.Invalids > 0 {
8285 return graphql.Null
8286 }
8287
8288 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
8289
8290 for label, dfs := range deferred {
8291 ec.processDeferredGroup(graphql.DeferredGroup{
8292 Label: label,
8293 Path: graphql.GetPath(ctx),
8294 FieldSet: dfs,
8295 Context: ctx,
8296 })
8297 }
8298
8299 return out
8300}
8301
8302var __FieldImplementors = []string{"__Field"}
8303

Tested by

no test coverage detected