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

Method ___Field

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

Source from the content-addressed store, hash-verified

8302var __FieldImplementors = []string{"__Field"}
8303
8304func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
8305 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
8306
8307 out := graphql.NewFieldSet(fields)
8308 deferred := make(map[string]*graphql.FieldSet)
8309 for i, field := range fields {
8310 switch field.Name {
8311 case "__typename":
8312 out.Values[i] = graphql.MarshalString("__Field")
8313 case "name":
8314 out.Values[i] = ec.___Field_name(ctx, field, obj)
8315 if out.Values[i] == graphql.Null {
8316 out.Invalids++
8317 }
8318 case "description":
8319 out.Values[i] = ec.___Field_description(ctx, field, obj)
8320 case "args":
8321 out.Values[i] = ec.___Field_args(ctx, field, obj)
8322 if out.Values[i] == graphql.Null {
8323 out.Invalids++
8324 }
8325 case "type":
8326 out.Values[i] = ec.___Field_type(ctx, field, obj)
8327 if out.Values[i] == graphql.Null {
8328 out.Invalids++
8329 }
8330 case "isDeprecated":
8331 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
8332 if out.Values[i] == graphql.Null {
8333 out.Invalids++
8334 }
8335 case "deprecationReason":
8336 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
8337 default:
8338 panic("unknown field " + strconv.Quote(field.Name))
8339 }
8340 }
8341 out.Dispatch(ctx)
8342 if out.Invalids > 0 {
8343 return graphql.Null
8344 }
8345
8346 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
8347
8348 for label, dfs := range deferred {
8349 ec.processDeferredGroup(graphql.DeferredGroup{
8350 Label: label,
8351 Path: graphql.GetPath(ctx),
8352 FieldSet: dfs,
8353 Context: ctx,
8354 })
8355 }
8356
8357 return out
8358}
8359
8360var __InputValueImplementors = []string{"__InputValue"}
8361

Calls 7

___Field_nameMethod · 0.95
___Field_descriptionMethod · 0.95
___Field_argsMethod · 0.95
___Field_typeMethod · 0.95
___Field_isDeprecatedMethod · 0.95
processDeferredGroupMethod · 0.95

Tested by

no test coverage detected