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

Method ___Schema

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

Source from the content-addressed store, hash-verified

8408var __SchemaImplementors = []string{"__Schema"}
8409
8410func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
8411 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
8412
8413 out := graphql.NewFieldSet(fields)
8414 deferred := make(map[string]*graphql.FieldSet)
8415 for i, field := range fields {
8416 switch field.Name {
8417 case "__typename":
8418 out.Values[i] = graphql.MarshalString("__Schema")
8419 case "description":
8420 out.Values[i] = ec.___Schema_description(ctx, field, obj)
8421 case "types":
8422 out.Values[i] = ec.___Schema_types(ctx, field, obj)
8423 if out.Values[i] == graphql.Null {
8424 out.Invalids++
8425 }
8426 case "queryType":
8427 out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
8428 if out.Values[i] == graphql.Null {
8429 out.Invalids++
8430 }
8431 case "mutationType":
8432 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
8433 case "subscriptionType":
8434 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
8435 case "directives":
8436 out.Values[i] = ec.___Schema_directives(ctx, field, obj)
8437 if out.Values[i] == graphql.Null {
8438 out.Invalids++
8439 }
8440 default:
8441 panic("unknown field " + strconv.Quote(field.Name))
8442 }
8443 }
8444 out.Dispatch(ctx)
8445 if out.Invalids > 0 {
8446 return graphql.Null
8447 }
8448
8449 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
8450
8451 for label, dfs := range deferred {
8452 ec.processDeferredGroup(graphql.DeferredGroup{
8453 Label: label,
8454 Path: graphql.GetPath(ctx),
8455 FieldSet: dfs,
8456 Context: ctx,
8457 })
8458 }
8459
8460 return out
8461}
8462
8463var __TypeImplementors = []string{"__Type"}
8464

Calls 7

___Schema_descriptionMethod · 0.95
___Schema_typesMethod · 0.95
___Schema_queryTypeMethod · 0.95
___Schema_directivesMethod · 0.95
processDeferredGroupMethod · 0.95

Tested by

no test coverage detected