MCPcopy Create free account
hub / github.com/git-bug/git-bug / _Query

Method _Query

api/graphql/graph/root.generated.go:1245–1310  ·  view source on GitHub ↗
(ctx context.Context, sel ast.SelectionSet)

Source from the content-addressed store, hash-verified

1243var queryImplementors = []string{"Query"}
1244
1245func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
1246 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
1247 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
1248 Object: "Query",
1249 })
1250
1251 out := graphql.NewFieldSet(fields)
1252 deferred := make(map[string]*graphql.FieldSet)
1253 for i, field := range fields {
1254 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
1255 Object: field.Name,
1256 Field: field,
1257 })
1258
1259 switch field.Name {
1260 case "__typename":
1261 out.Values[i] = graphql.MarshalString("Query")
1262 case "repository":
1263 field := field
1264
1265 innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
1266 defer func() {
1267 if r := recover(); r != nil {
1268 ec.Error(ctx, ec.Recover(ctx, r))
1269 }
1270 }()
1271 res = ec._Query_repository(ctx, field)
1272 return res
1273 }
1274
1275 rrm := func(ctx context.Context) graphql.Marshaler {
1276 return ec.OperationContext.RootResolverMiddleware(ctx,
1277 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1278 }
1279
1280 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
1281 case "__type":
1282 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1283 return ec._Query___type(ctx, field)
1284 })
1285 case "__schema":
1286 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1287 return ec._Query___schema(ctx, field)
1288 })
1289 default:
1290 panic("unknown field " + strconv.Quote(field.Name))
1291 }
1292 }
1293 out.Dispatch(ctx)
1294 if out.Invalids > 0 {
1295 return graphql.Null
1296 }
1297
1298 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1299
1300 for label, dfs := range deferred {
1301 ec.processDeferredGroup(graphql.DeferredGroup{
1302 Label: label,

Callers 1

ExecMethod · 0.95

Calls 5

_Query_repositoryMethod · 0.95
_Query___typeMethod · 0.95
_Query___schemaMethod · 0.95
processDeferredGroupMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected