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

Method _Query

pkg/graph/generated.go:7623–7889  ·  view source on GitHub ↗
(ctx context.Context, sel ast.SelectionSet)

Source from the content-addressed store, hash-verified

7621var queryImplementors = []string{"Query"}
7622
7623func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
7624 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
7625 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
7626 Object: "Query",
7627 })
7628
7629 out := graphql.NewFieldSet(fields)
7630 deferred := make(map[string]*graphql.FieldSet)
7631 for i, field := range fields {
7632 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
7633 Object: field.Name,
7634 Field: field,
7635 })
7636
7637 switch field.Name {
7638 case "__typename":
7639 out.Values[i] = graphql.MarshalString("Query")
7640 case "models":
7641 field := field
7642
7643 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7644 defer func() {
7645 if r := recover(); r != nil {
7646 ec.Error(ctx, ec.Recover(ctx, r))
7647 }
7648 }()
7649 res = ec._Query_models(ctx, field)
7650 if res == graphql.Null {
7651 atomic.AddUint32(&fs.Invalids, 1)
7652 }
7653 return res
7654 }
7655
7656 rrm := func(ctx context.Context) graphql.Marshaler {
7657 return ec.OperationContext.RootResolverMiddleware(ctx,
7658 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7659 }
7660
7661 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7662 case "getModel":
7663 field := field
7664
7665 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7666 defer func() {
7667 if r := recover(); r != nil {
7668 ec.Error(ctx, ec.Recover(ctx, r))
7669 }
7670 }()
7671 res = ec._Query_getModel(ctx, field)
7672 if res == graphql.Null {
7673 atomic.AddUint32(&fs.Invalids, 1)
7674 }
7675 return res
7676 }
7677
7678 rrm := func(ctx context.Context) graphql.Marshaler {
7679 return ec.OperationContext.RootResolverMiddleware(ctx,
7680 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })

Callers 1

ExecMethod · 0.95

Calls 13

_Query_modelsMethod · 0.95
_Query_getModelMethod · 0.95
_Query_repositoriesMethod · 0.95
_Query_getRepositoryMethod · 0.95
_Query_storagesMethod · 0.95
_Query_getStorageMethod · 0.95
_Query_pipelinesMethod · 0.95
_Query_getPipelineMethod · 0.95
_Query_semanticSearchMethod · 0.95
_Query___typeMethod · 0.95
_Query___schemaMethod · 0.95

Tested by

no test coverage detected