github.com/oinume/lekcije@v0.0.0-20231017100347-5b4c5eb6ab24/backend/interface/graphql/generated/generated.go (about) 1 // Code generated by github.com/99designs/gqlgen, DO NOT EDIT. 2 3 package generated 4 5 import ( 6 "bytes" 7 "context" 8 "errors" 9 "fmt" 10 "strconv" 11 "sync" 12 "sync/atomic" 13 14 "github.com/99designs/gqlgen/graphql" 15 "github.com/99designs/gqlgen/graphql/introspection" 16 "github.com/oinume/lekcije/backend/interface/graphql/model" 17 gqlparser "github.com/vektah/gqlparser/v2" 18 "github.com/vektah/gqlparser/v2/ast" 19 ) 20 21 // region ************************** generated!.gotpl ************************** 22 23 // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. 24 func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { 25 return &executableSchema{ 26 resolvers: cfg.Resolvers, 27 directives: cfg.Directives, 28 complexity: cfg.Complexity, 29 } 30 } 31 32 type Config struct { 33 Resolvers ResolverRoot 34 Directives DirectiveRoot 35 Complexity ComplexityRoot 36 } 37 38 type ResolverRoot interface { 39 Mutation() MutationResolver 40 Query() QueryResolver 41 User() UserResolver 42 } 43 44 type DirectiveRoot struct { 45 } 46 47 type ComplexityRoot struct { 48 CreateFollowingTeacherPayload struct { 49 ID func(childComplexity int) int 50 TeacherID func(childComplexity int) int 51 } 52 53 DeleteFollowingTeachersPayload struct { 54 TeacherIds func(childComplexity int) int 55 } 56 57 Empty struct { 58 ID func(childComplexity int) int 59 } 60 61 FollowingTeacher struct { 62 CreatedAt func(childComplexity int) int 63 ID func(childComplexity int) int 64 Teacher func(childComplexity int) int 65 } 66 67 FollowingTeacherConnection struct { 68 Edges func(childComplexity int) int 69 Nodes func(childComplexity int) int 70 PageInfo func(childComplexity int) int 71 } 72 73 FollowingTeacherEdge struct { 74 Cursor func(childComplexity int) int 75 Node func(childComplexity int) int 76 } 77 78 Mutation struct { 79 CreateEmpty func(childComplexity int) int 80 CreateFollowingTeacher func(childComplexity int, input model.CreateFollowingTeacherInput) int 81 DeleteFollowingTeachers func(childComplexity int, input model.DeleteFollowingTeachersInput) int 82 UpdateNotificationTimeSpans func(childComplexity int, input model.UpdateNotificationTimeSpansInput) int 83 UpdateViewer func(childComplexity int, input model.UpdateViewerInput) int 84 } 85 86 NotificationTimeSpan struct { 87 FromHour func(childComplexity int) int 88 FromMinute func(childComplexity int) int 89 ToHour func(childComplexity int) int 90 ToMinute func(childComplexity int) int 91 } 92 93 NotificationTimeSpanPayload struct { 94 TimeSpans func(childComplexity int) int 95 } 96 97 PageInfo struct { 98 HasNextPage func(childComplexity int) int 99 HasPreviousPage func(childComplexity int) int 100 } 101 102 Query struct { 103 Empty func(childComplexity int) int 104 FollowingTeachers func(childComplexity int) int 105 Viewer func(childComplexity int) int 106 } 107 108 Teacher struct { 109 ID func(childComplexity int) int 110 Name func(childComplexity int) int 111 } 112 113 User struct { 114 Email func(childComplexity int) int 115 FollowingTeachers func(childComplexity int, first *int, after *string, last *int, before *string) int 116 ID func(childComplexity int) int 117 NotificationTimeSpans func(childComplexity int) int 118 ShowTutorial func(childComplexity int) int 119 } 120 } 121 122 type MutationResolver interface { 123 CreateEmpty(ctx context.Context) (*model.Empty, error) 124 CreateFollowingTeacher(ctx context.Context, input model.CreateFollowingTeacherInput) (*model.CreateFollowingTeacherPayload, error) 125 DeleteFollowingTeachers(ctx context.Context, input model.DeleteFollowingTeachersInput) (*model.DeleteFollowingTeachersPayload, error) 126 UpdateNotificationTimeSpans(ctx context.Context, input model.UpdateNotificationTimeSpansInput) (*model.NotificationTimeSpanPayload, error) 127 UpdateViewer(ctx context.Context, input model.UpdateViewerInput) (*model.User, error) 128 } 129 type QueryResolver interface { 130 Empty(ctx context.Context) (*model.Empty, error) 131 FollowingTeachers(ctx context.Context) ([]*model.FollowingTeacher, error) 132 Viewer(ctx context.Context) (*model.User, error) 133 } 134 type UserResolver interface { 135 FollowingTeachers(ctx context.Context, obj *model.User, first *int, after *string, last *int, before *string) (*model.FollowingTeacherConnection, error) 136 NotificationTimeSpans(ctx context.Context, obj *model.User) ([]*model.NotificationTimeSpan, error) 137 } 138 139 type executableSchema struct { 140 resolvers ResolverRoot 141 directives DirectiveRoot 142 complexity ComplexityRoot 143 } 144 145 func (e *executableSchema) Schema() *ast.Schema { 146 return parsedSchema 147 } 148 149 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { 150 ec := executionContext{nil, e, 0, 0, nil} 151 _ = ec 152 switch typeName + "." + field { 153 154 case "CreateFollowingTeacherPayload.id": 155 if e.complexity.CreateFollowingTeacherPayload.ID == nil { 156 break 157 } 158 159 return e.complexity.CreateFollowingTeacherPayload.ID(childComplexity), true 160 161 case "CreateFollowingTeacherPayload.teacherId": 162 if e.complexity.CreateFollowingTeacherPayload.TeacherID == nil { 163 break 164 } 165 166 return e.complexity.CreateFollowingTeacherPayload.TeacherID(childComplexity), true 167 168 case "DeleteFollowingTeachersPayload.teacherIds": 169 if e.complexity.DeleteFollowingTeachersPayload.TeacherIds == nil { 170 break 171 } 172 173 return e.complexity.DeleteFollowingTeachersPayload.TeacherIds(childComplexity), true 174 175 case "Empty.id": 176 if e.complexity.Empty.ID == nil { 177 break 178 } 179 180 return e.complexity.Empty.ID(childComplexity), true 181 182 case "FollowingTeacher.createdAt": 183 if e.complexity.FollowingTeacher.CreatedAt == nil { 184 break 185 } 186 187 return e.complexity.FollowingTeacher.CreatedAt(childComplexity), true 188 189 case "FollowingTeacher.id": 190 if e.complexity.FollowingTeacher.ID == nil { 191 break 192 } 193 194 return e.complexity.FollowingTeacher.ID(childComplexity), true 195 196 case "FollowingTeacher.teacher": 197 if e.complexity.FollowingTeacher.Teacher == nil { 198 break 199 } 200 201 return e.complexity.FollowingTeacher.Teacher(childComplexity), true 202 203 case "FollowingTeacherConnection.edges": 204 if e.complexity.FollowingTeacherConnection.Edges == nil { 205 break 206 } 207 208 return e.complexity.FollowingTeacherConnection.Edges(childComplexity), true 209 210 case "FollowingTeacherConnection.nodes": 211 if e.complexity.FollowingTeacherConnection.Nodes == nil { 212 break 213 } 214 215 return e.complexity.FollowingTeacherConnection.Nodes(childComplexity), true 216 217 case "FollowingTeacherConnection.pageInfo": 218 if e.complexity.FollowingTeacherConnection.PageInfo == nil { 219 break 220 } 221 222 return e.complexity.FollowingTeacherConnection.PageInfo(childComplexity), true 223 224 case "FollowingTeacherEdge.cursor": 225 if e.complexity.FollowingTeacherEdge.Cursor == nil { 226 break 227 } 228 229 return e.complexity.FollowingTeacherEdge.Cursor(childComplexity), true 230 231 case "FollowingTeacherEdge.node": 232 if e.complexity.FollowingTeacherEdge.Node == nil { 233 break 234 } 235 236 return e.complexity.FollowingTeacherEdge.Node(childComplexity), true 237 238 case "Mutation.createEmpty": 239 if e.complexity.Mutation.CreateEmpty == nil { 240 break 241 } 242 243 return e.complexity.Mutation.CreateEmpty(childComplexity), true 244 245 case "Mutation.createFollowingTeacher": 246 if e.complexity.Mutation.CreateFollowingTeacher == nil { 247 break 248 } 249 250 args, err := ec.field_Mutation_createFollowingTeacher_args(context.TODO(), rawArgs) 251 if err != nil { 252 return 0, false 253 } 254 255 return e.complexity.Mutation.CreateFollowingTeacher(childComplexity, args["input"].(model.CreateFollowingTeacherInput)), true 256 257 case "Mutation.deleteFollowingTeachers": 258 if e.complexity.Mutation.DeleteFollowingTeachers == nil { 259 break 260 } 261 262 args, err := ec.field_Mutation_deleteFollowingTeachers_args(context.TODO(), rawArgs) 263 if err != nil { 264 return 0, false 265 } 266 267 return e.complexity.Mutation.DeleteFollowingTeachers(childComplexity, args["input"].(model.DeleteFollowingTeachersInput)), true 268 269 case "Mutation.updateNotificationTimeSpans": 270 if e.complexity.Mutation.UpdateNotificationTimeSpans == nil { 271 break 272 } 273 274 args, err := ec.field_Mutation_updateNotificationTimeSpans_args(context.TODO(), rawArgs) 275 if err != nil { 276 return 0, false 277 } 278 279 return e.complexity.Mutation.UpdateNotificationTimeSpans(childComplexity, args["input"].(model.UpdateNotificationTimeSpansInput)), true 280 281 case "Mutation.updateViewer": 282 if e.complexity.Mutation.UpdateViewer == nil { 283 break 284 } 285 286 args, err := ec.field_Mutation_updateViewer_args(context.TODO(), rawArgs) 287 if err != nil { 288 return 0, false 289 } 290 291 return e.complexity.Mutation.UpdateViewer(childComplexity, args["input"].(model.UpdateViewerInput)), true 292 293 case "NotificationTimeSpan.fromHour": 294 if e.complexity.NotificationTimeSpan.FromHour == nil { 295 break 296 } 297 298 return e.complexity.NotificationTimeSpan.FromHour(childComplexity), true 299 300 case "NotificationTimeSpan.fromMinute": 301 if e.complexity.NotificationTimeSpan.FromMinute == nil { 302 break 303 } 304 305 return e.complexity.NotificationTimeSpan.FromMinute(childComplexity), true 306 307 case "NotificationTimeSpan.toHour": 308 if e.complexity.NotificationTimeSpan.ToHour == nil { 309 break 310 } 311 312 return e.complexity.NotificationTimeSpan.ToHour(childComplexity), true 313 314 case "NotificationTimeSpan.toMinute": 315 if e.complexity.NotificationTimeSpan.ToMinute == nil { 316 break 317 } 318 319 return e.complexity.NotificationTimeSpan.ToMinute(childComplexity), true 320 321 case "NotificationTimeSpanPayload.timeSpans": 322 if e.complexity.NotificationTimeSpanPayload.TimeSpans == nil { 323 break 324 } 325 326 return e.complexity.NotificationTimeSpanPayload.TimeSpans(childComplexity), true 327 328 case "PageInfo.hasNextPage": 329 if e.complexity.PageInfo.HasNextPage == nil { 330 break 331 } 332 333 return e.complexity.PageInfo.HasNextPage(childComplexity), true 334 335 case "PageInfo.hasPreviousPage": 336 if e.complexity.PageInfo.HasPreviousPage == nil { 337 break 338 } 339 340 return e.complexity.PageInfo.HasPreviousPage(childComplexity), true 341 342 case "Query.empty": 343 if e.complexity.Query.Empty == nil { 344 break 345 } 346 347 return e.complexity.Query.Empty(childComplexity), true 348 349 case "Query.followingTeachers": 350 if e.complexity.Query.FollowingTeachers == nil { 351 break 352 } 353 354 return e.complexity.Query.FollowingTeachers(childComplexity), true 355 356 case "Query.viewer": 357 if e.complexity.Query.Viewer == nil { 358 break 359 } 360 361 return e.complexity.Query.Viewer(childComplexity), true 362 363 case "Teacher.id": 364 if e.complexity.Teacher.ID == nil { 365 break 366 } 367 368 return e.complexity.Teacher.ID(childComplexity), true 369 370 case "Teacher.name": 371 if e.complexity.Teacher.Name == nil { 372 break 373 } 374 375 return e.complexity.Teacher.Name(childComplexity), true 376 377 case "User.email": 378 if e.complexity.User.Email == nil { 379 break 380 } 381 382 return e.complexity.User.Email(childComplexity), true 383 384 case "User.followingTeachers": 385 if e.complexity.User.FollowingTeachers == nil { 386 break 387 } 388 389 args, err := ec.field_User_followingTeachers_args(context.TODO(), rawArgs) 390 if err != nil { 391 return 0, false 392 } 393 394 return e.complexity.User.FollowingTeachers(childComplexity, args["first"].(*int), args["after"].(*string), args["last"].(*int), args["before"].(*string)), true 395 396 case "User.id": 397 if e.complexity.User.ID == nil { 398 break 399 } 400 401 return e.complexity.User.ID(childComplexity), true 402 403 case "User.notificationTimeSpans": 404 if e.complexity.User.NotificationTimeSpans == nil { 405 break 406 } 407 408 return e.complexity.User.NotificationTimeSpans(childComplexity), true 409 410 case "User.showTutorial": 411 if e.complexity.User.ShowTutorial == nil { 412 break 413 } 414 415 return e.complexity.User.ShowTutorial(childComplexity), true 416 417 } 418 return 0, false 419 } 420 421 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { 422 rc := graphql.GetOperationContext(ctx) 423 ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)} 424 inputUnmarshalMap := graphql.BuildUnmarshalerMap( 425 ec.unmarshalInputCreateFollowingTeacherInput, 426 ec.unmarshalInputDeleteFollowingTeachersInput, 427 ec.unmarshalInputNotificationTimeSpanInput, 428 ec.unmarshalInputUpdateNotificationTimeSpansInput, 429 ec.unmarshalInputUpdateViewerInput, 430 ) 431 first := true 432 433 switch rc.Operation.Operation { 434 case ast.Query: 435 return func(ctx context.Context) *graphql.Response { 436 var response graphql.Response 437 var data graphql.Marshaler 438 if first { 439 first = false 440 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) 441 data = ec._Query(ctx, rc.Operation.SelectionSet) 442 } else { 443 if atomic.LoadInt32(&ec.pendingDeferred) > 0 { 444 result := <-ec.deferredResults 445 atomic.AddInt32(&ec.pendingDeferred, -1) 446 data = result.Result 447 response.Path = result.Path 448 response.Label = result.Label 449 response.Errors = result.Errors 450 } else { 451 return nil 452 } 453 } 454 var buf bytes.Buffer 455 data.MarshalGQL(&buf) 456 response.Data = buf.Bytes() 457 if atomic.LoadInt32(&ec.deferred) > 0 { 458 hasNext := atomic.LoadInt32(&ec.pendingDeferred) > 0 459 response.HasNext = &hasNext 460 } 461 462 return &response 463 } 464 case ast.Mutation: 465 return func(ctx context.Context) *graphql.Response { 466 if !first { 467 return nil 468 } 469 first = false 470 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) 471 data := ec._Mutation(ctx, rc.Operation.SelectionSet) 472 var buf bytes.Buffer 473 data.MarshalGQL(&buf) 474 475 return &graphql.Response{ 476 Data: buf.Bytes(), 477 } 478 } 479 480 default: 481 return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) 482 } 483 } 484 485 type executionContext struct { 486 *graphql.OperationContext 487 *executableSchema 488 deferred int32 489 pendingDeferred int32 490 deferredResults chan graphql.DeferredResult 491 } 492 493 func (ec *executionContext) processDeferredGroup(dg graphql.DeferredGroup) { 494 atomic.AddInt32(&ec.pendingDeferred, 1) 495 go func() { 496 ctx := graphql.WithFreshResponseContext(dg.Context) 497 dg.FieldSet.Dispatch(ctx) 498 ds := graphql.DeferredResult{ 499 Path: dg.Path, 500 Label: dg.Label, 501 Result: dg.FieldSet, 502 Errors: graphql.GetErrors(ctx), 503 } 504 // null fields should bubble up 505 if dg.FieldSet.Invalids > 0 { 506 ds.Result = graphql.Null 507 } 508 ec.deferredResults <- ds 509 }() 510 } 511 512 func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { 513 if ec.DisableIntrospection { 514 return nil, errors.New("introspection disabled") 515 } 516 return introspection.WrapSchema(parsedSchema), nil 517 } 518 519 func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { 520 if ec.DisableIntrospection { 521 return nil, errors.New("introspection disabled") 522 } 523 return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil 524 } 525 526 var sources = []*ast.Source{ 527 {Name: "../schema/following_teacher.graphqls", Input: `type FollowingTeacher implements Node { 528 id: ID! 529 teacher: Teacher! 530 createdAt: String! 531 } 532 533 type FollowingTeacherEdge implements Edge { 534 cursor: String! 535 node: FollowingTeacher! 536 } 537 538 type FollowingTeacherConnection implements Connection { 539 pageInfo: PageInfo! 540 edges: [FollowingTeacherEdge!]! 541 nodes: [FollowingTeacher!]! 542 } 543 544 extend type Query { 545 followingTeachers: [FollowingTeacher!]! 546 } 547 548 input CreateFollowingTeacherInput { 549 teacherIdOrUrl: String! 550 } 551 552 type CreateFollowingTeacherPayload { 553 id: ID! 554 teacherId: ID! 555 } 556 557 input DeleteFollowingTeachersInput { 558 teacherIds: [ID!]! 559 } 560 561 type DeleteFollowingTeachersPayload { 562 teacherIds: [ID!]! 563 } 564 565 extend type Mutation { 566 createFollowingTeacher(input: CreateFollowingTeacherInput!): CreateFollowingTeacherPayload 567 deleteFollowingTeachers(input: DeleteFollowingTeachersInput!): DeleteFollowingTeachersPayload 568 } 569 `, BuiltIn: false}, 570 {Name: "../schema/notification_time_span.graphqls", Input: `type NotificationTimeSpan { 571 fromHour: Int! 572 fromMinute: Int! 573 toHour: Int! 574 toMinute: Int! 575 } 576 577 input NotificationTimeSpanInput { 578 fromHour: Int! 579 fromMinute: Int! 580 toHour: Int! 581 toMinute: Int! 582 } 583 584 input UpdateNotificationTimeSpansInput { 585 timeSpans: [NotificationTimeSpanInput!]! 586 } 587 588 type NotificationTimeSpanPayload { 589 timeSpans: [NotificationTimeSpan!] 590 } 591 592 extend type Mutation { 593 updateNotificationTimeSpans(input: UpdateNotificationTimeSpansInput!): NotificationTimeSpanPayload 594 } 595 `, BuiltIn: false}, 596 {Name: "../schema/schema.graphqls", Input: `type Empty { 597 id: ID! 598 } 599 600 interface Node { 601 id: ID! 602 } 603 604 interface Edge { 605 cursor: String! 606 node: Node! 607 } 608 609 interface Connection { 610 pageInfo: PageInfo! 611 edges: [Edge!]! 612 nodes: [Node!]! 613 } 614 615 type PageInfo { 616 hasNextPage: Boolean! 617 hasPreviousPage: Boolean! 618 } 619 620 type Query { 621 empty: Empty 622 } 623 624 type Mutation { 625 createEmpty: Empty 626 } 627 `, BuiltIn: false}, 628 {Name: "../schema/teacher.graphqls", Input: `# GraphQL schema example 629 # 630 # https://gqlgen.com/getting-started/ 631 632 type Teacher { 633 id: ID! 634 name: String! 635 } 636 `, BuiltIn: false}, 637 {Name: "../schema/user.graphqls", Input: `type User { 638 id: ID! 639 email: String! 640 followingTeachers( 641 first: Int = 20, 642 after: String, 643 last: Int = 20, 644 before: String 645 ): FollowingTeacherConnection! 646 notificationTimeSpans: [NotificationTimeSpan!]! 647 showTutorial: Boolean! 648 } 649 `, BuiltIn: false}, 650 {Name: "../schema/viewer.graphqls", Input: `extend type Query { 651 viewer: User! 652 } 653 654 input UpdateViewerInput { 655 email: String 656 } 657 658 extend type Mutation { 659 updateViewer(input: UpdateViewerInput!): User! 660 } 661 `, BuiltIn: false}, 662 } 663 var parsedSchema = gqlparser.MustLoadSchema(sources...) 664 665 // endregion ************************** generated!.gotpl ************************** 666 667 // region ***************************** args.gotpl ***************************** 668 669 func (ec *executionContext) field_Mutation_createFollowingTeacher_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 670 var err error 671 args := map[string]interface{}{} 672 var arg0 model.CreateFollowingTeacherInput 673 if tmp, ok := rawArgs["input"]; ok { 674 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 675 arg0, err = ec.unmarshalNCreateFollowingTeacherInput2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐCreateFollowingTeacherInput(ctx, tmp) 676 if err != nil { 677 return nil, err 678 } 679 } 680 args["input"] = arg0 681 return args, nil 682 } 683 684 func (ec *executionContext) field_Mutation_deleteFollowingTeachers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 685 var err error 686 args := map[string]interface{}{} 687 var arg0 model.DeleteFollowingTeachersInput 688 if tmp, ok := rawArgs["input"]; ok { 689 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 690 arg0, err = ec.unmarshalNDeleteFollowingTeachersInput2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐDeleteFollowingTeachersInput(ctx, tmp) 691 if err != nil { 692 return nil, err 693 } 694 } 695 args["input"] = arg0 696 return args, nil 697 } 698 699 func (ec *executionContext) field_Mutation_updateNotificationTimeSpans_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 700 var err error 701 args := map[string]interface{}{} 702 var arg0 model.UpdateNotificationTimeSpansInput 703 if tmp, ok := rawArgs["input"]; ok { 704 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 705 arg0, err = ec.unmarshalNUpdateNotificationTimeSpansInput2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐUpdateNotificationTimeSpansInput(ctx, tmp) 706 if err != nil { 707 return nil, err 708 } 709 } 710 args["input"] = arg0 711 return args, nil 712 } 713 714 func (ec *executionContext) field_Mutation_updateViewer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 715 var err error 716 args := map[string]interface{}{} 717 var arg0 model.UpdateViewerInput 718 if tmp, ok := rawArgs["input"]; ok { 719 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 720 arg0, err = ec.unmarshalNUpdateViewerInput2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐUpdateViewerInput(ctx, tmp) 721 if err != nil { 722 return nil, err 723 } 724 } 725 args["input"] = arg0 726 return args, nil 727 } 728 729 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 730 var err error 731 args := map[string]interface{}{} 732 var arg0 string 733 if tmp, ok := rawArgs["name"]; ok { 734 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 735 arg0, err = ec.unmarshalNString2string(ctx, tmp) 736 if err != nil { 737 return nil, err 738 } 739 } 740 args["name"] = arg0 741 return args, nil 742 } 743 744 func (ec *executionContext) field_User_followingTeachers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 745 var err error 746 args := map[string]interface{}{} 747 var arg0 *int 748 if tmp, ok := rawArgs["first"]; ok { 749 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) 750 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 751 if err != nil { 752 return nil, err 753 } 754 } 755 args["first"] = arg0 756 var arg1 *string 757 if tmp, ok := rawArgs["after"]; ok { 758 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) 759 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) 760 if err != nil { 761 return nil, err 762 } 763 } 764 args["after"] = arg1 765 var arg2 *int 766 if tmp, ok := rawArgs["last"]; ok { 767 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) 768 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 769 if err != nil { 770 return nil, err 771 } 772 } 773 args["last"] = arg2 774 var arg3 *string 775 if tmp, ok := rawArgs["before"]; ok { 776 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) 777 arg3, err = ec.unmarshalOString2ᚖstring(ctx, tmp) 778 if err != nil { 779 return nil, err 780 } 781 } 782 args["before"] = arg3 783 return args, nil 784 } 785 786 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 787 var err error 788 args := map[string]interface{}{} 789 var arg0 bool 790 if tmp, ok := rawArgs["includeDeprecated"]; ok { 791 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 792 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 793 if err != nil { 794 return nil, err 795 } 796 } 797 args["includeDeprecated"] = arg0 798 return args, nil 799 } 800 801 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 802 var err error 803 args := map[string]interface{}{} 804 var arg0 bool 805 if tmp, ok := rawArgs["includeDeprecated"]; ok { 806 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 807 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 808 if err != nil { 809 return nil, err 810 } 811 } 812 args["includeDeprecated"] = arg0 813 return args, nil 814 } 815 816 // endregion ***************************** args.gotpl ***************************** 817 818 // region ************************** directives.gotpl ************************** 819 820 // endregion ************************** directives.gotpl ************************** 821 822 // region **************************** field.gotpl ***************************** 823 824 func (ec *executionContext) _CreateFollowingTeacherPayload_id(ctx context.Context, field graphql.CollectedField, obj *model.CreateFollowingTeacherPayload) (ret graphql.Marshaler) { 825 fc, err := ec.fieldContext_CreateFollowingTeacherPayload_id(ctx, field) 826 if err != nil { 827 return graphql.Null 828 } 829 ctx = graphql.WithFieldContext(ctx, fc) 830 defer func() { 831 if r := recover(); r != nil { 832 ec.Error(ctx, ec.Recover(ctx, r)) 833 ret = graphql.Null 834 } 835 }() 836 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 837 ctx = rctx // use context from middleware stack in children 838 return obj.ID, nil 839 }) 840 if err != nil { 841 ec.Error(ctx, err) 842 return graphql.Null 843 } 844 if resTmp == nil { 845 if !graphql.HasFieldError(ctx, fc) { 846 ec.Errorf(ctx, "must not be null") 847 } 848 return graphql.Null 849 } 850 res := resTmp.(string) 851 fc.Result = res 852 return ec.marshalNID2string(ctx, field.Selections, res) 853 } 854 855 func (ec *executionContext) fieldContext_CreateFollowingTeacherPayload_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 856 fc = &graphql.FieldContext{ 857 Object: "CreateFollowingTeacherPayload", 858 Field: field, 859 IsMethod: false, 860 IsResolver: false, 861 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 862 return nil, errors.New("field of type ID does not have child fields") 863 }, 864 } 865 return fc, nil 866 } 867 868 func (ec *executionContext) _CreateFollowingTeacherPayload_teacherId(ctx context.Context, field graphql.CollectedField, obj *model.CreateFollowingTeacherPayload) (ret graphql.Marshaler) { 869 fc, err := ec.fieldContext_CreateFollowingTeacherPayload_teacherId(ctx, field) 870 if err != nil { 871 return graphql.Null 872 } 873 ctx = graphql.WithFieldContext(ctx, fc) 874 defer func() { 875 if r := recover(); r != nil { 876 ec.Error(ctx, ec.Recover(ctx, r)) 877 ret = graphql.Null 878 } 879 }() 880 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 881 ctx = rctx // use context from middleware stack in children 882 return obj.TeacherID, nil 883 }) 884 if err != nil { 885 ec.Error(ctx, err) 886 return graphql.Null 887 } 888 if resTmp == nil { 889 if !graphql.HasFieldError(ctx, fc) { 890 ec.Errorf(ctx, "must not be null") 891 } 892 return graphql.Null 893 } 894 res := resTmp.(string) 895 fc.Result = res 896 return ec.marshalNID2string(ctx, field.Selections, res) 897 } 898 899 func (ec *executionContext) fieldContext_CreateFollowingTeacherPayload_teacherId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 900 fc = &graphql.FieldContext{ 901 Object: "CreateFollowingTeacherPayload", 902 Field: field, 903 IsMethod: false, 904 IsResolver: false, 905 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 906 return nil, errors.New("field of type ID does not have child fields") 907 }, 908 } 909 return fc, nil 910 } 911 912 func (ec *executionContext) _DeleteFollowingTeachersPayload_teacherIds(ctx context.Context, field graphql.CollectedField, obj *model.DeleteFollowingTeachersPayload) (ret graphql.Marshaler) { 913 fc, err := ec.fieldContext_DeleteFollowingTeachersPayload_teacherIds(ctx, field) 914 if err != nil { 915 return graphql.Null 916 } 917 ctx = graphql.WithFieldContext(ctx, fc) 918 defer func() { 919 if r := recover(); r != nil { 920 ec.Error(ctx, ec.Recover(ctx, r)) 921 ret = graphql.Null 922 } 923 }() 924 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 925 ctx = rctx // use context from middleware stack in children 926 return obj.TeacherIds, nil 927 }) 928 if err != nil { 929 ec.Error(ctx, err) 930 return graphql.Null 931 } 932 if resTmp == nil { 933 if !graphql.HasFieldError(ctx, fc) { 934 ec.Errorf(ctx, "must not be null") 935 } 936 return graphql.Null 937 } 938 res := resTmp.([]string) 939 fc.Result = res 940 return ec.marshalNID2ᚕstringᚄ(ctx, field.Selections, res) 941 } 942 943 func (ec *executionContext) fieldContext_DeleteFollowingTeachersPayload_teacherIds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 944 fc = &graphql.FieldContext{ 945 Object: "DeleteFollowingTeachersPayload", 946 Field: field, 947 IsMethod: false, 948 IsResolver: false, 949 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 950 return nil, errors.New("field of type ID does not have child fields") 951 }, 952 } 953 return fc, nil 954 } 955 956 func (ec *executionContext) _Empty_id(ctx context.Context, field graphql.CollectedField, obj *model.Empty) (ret graphql.Marshaler) { 957 fc, err := ec.fieldContext_Empty_id(ctx, field) 958 if err != nil { 959 return graphql.Null 960 } 961 ctx = graphql.WithFieldContext(ctx, fc) 962 defer func() { 963 if r := recover(); r != nil { 964 ec.Error(ctx, ec.Recover(ctx, r)) 965 ret = graphql.Null 966 } 967 }() 968 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 969 ctx = rctx // use context from middleware stack in children 970 return obj.ID, nil 971 }) 972 if err != nil { 973 ec.Error(ctx, err) 974 return graphql.Null 975 } 976 if resTmp == nil { 977 if !graphql.HasFieldError(ctx, fc) { 978 ec.Errorf(ctx, "must not be null") 979 } 980 return graphql.Null 981 } 982 res := resTmp.(string) 983 fc.Result = res 984 return ec.marshalNID2string(ctx, field.Selections, res) 985 } 986 987 func (ec *executionContext) fieldContext_Empty_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 988 fc = &graphql.FieldContext{ 989 Object: "Empty", 990 Field: field, 991 IsMethod: false, 992 IsResolver: false, 993 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 994 return nil, errors.New("field of type ID does not have child fields") 995 }, 996 } 997 return fc, nil 998 } 999 1000 func (ec *executionContext) _FollowingTeacher_id(ctx context.Context, field graphql.CollectedField, obj *model.FollowingTeacher) (ret graphql.Marshaler) { 1001 fc, err := ec.fieldContext_FollowingTeacher_id(ctx, field) 1002 if err != nil { 1003 return graphql.Null 1004 } 1005 ctx = graphql.WithFieldContext(ctx, fc) 1006 defer func() { 1007 if r := recover(); r != nil { 1008 ec.Error(ctx, ec.Recover(ctx, r)) 1009 ret = graphql.Null 1010 } 1011 }() 1012 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1013 ctx = rctx // use context from middleware stack in children 1014 return obj.ID, nil 1015 }) 1016 if err != nil { 1017 ec.Error(ctx, err) 1018 return graphql.Null 1019 } 1020 if resTmp == nil { 1021 if !graphql.HasFieldError(ctx, fc) { 1022 ec.Errorf(ctx, "must not be null") 1023 } 1024 return graphql.Null 1025 } 1026 res := resTmp.(string) 1027 fc.Result = res 1028 return ec.marshalNID2string(ctx, field.Selections, res) 1029 } 1030 1031 func (ec *executionContext) fieldContext_FollowingTeacher_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1032 fc = &graphql.FieldContext{ 1033 Object: "FollowingTeacher", 1034 Field: field, 1035 IsMethod: false, 1036 IsResolver: false, 1037 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1038 return nil, errors.New("field of type ID does not have child fields") 1039 }, 1040 } 1041 return fc, nil 1042 } 1043 1044 func (ec *executionContext) _FollowingTeacher_teacher(ctx context.Context, field graphql.CollectedField, obj *model.FollowingTeacher) (ret graphql.Marshaler) { 1045 fc, err := ec.fieldContext_FollowingTeacher_teacher(ctx, field) 1046 if err != nil { 1047 return graphql.Null 1048 } 1049 ctx = graphql.WithFieldContext(ctx, fc) 1050 defer func() { 1051 if r := recover(); r != nil { 1052 ec.Error(ctx, ec.Recover(ctx, r)) 1053 ret = graphql.Null 1054 } 1055 }() 1056 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1057 ctx = rctx // use context from middleware stack in children 1058 return obj.Teacher, nil 1059 }) 1060 if err != nil { 1061 ec.Error(ctx, err) 1062 return graphql.Null 1063 } 1064 if resTmp == nil { 1065 if !graphql.HasFieldError(ctx, fc) { 1066 ec.Errorf(ctx, "must not be null") 1067 } 1068 return graphql.Null 1069 } 1070 res := resTmp.(*model.Teacher) 1071 fc.Result = res 1072 return ec.marshalNTeacher2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐTeacher(ctx, field.Selections, res) 1073 } 1074 1075 func (ec *executionContext) fieldContext_FollowingTeacher_teacher(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1076 fc = &graphql.FieldContext{ 1077 Object: "FollowingTeacher", 1078 Field: field, 1079 IsMethod: false, 1080 IsResolver: false, 1081 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1082 switch field.Name { 1083 case "id": 1084 return ec.fieldContext_Teacher_id(ctx, field) 1085 case "name": 1086 return ec.fieldContext_Teacher_name(ctx, field) 1087 } 1088 return nil, fmt.Errorf("no field named %q was found under type Teacher", field.Name) 1089 }, 1090 } 1091 return fc, nil 1092 } 1093 1094 func (ec *executionContext) _FollowingTeacher_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.FollowingTeacher) (ret graphql.Marshaler) { 1095 fc, err := ec.fieldContext_FollowingTeacher_createdAt(ctx, field) 1096 if err != nil { 1097 return graphql.Null 1098 } 1099 ctx = graphql.WithFieldContext(ctx, fc) 1100 defer func() { 1101 if r := recover(); r != nil { 1102 ec.Error(ctx, ec.Recover(ctx, r)) 1103 ret = graphql.Null 1104 } 1105 }() 1106 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1107 ctx = rctx // use context from middleware stack in children 1108 return obj.CreatedAt, nil 1109 }) 1110 if err != nil { 1111 ec.Error(ctx, err) 1112 return graphql.Null 1113 } 1114 if resTmp == nil { 1115 if !graphql.HasFieldError(ctx, fc) { 1116 ec.Errorf(ctx, "must not be null") 1117 } 1118 return graphql.Null 1119 } 1120 res := resTmp.(string) 1121 fc.Result = res 1122 return ec.marshalNString2string(ctx, field.Selections, res) 1123 } 1124 1125 func (ec *executionContext) fieldContext_FollowingTeacher_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1126 fc = &graphql.FieldContext{ 1127 Object: "FollowingTeacher", 1128 Field: field, 1129 IsMethod: false, 1130 IsResolver: false, 1131 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1132 return nil, errors.New("field of type String does not have child fields") 1133 }, 1134 } 1135 return fc, nil 1136 } 1137 1138 func (ec *executionContext) _FollowingTeacherConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.FollowingTeacherConnection) (ret graphql.Marshaler) { 1139 fc, err := ec.fieldContext_FollowingTeacherConnection_pageInfo(ctx, field) 1140 if err != nil { 1141 return graphql.Null 1142 } 1143 ctx = graphql.WithFieldContext(ctx, fc) 1144 defer func() { 1145 if r := recover(); r != nil { 1146 ec.Error(ctx, ec.Recover(ctx, r)) 1147 ret = graphql.Null 1148 } 1149 }() 1150 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1151 ctx = rctx // use context from middleware stack in children 1152 return obj.PageInfo, nil 1153 }) 1154 if err != nil { 1155 ec.Error(ctx, err) 1156 return graphql.Null 1157 } 1158 if resTmp == nil { 1159 if !graphql.HasFieldError(ctx, fc) { 1160 ec.Errorf(ctx, "must not be null") 1161 } 1162 return graphql.Null 1163 } 1164 res := resTmp.(*model.PageInfo) 1165 fc.Result = res 1166 return ec.marshalNPageInfo2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐPageInfo(ctx, field.Selections, res) 1167 } 1168 1169 func (ec *executionContext) fieldContext_FollowingTeacherConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1170 fc = &graphql.FieldContext{ 1171 Object: "FollowingTeacherConnection", 1172 Field: field, 1173 IsMethod: false, 1174 IsResolver: false, 1175 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1176 switch field.Name { 1177 case "hasNextPage": 1178 return ec.fieldContext_PageInfo_hasNextPage(ctx, field) 1179 case "hasPreviousPage": 1180 return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) 1181 } 1182 return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) 1183 }, 1184 } 1185 return fc, nil 1186 } 1187 1188 func (ec *executionContext) _FollowingTeacherConnection_edges(ctx context.Context, field graphql.CollectedField, obj *model.FollowingTeacherConnection) (ret graphql.Marshaler) { 1189 fc, err := ec.fieldContext_FollowingTeacherConnection_edges(ctx, field) 1190 if err != nil { 1191 return graphql.Null 1192 } 1193 ctx = graphql.WithFieldContext(ctx, fc) 1194 defer func() { 1195 if r := recover(); r != nil { 1196 ec.Error(ctx, ec.Recover(ctx, r)) 1197 ret = graphql.Null 1198 } 1199 }() 1200 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1201 ctx = rctx // use context from middleware stack in children 1202 return obj.Edges, nil 1203 }) 1204 if err != nil { 1205 ec.Error(ctx, err) 1206 return graphql.Null 1207 } 1208 if resTmp == nil { 1209 if !graphql.HasFieldError(ctx, fc) { 1210 ec.Errorf(ctx, "must not be null") 1211 } 1212 return graphql.Null 1213 } 1214 res := resTmp.([]*model.FollowingTeacherEdge) 1215 fc.Result = res 1216 return ec.marshalNFollowingTeacherEdge2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherEdgeᚄ(ctx, field.Selections, res) 1217 } 1218 1219 func (ec *executionContext) fieldContext_FollowingTeacherConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1220 fc = &graphql.FieldContext{ 1221 Object: "FollowingTeacherConnection", 1222 Field: field, 1223 IsMethod: false, 1224 IsResolver: false, 1225 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1226 switch field.Name { 1227 case "cursor": 1228 return ec.fieldContext_FollowingTeacherEdge_cursor(ctx, field) 1229 case "node": 1230 return ec.fieldContext_FollowingTeacherEdge_node(ctx, field) 1231 } 1232 return nil, fmt.Errorf("no field named %q was found under type FollowingTeacherEdge", field.Name) 1233 }, 1234 } 1235 return fc, nil 1236 } 1237 1238 func (ec *executionContext) _FollowingTeacherConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *model.FollowingTeacherConnection) (ret graphql.Marshaler) { 1239 fc, err := ec.fieldContext_FollowingTeacherConnection_nodes(ctx, field) 1240 if err != nil { 1241 return graphql.Null 1242 } 1243 ctx = graphql.WithFieldContext(ctx, fc) 1244 defer func() { 1245 if r := recover(); r != nil { 1246 ec.Error(ctx, ec.Recover(ctx, r)) 1247 ret = graphql.Null 1248 } 1249 }() 1250 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1251 ctx = rctx // use context from middleware stack in children 1252 return obj.Nodes, nil 1253 }) 1254 if err != nil { 1255 ec.Error(ctx, err) 1256 return graphql.Null 1257 } 1258 if resTmp == nil { 1259 if !graphql.HasFieldError(ctx, fc) { 1260 ec.Errorf(ctx, "must not be null") 1261 } 1262 return graphql.Null 1263 } 1264 res := resTmp.([]*model.FollowingTeacher) 1265 fc.Result = res 1266 return ec.marshalNFollowingTeacher2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherᚄ(ctx, field.Selections, res) 1267 } 1268 1269 func (ec *executionContext) fieldContext_FollowingTeacherConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1270 fc = &graphql.FieldContext{ 1271 Object: "FollowingTeacherConnection", 1272 Field: field, 1273 IsMethod: false, 1274 IsResolver: false, 1275 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1276 switch field.Name { 1277 case "id": 1278 return ec.fieldContext_FollowingTeacher_id(ctx, field) 1279 case "teacher": 1280 return ec.fieldContext_FollowingTeacher_teacher(ctx, field) 1281 case "createdAt": 1282 return ec.fieldContext_FollowingTeacher_createdAt(ctx, field) 1283 } 1284 return nil, fmt.Errorf("no field named %q was found under type FollowingTeacher", field.Name) 1285 }, 1286 } 1287 return fc, nil 1288 } 1289 1290 func (ec *executionContext) _FollowingTeacherEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.FollowingTeacherEdge) (ret graphql.Marshaler) { 1291 fc, err := ec.fieldContext_FollowingTeacherEdge_cursor(ctx, field) 1292 if err != nil { 1293 return graphql.Null 1294 } 1295 ctx = graphql.WithFieldContext(ctx, fc) 1296 defer func() { 1297 if r := recover(); r != nil { 1298 ec.Error(ctx, ec.Recover(ctx, r)) 1299 ret = graphql.Null 1300 } 1301 }() 1302 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1303 ctx = rctx // use context from middleware stack in children 1304 return obj.Cursor, nil 1305 }) 1306 if err != nil { 1307 ec.Error(ctx, err) 1308 return graphql.Null 1309 } 1310 if resTmp == nil { 1311 if !graphql.HasFieldError(ctx, fc) { 1312 ec.Errorf(ctx, "must not be null") 1313 } 1314 return graphql.Null 1315 } 1316 res := resTmp.(string) 1317 fc.Result = res 1318 return ec.marshalNString2string(ctx, field.Selections, res) 1319 } 1320 1321 func (ec *executionContext) fieldContext_FollowingTeacherEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1322 fc = &graphql.FieldContext{ 1323 Object: "FollowingTeacherEdge", 1324 Field: field, 1325 IsMethod: false, 1326 IsResolver: false, 1327 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1328 return nil, errors.New("field of type String does not have child fields") 1329 }, 1330 } 1331 return fc, nil 1332 } 1333 1334 func (ec *executionContext) _FollowingTeacherEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.FollowingTeacherEdge) (ret graphql.Marshaler) { 1335 fc, err := ec.fieldContext_FollowingTeacherEdge_node(ctx, field) 1336 if err != nil { 1337 return graphql.Null 1338 } 1339 ctx = graphql.WithFieldContext(ctx, fc) 1340 defer func() { 1341 if r := recover(); r != nil { 1342 ec.Error(ctx, ec.Recover(ctx, r)) 1343 ret = graphql.Null 1344 } 1345 }() 1346 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1347 ctx = rctx // use context from middleware stack in children 1348 return obj.Node, nil 1349 }) 1350 if err != nil { 1351 ec.Error(ctx, err) 1352 return graphql.Null 1353 } 1354 if resTmp == nil { 1355 if !graphql.HasFieldError(ctx, fc) { 1356 ec.Errorf(ctx, "must not be null") 1357 } 1358 return graphql.Null 1359 } 1360 res := resTmp.(*model.FollowingTeacher) 1361 fc.Result = res 1362 return ec.marshalNFollowingTeacher2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacher(ctx, field.Selections, res) 1363 } 1364 1365 func (ec *executionContext) fieldContext_FollowingTeacherEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1366 fc = &graphql.FieldContext{ 1367 Object: "FollowingTeacherEdge", 1368 Field: field, 1369 IsMethod: false, 1370 IsResolver: false, 1371 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1372 switch field.Name { 1373 case "id": 1374 return ec.fieldContext_FollowingTeacher_id(ctx, field) 1375 case "teacher": 1376 return ec.fieldContext_FollowingTeacher_teacher(ctx, field) 1377 case "createdAt": 1378 return ec.fieldContext_FollowingTeacher_createdAt(ctx, field) 1379 } 1380 return nil, fmt.Errorf("no field named %q was found under type FollowingTeacher", field.Name) 1381 }, 1382 } 1383 return fc, nil 1384 } 1385 1386 func (ec *executionContext) _Mutation_createEmpty(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1387 fc, err := ec.fieldContext_Mutation_createEmpty(ctx, field) 1388 if err != nil { 1389 return graphql.Null 1390 } 1391 ctx = graphql.WithFieldContext(ctx, fc) 1392 defer func() { 1393 if r := recover(); r != nil { 1394 ec.Error(ctx, ec.Recover(ctx, r)) 1395 ret = graphql.Null 1396 } 1397 }() 1398 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1399 ctx = rctx // use context from middleware stack in children 1400 return ec.resolvers.Mutation().CreateEmpty(rctx) 1401 }) 1402 if err != nil { 1403 ec.Error(ctx, err) 1404 return graphql.Null 1405 } 1406 if resTmp == nil { 1407 return graphql.Null 1408 } 1409 res := resTmp.(*model.Empty) 1410 fc.Result = res 1411 return ec.marshalOEmpty2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐEmpty(ctx, field.Selections, res) 1412 } 1413 1414 func (ec *executionContext) fieldContext_Mutation_createEmpty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1415 fc = &graphql.FieldContext{ 1416 Object: "Mutation", 1417 Field: field, 1418 IsMethod: true, 1419 IsResolver: true, 1420 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1421 switch field.Name { 1422 case "id": 1423 return ec.fieldContext_Empty_id(ctx, field) 1424 } 1425 return nil, fmt.Errorf("no field named %q was found under type Empty", field.Name) 1426 }, 1427 } 1428 return fc, nil 1429 } 1430 1431 func (ec *executionContext) _Mutation_createFollowingTeacher(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1432 fc, err := ec.fieldContext_Mutation_createFollowingTeacher(ctx, field) 1433 if err != nil { 1434 return graphql.Null 1435 } 1436 ctx = graphql.WithFieldContext(ctx, fc) 1437 defer func() { 1438 if r := recover(); r != nil { 1439 ec.Error(ctx, ec.Recover(ctx, r)) 1440 ret = graphql.Null 1441 } 1442 }() 1443 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1444 ctx = rctx // use context from middleware stack in children 1445 return ec.resolvers.Mutation().CreateFollowingTeacher(rctx, fc.Args["input"].(model.CreateFollowingTeacherInput)) 1446 }) 1447 if err != nil { 1448 ec.Error(ctx, err) 1449 return graphql.Null 1450 } 1451 if resTmp == nil { 1452 return graphql.Null 1453 } 1454 res := resTmp.(*model.CreateFollowingTeacherPayload) 1455 fc.Result = res 1456 return ec.marshalOCreateFollowingTeacherPayload2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐCreateFollowingTeacherPayload(ctx, field.Selections, res) 1457 } 1458 1459 func (ec *executionContext) fieldContext_Mutation_createFollowingTeacher(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1460 fc = &graphql.FieldContext{ 1461 Object: "Mutation", 1462 Field: field, 1463 IsMethod: true, 1464 IsResolver: true, 1465 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1466 switch field.Name { 1467 case "id": 1468 return ec.fieldContext_CreateFollowingTeacherPayload_id(ctx, field) 1469 case "teacherId": 1470 return ec.fieldContext_CreateFollowingTeacherPayload_teacherId(ctx, field) 1471 } 1472 return nil, fmt.Errorf("no field named %q was found under type CreateFollowingTeacherPayload", field.Name) 1473 }, 1474 } 1475 defer func() { 1476 if r := recover(); r != nil { 1477 err = ec.Recover(ctx, r) 1478 ec.Error(ctx, err) 1479 } 1480 }() 1481 ctx = graphql.WithFieldContext(ctx, fc) 1482 if fc.Args, err = ec.field_Mutation_createFollowingTeacher_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1483 ec.Error(ctx, err) 1484 return fc, err 1485 } 1486 return fc, nil 1487 } 1488 1489 func (ec *executionContext) _Mutation_deleteFollowingTeachers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1490 fc, err := ec.fieldContext_Mutation_deleteFollowingTeachers(ctx, field) 1491 if err != nil { 1492 return graphql.Null 1493 } 1494 ctx = graphql.WithFieldContext(ctx, fc) 1495 defer func() { 1496 if r := recover(); r != nil { 1497 ec.Error(ctx, ec.Recover(ctx, r)) 1498 ret = graphql.Null 1499 } 1500 }() 1501 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1502 ctx = rctx // use context from middleware stack in children 1503 return ec.resolvers.Mutation().DeleteFollowingTeachers(rctx, fc.Args["input"].(model.DeleteFollowingTeachersInput)) 1504 }) 1505 if err != nil { 1506 ec.Error(ctx, err) 1507 return graphql.Null 1508 } 1509 if resTmp == nil { 1510 return graphql.Null 1511 } 1512 res := resTmp.(*model.DeleteFollowingTeachersPayload) 1513 fc.Result = res 1514 return ec.marshalODeleteFollowingTeachersPayload2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐDeleteFollowingTeachersPayload(ctx, field.Selections, res) 1515 } 1516 1517 func (ec *executionContext) fieldContext_Mutation_deleteFollowingTeachers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1518 fc = &graphql.FieldContext{ 1519 Object: "Mutation", 1520 Field: field, 1521 IsMethod: true, 1522 IsResolver: true, 1523 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1524 switch field.Name { 1525 case "teacherIds": 1526 return ec.fieldContext_DeleteFollowingTeachersPayload_teacherIds(ctx, field) 1527 } 1528 return nil, fmt.Errorf("no field named %q was found under type DeleteFollowingTeachersPayload", field.Name) 1529 }, 1530 } 1531 defer func() { 1532 if r := recover(); r != nil { 1533 err = ec.Recover(ctx, r) 1534 ec.Error(ctx, err) 1535 } 1536 }() 1537 ctx = graphql.WithFieldContext(ctx, fc) 1538 if fc.Args, err = ec.field_Mutation_deleteFollowingTeachers_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1539 ec.Error(ctx, err) 1540 return fc, err 1541 } 1542 return fc, nil 1543 } 1544 1545 func (ec *executionContext) _Mutation_updateNotificationTimeSpans(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1546 fc, err := ec.fieldContext_Mutation_updateNotificationTimeSpans(ctx, field) 1547 if err != nil { 1548 return graphql.Null 1549 } 1550 ctx = graphql.WithFieldContext(ctx, fc) 1551 defer func() { 1552 if r := recover(); r != nil { 1553 ec.Error(ctx, ec.Recover(ctx, r)) 1554 ret = graphql.Null 1555 } 1556 }() 1557 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1558 ctx = rctx // use context from middleware stack in children 1559 return ec.resolvers.Mutation().UpdateNotificationTimeSpans(rctx, fc.Args["input"].(model.UpdateNotificationTimeSpansInput)) 1560 }) 1561 if err != nil { 1562 ec.Error(ctx, err) 1563 return graphql.Null 1564 } 1565 if resTmp == nil { 1566 return graphql.Null 1567 } 1568 res := resTmp.(*model.NotificationTimeSpanPayload) 1569 fc.Result = res 1570 return ec.marshalONotificationTimeSpanPayload2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanPayload(ctx, field.Selections, res) 1571 } 1572 1573 func (ec *executionContext) fieldContext_Mutation_updateNotificationTimeSpans(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1574 fc = &graphql.FieldContext{ 1575 Object: "Mutation", 1576 Field: field, 1577 IsMethod: true, 1578 IsResolver: true, 1579 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1580 switch field.Name { 1581 case "timeSpans": 1582 return ec.fieldContext_NotificationTimeSpanPayload_timeSpans(ctx, field) 1583 } 1584 return nil, fmt.Errorf("no field named %q was found under type NotificationTimeSpanPayload", field.Name) 1585 }, 1586 } 1587 defer func() { 1588 if r := recover(); r != nil { 1589 err = ec.Recover(ctx, r) 1590 ec.Error(ctx, err) 1591 } 1592 }() 1593 ctx = graphql.WithFieldContext(ctx, fc) 1594 if fc.Args, err = ec.field_Mutation_updateNotificationTimeSpans_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1595 ec.Error(ctx, err) 1596 return fc, err 1597 } 1598 return fc, nil 1599 } 1600 1601 func (ec *executionContext) _Mutation_updateViewer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1602 fc, err := ec.fieldContext_Mutation_updateViewer(ctx, field) 1603 if err != nil { 1604 return graphql.Null 1605 } 1606 ctx = graphql.WithFieldContext(ctx, fc) 1607 defer func() { 1608 if r := recover(); r != nil { 1609 ec.Error(ctx, ec.Recover(ctx, r)) 1610 ret = graphql.Null 1611 } 1612 }() 1613 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1614 ctx = rctx // use context from middleware stack in children 1615 return ec.resolvers.Mutation().UpdateViewer(rctx, fc.Args["input"].(model.UpdateViewerInput)) 1616 }) 1617 if err != nil { 1618 ec.Error(ctx, err) 1619 return graphql.Null 1620 } 1621 if resTmp == nil { 1622 if !graphql.HasFieldError(ctx, fc) { 1623 ec.Errorf(ctx, "must not be null") 1624 } 1625 return graphql.Null 1626 } 1627 res := resTmp.(*model.User) 1628 fc.Result = res 1629 return ec.marshalNUser2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res) 1630 } 1631 1632 func (ec *executionContext) fieldContext_Mutation_updateViewer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1633 fc = &graphql.FieldContext{ 1634 Object: "Mutation", 1635 Field: field, 1636 IsMethod: true, 1637 IsResolver: true, 1638 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1639 switch field.Name { 1640 case "id": 1641 return ec.fieldContext_User_id(ctx, field) 1642 case "email": 1643 return ec.fieldContext_User_email(ctx, field) 1644 case "followingTeachers": 1645 return ec.fieldContext_User_followingTeachers(ctx, field) 1646 case "notificationTimeSpans": 1647 return ec.fieldContext_User_notificationTimeSpans(ctx, field) 1648 case "showTutorial": 1649 return ec.fieldContext_User_showTutorial(ctx, field) 1650 } 1651 return nil, fmt.Errorf("no field named %q was found under type User", field.Name) 1652 }, 1653 } 1654 defer func() { 1655 if r := recover(); r != nil { 1656 err = ec.Recover(ctx, r) 1657 ec.Error(ctx, err) 1658 } 1659 }() 1660 ctx = graphql.WithFieldContext(ctx, fc) 1661 if fc.Args, err = ec.field_Mutation_updateViewer_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1662 ec.Error(ctx, err) 1663 return fc, err 1664 } 1665 return fc, nil 1666 } 1667 1668 func (ec *executionContext) _NotificationTimeSpan_fromHour(ctx context.Context, field graphql.CollectedField, obj *model.NotificationTimeSpan) (ret graphql.Marshaler) { 1669 fc, err := ec.fieldContext_NotificationTimeSpan_fromHour(ctx, field) 1670 if err != nil { 1671 return graphql.Null 1672 } 1673 ctx = graphql.WithFieldContext(ctx, fc) 1674 defer func() { 1675 if r := recover(); r != nil { 1676 ec.Error(ctx, ec.Recover(ctx, r)) 1677 ret = graphql.Null 1678 } 1679 }() 1680 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1681 ctx = rctx // use context from middleware stack in children 1682 return obj.FromHour, nil 1683 }) 1684 if err != nil { 1685 ec.Error(ctx, err) 1686 return graphql.Null 1687 } 1688 if resTmp == nil { 1689 if !graphql.HasFieldError(ctx, fc) { 1690 ec.Errorf(ctx, "must not be null") 1691 } 1692 return graphql.Null 1693 } 1694 res := resTmp.(int) 1695 fc.Result = res 1696 return ec.marshalNInt2int(ctx, field.Selections, res) 1697 } 1698 1699 func (ec *executionContext) fieldContext_NotificationTimeSpan_fromHour(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1700 fc = &graphql.FieldContext{ 1701 Object: "NotificationTimeSpan", 1702 Field: field, 1703 IsMethod: false, 1704 IsResolver: false, 1705 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1706 return nil, errors.New("field of type Int does not have child fields") 1707 }, 1708 } 1709 return fc, nil 1710 } 1711 1712 func (ec *executionContext) _NotificationTimeSpan_fromMinute(ctx context.Context, field graphql.CollectedField, obj *model.NotificationTimeSpan) (ret graphql.Marshaler) { 1713 fc, err := ec.fieldContext_NotificationTimeSpan_fromMinute(ctx, field) 1714 if err != nil { 1715 return graphql.Null 1716 } 1717 ctx = graphql.WithFieldContext(ctx, fc) 1718 defer func() { 1719 if r := recover(); r != nil { 1720 ec.Error(ctx, ec.Recover(ctx, r)) 1721 ret = graphql.Null 1722 } 1723 }() 1724 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1725 ctx = rctx // use context from middleware stack in children 1726 return obj.FromMinute, nil 1727 }) 1728 if err != nil { 1729 ec.Error(ctx, err) 1730 return graphql.Null 1731 } 1732 if resTmp == nil { 1733 if !graphql.HasFieldError(ctx, fc) { 1734 ec.Errorf(ctx, "must not be null") 1735 } 1736 return graphql.Null 1737 } 1738 res := resTmp.(int) 1739 fc.Result = res 1740 return ec.marshalNInt2int(ctx, field.Selections, res) 1741 } 1742 1743 func (ec *executionContext) fieldContext_NotificationTimeSpan_fromMinute(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1744 fc = &graphql.FieldContext{ 1745 Object: "NotificationTimeSpan", 1746 Field: field, 1747 IsMethod: false, 1748 IsResolver: false, 1749 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1750 return nil, errors.New("field of type Int does not have child fields") 1751 }, 1752 } 1753 return fc, nil 1754 } 1755 1756 func (ec *executionContext) _NotificationTimeSpan_toHour(ctx context.Context, field graphql.CollectedField, obj *model.NotificationTimeSpan) (ret graphql.Marshaler) { 1757 fc, err := ec.fieldContext_NotificationTimeSpan_toHour(ctx, field) 1758 if err != nil { 1759 return graphql.Null 1760 } 1761 ctx = graphql.WithFieldContext(ctx, fc) 1762 defer func() { 1763 if r := recover(); r != nil { 1764 ec.Error(ctx, ec.Recover(ctx, r)) 1765 ret = graphql.Null 1766 } 1767 }() 1768 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1769 ctx = rctx // use context from middleware stack in children 1770 return obj.ToHour, nil 1771 }) 1772 if err != nil { 1773 ec.Error(ctx, err) 1774 return graphql.Null 1775 } 1776 if resTmp == nil { 1777 if !graphql.HasFieldError(ctx, fc) { 1778 ec.Errorf(ctx, "must not be null") 1779 } 1780 return graphql.Null 1781 } 1782 res := resTmp.(int) 1783 fc.Result = res 1784 return ec.marshalNInt2int(ctx, field.Selections, res) 1785 } 1786 1787 func (ec *executionContext) fieldContext_NotificationTimeSpan_toHour(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1788 fc = &graphql.FieldContext{ 1789 Object: "NotificationTimeSpan", 1790 Field: field, 1791 IsMethod: false, 1792 IsResolver: false, 1793 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1794 return nil, errors.New("field of type Int does not have child fields") 1795 }, 1796 } 1797 return fc, nil 1798 } 1799 1800 func (ec *executionContext) _NotificationTimeSpan_toMinute(ctx context.Context, field graphql.CollectedField, obj *model.NotificationTimeSpan) (ret graphql.Marshaler) { 1801 fc, err := ec.fieldContext_NotificationTimeSpan_toMinute(ctx, field) 1802 if err != nil { 1803 return graphql.Null 1804 } 1805 ctx = graphql.WithFieldContext(ctx, fc) 1806 defer func() { 1807 if r := recover(); r != nil { 1808 ec.Error(ctx, ec.Recover(ctx, r)) 1809 ret = graphql.Null 1810 } 1811 }() 1812 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1813 ctx = rctx // use context from middleware stack in children 1814 return obj.ToMinute, nil 1815 }) 1816 if err != nil { 1817 ec.Error(ctx, err) 1818 return graphql.Null 1819 } 1820 if resTmp == nil { 1821 if !graphql.HasFieldError(ctx, fc) { 1822 ec.Errorf(ctx, "must not be null") 1823 } 1824 return graphql.Null 1825 } 1826 res := resTmp.(int) 1827 fc.Result = res 1828 return ec.marshalNInt2int(ctx, field.Selections, res) 1829 } 1830 1831 func (ec *executionContext) fieldContext_NotificationTimeSpan_toMinute(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1832 fc = &graphql.FieldContext{ 1833 Object: "NotificationTimeSpan", 1834 Field: field, 1835 IsMethod: false, 1836 IsResolver: false, 1837 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1838 return nil, errors.New("field of type Int does not have child fields") 1839 }, 1840 } 1841 return fc, nil 1842 } 1843 1844 func (ec *executionContext) _NotificationTimeSpanPayload_timeSpans(ctx context.Context, field graphql.CollectedField, obj *model.NotificationTimeSpanPayload) (ret graphql.Marshaler) { 1845 fc, err := ec.fieldContext_NotificationTimeSpanPayload_timeSpans(ctx, field) 1846 if err != nil { 1847 return graphql.Null 1848 } 1849 ctx = graphql.WithFieldContext(ctx, fc) 1850 defer func() { 1851 if r := recover(); r != nil { 1852 ec.Error(ctx, ec.Recover(ctx, r)) 1853 ret = graphql.Null 1854 } 1855 }() 1856 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1857 ctx = rctx // use context from middleware stack in children 1858 return obj.TimeSpans, nil 1859 }) 1860 if err != nil { 1861 ec.Error(ctx, err) 1862 return graphql.Null 1863 } 1864 if resTmp == nil { 1865 return graphql.Null 1866 } 1867 res := resTmp.([]*model.NotificationTimeSpan) 1868 fc.Result = res 1869 return ec.marshalONotificationTimeSpan2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanᚄ(ctx, field.Selections, res) 1870 } 1871 1872 func (ec *executionContext) fieldContext_NotificationTimeSpanPayload_timeSpans(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1873 fc = &graphql.FieldContext{ 1874 Object: "NotificationTimeSpanPayload", 1875 Field: field, 1876 IsMethod: false, 1877 IsResolver: false, 1878 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1879 switch field.Name { 1880 case "fromHour": 1881 return ec.fieldContext_NotificationTimeSpan_fromHour(ctx, field) 1882 case "fromMinute": 1883 return ec.fieldContext_NotificationTimeSpan_fromMinute(ctx, field) 1884 case "toHour": 1885 return ec.fieldContext_NotificationTimeSpan_toHour(ctx, field) 1886 case "toMinute": 1887 return ec.fieldContext_NotificationTimeSpan_toMinute(ctx, field) 1888 } 1889 return nil, fmt.Errorf("no field named %q was found under type NotificationTimeSpan", field.Name) 1890 }, 1891 } 1892 return fc, nil 1893 } 1894 1895 func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { 1896 fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field) 1897 if err != nil { 1898 return graphql.Null 1899 } 1900 ctx = graphql.WithFieldContext(ctx, fc) 1901 defer func() { 1902 if r := recover(); r != nil { 1903 ec.Error(ctx, ec.Recover(ctx, r)) 1904 ret = graphql.Null 1905 } 1906 }() 1907 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1908 ctx = rctx // use context from middleware stack in children 1909 return obj.HasNextPage, nil 1910 }) 1911 if err != nil { 1912 ec.Error(ctx, err) 1913 return graphql.Null 1914 } 1915 if resTmp == nil { 1916 if !graphql.HasFieldError(ctx, fc) { 1917 ec.Errorf(ctx, "must not be null") 1918 } 1919 return graphql.Null 1920 } 1921 res := resTmp.(bool) 1922 fc.Result = res 1923 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1924 } 1925 1926 func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1927 fc = &graphql.FieldContext{ 1928 Object: "PageInfo", 1929 Field: field, 1930 IsMethod: false, 1931 IsResolver: false, 1932 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1933 return nil, errors.New("field of type Boolean does not have child fields") 1934 }, 1935 } 1936 return fc, nil 1937 } 1938 1939 func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { 1940 fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) 1941 if err != nil { 1942 return graphql.Null 1943 } 1944 ctx = graphql.WithFieldContext(ctx, fc) 1945 defer func() { 1946 if r := recover(); r != nil { 1947 ec.Error(ctx, ec.Recover(ctx, r)) 1948 ret = graphql.Null 1949 } 1950 }() 1951 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1952 ctx = rctx // use context from middleware stack in children 1953 return obj.HasPreviousPage, nil 1954 }) 1955 if err != nil { 1956 ec.Error(ctx, err) 1957 return graphql.Null 1958 } 1959 if resTmp == nil { 1960 if !graphql.HasFieldError(ctx, fc) { 1961 ec.Errorf(ctx, "must not be null") 1962 } 1963 return graphql.Null 1964 } 1965 res := resTmp.(bool) 1966 fc.Result = res 1967 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1968 } 1969 1970 func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1971 fc = &graphql.FieldContext{ 1972 Object: "PageInfo", 1973 Field: field, 1974 IsMethod: false, 1975 IsResolver: false, 1976 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1977 return nil, errors.New("field of type Boolean does not have child fields") 1978 }, 1979 } 1980 return fc, nil 1981 } 1982 1983 func (ec *executionContext) _Query_empty(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1984 fc, err := ec.fieldContext_Query_empty(ctx, field) 1985 if err != nil { 1986 return graphql.Null 1987 } 1988 ctx = graphql.WithFieldContext(ctx, fc) 1989 defer func() { 1990 if r := recover(); r != nil { 1991 ec.Error(ctx, ec.Recover(ctx, r)) 1992 ret = graphql.Null 1993 } 1994 }() 1995 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1996 ctx = rctx // use context from middleware stack in children 1997 return ec.resolvers.Query().Empty(rctx) 1998 }) 1999 if err != nil { 2000 ec.Error(ctx, err) 2001 return graphql.Null 2002 } 2003 if resTmp == nil { 2004 return graphql.Null 2005 } 2006 res := resTmp.(*model.Empty) 2007 fc.Result = res 2008 return ec.marshalOEmpty2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐEmpty(ctx, field.Selections, res) 2009 } 2010 2011 func (ec *executionContext) fieldContext_Query_empty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2012 fc = &graphql.FieldContext{ 2013 Object: "Query", 2014 Field: field, 2015 IsMethod: true, 2016 IsResolver: true, 2017 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2018 switch field.Name { 2019 case "id": 2020 return ec.fieldContext_Empty_id(ctx, field) 2021 } 2022 return nil, fmt.Errorf("no field named %q was found under type Empty", field.Name) 2023 }, 2024 } 2025 return fc, nil 2026 } 2027 2028 func (ec *executionContext) _Query_followingTeachers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 2029 fc, err := ec.fieldContext_Query_followingTeachers(ctx, field) 2030 if err != nil { 2031 return graphql.Null 2032 } 2033 ctx = graphql.WithFieldContext(ctx, fc) 2034 defer func() { 2035 if r := recover(); r != nil { 2036 ec.Error(ctx, ec.Recover(ctx, r)) 2037 ret = graphql.Null 2038 } 2039 }() 2040 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2041 ctx = rctx // use context from middleware stack in children 2042 return ec.resolvers.Query().FollowingTeachers(rctx) 2043 }) 2044 if err != nil { 2045 ec.Error(ctx, err) 2046 return graphql.Null 2047 } 2048 if resTmp == nil { 2049 if !graphql.HasFieldError(ctx, fc) { 2050 ec.Errorf(ctx, "must not be null") 2051 } 2052 return graphql.Null 2053 } 2054 res := resTmp.([]*model.FollowingTeacher) 2055 fc.Result = res 2056 return ec.marshalNFollowingTeacher2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherᚄ(ctx, field.Selections, res) 2057 } 2058 2059 func (ec *executionContext) fieldContext_Query_followingTeachers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2060 fc = &graphql.FieldContext{ 2061 Object: "Query", 2062 Field: field, 2063 IsMethod: true, 2064 IsResolver: true, 2065 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2066 switch field.Name { 2067 case "id": 2068 return ec.fieldContext_FollowingTeacher_id(ctx, field) 2069 case "teacher": 2070 return ec.fieldContext_FollowingTeacher_teacher(ctx, field) 2071 case "createdAt": 2072 return ec.fieldContext_FollowingTeacher_createdAt(ctx, field) 2073 } 2074 return nil, fmt.Errorf("no field named %q was found under type FollowingTeacher", field.Name) 2075 }, 2076 } 2077 return fc, nil 2078 } 2079 2080 func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 2081 fc, err := ec.fieldContext_Query_viewer(ctx, field) 2082 if err != nil { 2083 return graphql.Null 2084 } 2085 ctx = graphql.WithFieldContext(ctx, fc) 2086 defer func() { 2087 if r := recover(); r != nil { 2088 ec.Error(ctx, ec.Recover(ctx, r)) 2089 ret = graphql.Null 2090 } 2091 }() 2092 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2093 ctx = rctx // use context from middleware stack in children 2094 return ec.resolvers.Query().Viewer(rctx) 2095 }) 2096 if err != nil { 2097 ec.Error(ctx, err) 2098 return graphql.Null 2099 } 2100 if resTmp == nil { 2101 if !graphql.HasFieldError(ctx, fc) { 2102 ec.Errorf(ctx, "must not be null") 2103 } 2104 return graphql.Null 2105 } 2106 res := resTmp.(*model.User) 2107 fc.Result = res 2108 return ec.marshalNUser2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res) 2109 } 2110 2111 func (ec *executionContext) fieldContext_Query_viewer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2112 fc = &graphql.FieldContext{ 2113 Object: "Query", 2114 Field: field, 2115 IsMethod: true, 2116 IsResolver: true, 2117 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2118 switch field.Name { 2119 case "id": 2120 return ec.fieldContext_User_id(ctx, field) 2121 case "email": 2122 return ec.fieldContext_User_email(ctx, field) 2123 case "followingTeachers": 2124 return ec.fieldContext_User_followingTeachers(ctx, field) 2125 case "notificationTimeSpans": 2126 return ec.fieldContext_User_notificationTimeSpans(ctx, field) 2127 case "showTutorial": 2128 return ec.fieldContext_User_showTutorial(ctx, field) 2129 } 2130 return nil, fmt.Errorf("no field named %q was found under type User", field.Name) 2131 }, 2132 } 2133 return fc, nil 2134 } 2135 2136 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 2137 fc, err := ec.fieldContext_Query___type(ctx, field) 2138 if err != nil { 2139 return graphql.Null 2140 } 2141 ctx = graphql.WithFieldContext(ctx, fc) 2142 defer func() { 2143 if r := recover(); r != nil { 2144 ec.Error(ctx, ec.Recover(ctx, r)) 2145 ret = graphql.Null 2146 } 2147 }() 2148 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2149 ctx = rctx // use context from middleware stack in children 2150 return ec.introspectType(fc.Args["name"].(string)) 2151 }) 2152 if err != nil { 2153 ec.Error(ctx, err) 2154 return graphql.Null 2155 } 2156 if resTmp == nil { 2157 return graphql.Null 2158 } 2159 res := resTmp.(*introspection.Type) 2160 fc.Result = res 2161 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2162 } 2163 2164 func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2165 fc = &graphql.FieldContext{ 2166 Object: "Query", 2167 Field: field, 2168 IsMethod: true, 2169 IsResolver: false, 2170 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2171 switch field.Name { 2172 case "kind": 2173 return ec.fieldContext___Type_kind(ctx, field) 2174 case "name": 2175 return ec.fieldContext___Type_name(ctx, field) 2176 case "description": 2177 return ec.fieldContext___Type_description(ctx, field) 2178 case "fields": 2179 return ec.fieldContext___Type_fields(ctx, field) 2180 case "interfaces": 2181 return ec.fieldContext___Type_interfaces(ctx, field) 2182 case "possibleTypes": 2183 return ec.fieldContext___Type_possibleTypes(ctx, field) 2184 case "enumValues": 2185 return ec.fieldContext___Type_enumValues(ctx, field) 2186 case "inputFields": 2187 return ec.fieldContext___Type_inputFields(ctx, field) 2188 case "ofType": 2189 return ec.fieldContext___Type_ofType(ctx, field) 2190 case "specifiedByURL": 2191 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2192 } 2193 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2194 }, 2195 } 2196 defer func() { 2197 if r := recover(); r != nil { 2198 err = ec.Recover(ctx, r) 2199 ec.Error(ctx, err) 2200 } 2201 }() 2202 ctx = graphql.WithFieldContext(ctx, fc) 2203 if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 2204 ec.Error(ctx, err) 2205 return fc, err 2206 } 2207 return fc, nil 2208 } 2209 2210 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 2211 fc, err := ec.fieldContext_Query___schema(ctx, field) 2212 if err != nil { 2213 return graphql.Null 2214 } 2215 ctx = graphql.WithFieldContext(ctx, fc) 2216 defer func() { 2217 if r := recover(); r != nil { 2218 ec.Error(ctx, ec.Recover(ctx, r)) 2219 ret = graphql.Null 2220 } 2221 }() 2222 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2223 ctx = rctx // use context from middleware stack in children 2224 return ec.introspectSchema() 2225 }) 2226 if err != nil { 2227 ec.Error(ctx, err) 2228 return graphql.Null 2229 } 2230 if resTmp == nil { 2231 return graphql.Null 2232 } 2233 res := resTmp.(*introspection.Schema) 2234 fc.Result = res 2235 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) 2236 } 2237 2238 func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2239 fc = &graphql.FieldContext{ 2240 Object: "Query", 2241 Field: field, 2242 IsMethod: true, 2243 IsResolver: false, 2244 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2245 switch field.Name { 2246 case "description": 2247 return ec.fieldContext___Schema_description(ctx, field) 2248 case "types": 2249 return ec.fieldContext___Schema_types(ctx, field) 2250 case "queryType": 2251 return ec.fieldContext___Schema_queryType(ctx, field) 2252 case "mutationType": 2253 return ec.fieldContext___Schema_mutationType(ctx, field) 2254 case "subscriptionType": 2255 return ec.fieldContext___Schema_subscriptionType(ctx, field) 2256 case "directives": 2257 return ec.fieldContext___Schema_directives(ctx, field) 2258 } 2259 return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) 2260 }, 2261 } 2262 return fc, nil 2263 } 2264 2265 func (ec *executionContext) _Teacher_id(ctx context.Context, field graphql.CollectedField, obj *model.Teacher) (ret graphql.Marshaler) { 2266 fc, err := ec.fieldContext_Teacher_id(ctx, field) 2267 if err != nil { 2268 return graphql.Null 2269 } 2270 ctx = graphql.WithFieldContext(ctx, fc) 2271 defer func() { 2272 if r := recover(); r != nil { 2273 ec.Error(ctx, ec.Recover(ctx, r)) 2274 ret = graphql.Null 2275 } 2276 }() 2277 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2278 ctx = rctx // use context from middleware stack in children 2279 return obj.ID, nil 2280 }) 2281 if err != nil { 2282 ec.Error(ctx, err) 2283 return graphql.Null 2284 } 2285 if resTmp == nil { 2286 if !graphql.HasFieldError(ctx, fc) { 2287 ec.Errorf(ctx, "must not be null") 2288 } 2289 return graphql.Null 2290 } 2291 res := resTmp.(string) 2292 fc.Result = res 2293 return ec.marshalNID2string(ctx, field.Selections, res) 2294 } 2295 2296 func (ec *executionContext) fieldContext_Teacher_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2297 fc = &graphql.FieldContext{ 2298 Object: "Teacher", 2299 Field: field, 2300 IsMethod: false, 2301 IsResolver: false, 2302 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2303 return nil, errors.New("field of type ID does not have child fields") 2304 }, 2305 } 2306 return fc, nil 2307 } 2308 2309 func (ec *executionContext) _Teacher_name(ctx context.Context, field graphql.CollectedField, obj *model.Teacher) (ret graphql.Marshaler) { 2310 fc, err := ec.fieldContext_Teacher_name(ctx, field) 2311 if err != nil { 2312 return graphql.Null 2313 } 2314 ctx = graphql.WithFieldContext(ctx, fc) 2315 defer func() { 2316 if r := recover(); r != nil { 2317 ec.Error(ctx, ec.Recover(ctx, r)) 2318 ret = graphql.Null 2319 } 2320 }() 2321 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2322 ctx = rctx // use context from middleware stack in children 2323 return obj.Name, nil 2324 }) 2325 if err != nil { 2326 ec.Error(ctx, err) 2327 return graphql.Null 2328 } 2329 if resTmp == nil { 2330 if !graphql.HasFieldError(ctx, fc) { 2331 ec.Errorf(ctx, "must not be null") 2332 } 2333 return graphql.Null 2334 } 2335 res := resTmp.(string) 2336 fc.Result = res 2337 return ec.marshalNString2string(ctx, field.Selections, res) 2338 } 2339 2340 func (ec *executionContext) fieldContext_Teacher_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2341 fc = &graphql.FieldContext{ 2342 Object: "Teacher", 2343 Field: field, 2344 IsMethod: false, 2345 IsResolver: false, 2346 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2347 return nil, errors.New("field of type String does not have child fields") 2348 }, 2349 } 2350 return fc, nil 2351 } 2352 2353 func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 2354 fc, err := ec.fieldContext_User_id(ctx, field) 2355 if err != nil { 2356 return graphql.Null 2357 } 2358 ctx = graphql.WithFieldContext(ctx, fc) 2359 defer func() { 2360 if r := recover(); r != nil { 2361 ec.Error(ctx, ec.Recover(ctx, r)) 2362 ret = graphql.Null 2363 } 2364 }() 2365 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2366 ctx = rctx // use context from middleware stack in children 2367 return obj.ID, nil 2368 }) 2369 if err != nil { 2370 ec.Error(ctx, err) 2371 return graphql.Null 2372 } 2373 if resTmp == nil { 2374 if !graphql.HasFieldError(ctx, fc) { 2375 ec.Errorf(ctx, "must not be null") 2376 } 2377 return graphql.Null 2378 } 2379 res := resTmp.(string) 2380 fc.Result = res 2381 return ec.marshalNID2string(ctx, field.Selections, res) 2382 } 2383 2384 func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2385 fc = &graphql.FieldContext{ 2386 Object: "User", 2387 Field: field, 2388 IsMethod: false, 2389 IsResolver: false, 2390 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2391 return nil, errors.New("field of type ID does not have child fields") 2392 }, 2393 } 2394 return fc, nil 2395 } 2396 2397 func (ec *executionContext) _User_email(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 2398 fc, err := ec.fieldContext_User_email(ctx, field) 2399 if err != nil { 2400 return graphql.Null 2401 } 2402 ctx = graphql.WithFieldContext(ctx, fc) 2403 defer func() { 2404 if r := recover(); r != nil { 2405 ec.Error(ctx, ec.Recover(ctx, r)) 2406 ret = graphql.Null 2407 } 2408 }() 2409 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2410 ctx = rctx // use context from middleware stack in children 2411 return obj.Email, nil 2412 }) 2413 if err != nil { 2414 ec.Error(ctx, err) 2415 return graphql.Null 2416 } 2417 if resTmp == nil { 2418 if !graphql.HasFieldError(ctx, fc) { 2419 ec.Errorf(ctx, "must not be null") 2420 } 2421 return graphql.Null 2422 } 2423 res := resTmp.(string) 2424 fc.Result = res 2425 return ec.marshalNString2string(ctx, field.Selections, res) 2426 } 2427 2428 func (ec *executionContext) fieldContext_User_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2429 fc = &graphql.FieldContext{ 2430 Object: "User", 2431 Field: field, 2432 IsMethod: false, 2433 IsResolver: false, 2434 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2435 return nil, errors.New("field of type String does not have child fields") 2436 }, 2437 } 2438 return fc, nil 2439 } 2440 2441 func (ec *executionContext) _User_followingTeachers(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 2442 fc, err := ec.fieldContext_User_followingTeachers(ctx, field) 2443 if err != nil { 2444 return graphql.Null 2445 } 2446 ctx = graphql.WithFieldContext(ctx, fc) 2447 defer func() { 2448 if r := recover(); r != nil { 2449 ec.Error(ctx, ec.Recover(ctx, r)) 2450 ret = graphql.Null 2451 } 2452 }() 2453 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2454 ctx = rctx // use context from middleware stack in children 2455 return ec.resolvers.User().FollowingTeachers(rctx, obj, fc.Args["first"].(*int), fc.Args["after"].(*string), fc.Args["last"].(*int), fc.Args["before"].(*string)) 2456 }) 2457 if err != nil { 2458 ec.Error(ctx, err) 2459 return graphql.Null 2460 } 2461 if resTmp == nil { 2462 if !graphql.HasFieldError(ctx, fc) { 2463 ec.Errorf(ctx, "must not be null") 2464 } 2465 return graphql.Null 2466 } 2467 res := resTmp.(*model.FollowingTeacherConnection) 2468 fc.Result = res 2469 return ec.marshalNFollowingTeacherConnection2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherConnection(ctx, field.Selections, res) 2470 } 2471 2472 func (ec *executionContext) fieldContext_User_followingTeachers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2473 fc = &graphql.FieldContext{ 2474 Object: "User", 2475 Field: field, 2476 IsMethod: true, 2477 IsResolver: true, 2478 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2479 switch field.Name { 2480 case "pageInfo": 2481 return ec.fieldContext_FollowingTeacherConnection_pageInfo(ctx, field) 2482 case "edges": 2483 return ec.fieldContext_FollowingTeacherConnection_edges(ctx, field) 2484 case "nodes": 2485 return ec.fieldContext_FollowingTeacherConnection_nodes(ctx, field) 2486 } 2487 return nil, fmt.Errorf("no field named %q was found under type FollowingTeacherConnection", field.Name) 2488 }, 2489 } 2490 defer func() { 2491 if r := recover(); r != nil { 2492 err = ec.Recover(ctx, r) 2493 ec.Error(ctx, err) 2494 } 2495 }() 2496 ctx = graphql.WithFieldContext(ctx, fc) 2497 if fc.Args, err = ec.field_User_followingTeachers_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 2498 ec.Error(ctx, err) 2499 return fc, err 2500 } 2501 return fc, nil 2502 } 2503 2504 func (ec *executionContext) _User_notificationTimeSpans(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 2505 fc, err := ec.fieldContext_User_notificationTimeSpans(ctx, field) 2506 if err != nil { 2507 return graphql.Null 2508 } 2509 ctx = graphql.WithFieldContext(ctx, fc) 2510 defer func() { 2511 if r := recover(); r != nil { 2512 ec.Error(ctx, ec.Recover(ctx, r)) 2513 ret = graphql.Null 2514 } 2515 }() 2516 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2517 ctx = rctx // use context from middleware stack in children 2518 return ec.resolvers.User().NotificationTimeSpans(rctx, obj) 2519 }) 2520 if err != nil { 2521 ec.Error(ctx, err) 2522 return graphql.Null 2523 } 2524 if resTmp == nil { 2525 if !graphql.HasFieldError(ctx, fc) { 2526 ec.Errorf(ctx, "must not be null") 2527 } 2528 return graphql.Null 2529 } 2530 res := resTmp.([]*model.NotificationTimeSpan) 2531 fc.Result = res 2532 return ec.marshalNNotificationTimeSpan2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanᚄ(ctx, field.Selections, res) 2533 } 2534 2535 func (ec *executionContext) fieldContext_User_notificationTimeSpans(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2536 fc = &graphql.FieldContext{ 2537 Object: "User", 2538 Field: field, 2539 IsMethod: true, 2540 IsResolver: true, 2541 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2542 switch field.Name { 2543 case "fromHour": 2544 return ec.fieldContext_NotificationTimeSpan_fromHour(ctx, field) 2545 case "fromMinute": 2546 return ec.fieldContext_NotificationTimeSpan_fromMinute(ctx, field) 2547 case "toHour": 2548 return ec.fieldContext_NotificationTimeSpan_toHour(ctx, field) 2549 case "toMinute": 2550 return ec.fieldContext_NotificationTimeSpan_toMinute(ctx, field) 2551 } 2552 return nil, fmt.Errorf("no field named %q was found under type NotificationTimeSpan", field.Name) 2553 }, 2554 } 2555 return fc, nil 2556 } 2557 2558 func (ec *executionContext) _User_showTutorial(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 2559 fc, err := ec.fieldContext_User_showTutorial(ctx, field) 2560 if err != nil { 2561 return graphql.Null 2562 } 2563 ctx = graphql.WithFieldContext(ctx, fc) 2564 defer func() { 2565 if r := recover(); r != nil { 2566 ec.Error(ctx, ec.Recover(ctx, r)) 2567 ret = graphql.Null 2568 } 2569 }() 2570 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2571 ctx = rctx // use context from middleware stack in children 2572 return obj.ShowTutorial, nil 2573 }) 2574 if err != nil { 2575 ec.Error(ctx, err) 2576 return graphql.Null 2577 } 2578 if resTmp == nil { 2579 if !graphql.HasFieldError(ctx, fc) { 2580 ec.Errorf(ctx, "must not be null") 2581 } 2582 return graphql.Null 2583 } 2584 res := resTmp.(bool) 2585 fc.Result = res 2586 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 2587 } 2588 2589 func (ec *executionContext) fieldContext_User_showTutorial(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2590 fc = &graphql.FieldContext{ 2591 Object: "User", 2592 Field: field, 2593 IsMethod: false, 2594 IsResolver: false, 2595 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2596 return nil, errors.New("field of type Boolean does not have child fields") 2597 }, 2598 } 2599 return fc, nil 2600 } 2601 2602 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 2603 fc, err := ec.fieldContext___Directive_name(ctx, field) 2604 if err != nil { 2605 return graphql.Null 2606 } 2607 ctx = graphql.WithFieldContext(ctx, fc) 2608 defer func() { 2609 if r := recover(); r != nil { 2610 ec.Error(ctx, ec.Recover(ctx, r)) 2611 ret = graphql.Null 2612 } 2613 }() 2614 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2615 ctx = rctx // use context from middleware stack in children 2616 return obj.Name, nil 2617 }) 2618 if err != nil { 2619 ec.Error(ctx, err) 2620 return graphql.Null 2621 } 2622 if resTmp == nil { 2623 if !graphql.HasFieldError(ctx, fc) { 2624 ec.Errorf(ctx, "must not be null") 2625 } 2626 return graphql.Null 2627 } 2628 res := resTmp.(string) 2629 fc.Result = res 2630 return ec.marshalNString2string(ctx, field.Selections, res) 2631 } 2632 2633 func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2634 fc = &graphql.FieldContext{ 2635 Object: "__Directive", 2636 Field: field, 2637 IsMethod: false, 2638 IsResolver: false, 2639 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2640 return nil, errors.New("field of type String does not have child fields") 2641 }, 2642 } 2643 return fc, nil 2644 } 2645 2646 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 2647 fc, err := ec.fieldContext___Directive_description(ctx, field) 2648 if err != nil { 2649 return graphql.Null 2650 } 2651 ctx = graphql.WithFieldContext(ctx, fc) 2652 defer func() { 2653 if r := recover(); r != nil { 2654 ec.Error(ctx, ec.Recover(ctx, r)) 2655 ret = graphql.Null 2656 } 2657 }() 2658 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2659 ctx = rctx // use context from middleware stack in children 2660 return obj.Description(), nil 2661 }) 2662 if err != nil { 2663 ec.Error(ctx, err) 2664 return graphql.Null 2665 } 2666 if resTmp == nil { 2667 return graphql.Null 2668 } 2669 res := resTmp.(*string) 2670 fc.Result = res 2671 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2672 } 2673 2674 func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2675 fc = &graphql.FieldContext{ 2676 Object: "__Directive", 2677 Field: field, 2678 IsMethod: true, 2679 IsResolver: false, 2680 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2681 return nil, errors.New("field of type String does not have child fields") 2682 }, 2683 } 2684 return fc, nil 2685 } 2686 2687 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 2688 fc, err := ec.fieldContext___Directive_locations(ctx, field) 2689 if err != nil { 2690 return graphql.Null 2691 } 2692 ctx = graphql.WithFieldContext(ctx, fc) 2693 defer func() { 2694 if r := recover(); r != nil { 2695 ec.Error(ctx, ec.Recover(ctx, r)) 2696 ret = graphql.Null 2697 } 2698 }() 2699 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2700 ctx = rctx // use context from middleware stack in children 2701 return obj.Locations, nil 2702 }) 2703 if err != nil { 2704 ec.Error(ctx, err) 2705 return graphql.Null 2706 } 2707 if resTmp == nil { 2708 if !graphql.HasFieldError(ctx, fc) { 2709 ec.Errorf(ctx, "must not be null") 2710 } 2711 return graphql.Null 2712 } 2713 res := resTmp.([]string) 2714 fc.Result = res 2715 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) 2716 } 2717 2718 func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2719 fc = &graphql.FieldContext{ 2720 Object: "__Directive", 2721 Field: field, 2722 IsMethod: false, 2723 IsResolver: false, 2724 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2725 return nil, errors.New("field of type __DirectiveLocation does not have child fields") 2726 }, 2727 } 2728 return fc, nil 2729 } 2730 2731 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 2732 fc, err := ec.fieldContext___Directive_args(ctx, field) 2733 if err != nil { 2734 return graphql.Null 2735 } 2736 ctx = graphql.WithFieldContext(ctx, fc) 2737 defer func() { 2738 if r := recover(); r != nil { 2739 ec.Error(ctx, ec.Recover(ctx, r)) 2740 ret = graphql.Null 2741 } 2742 }() 2743 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2744 ctx = rctx // use context from middleware stack in children 2745 return obj.Args, nil 2746 }) 2747 if err != nil { 2748 ec.Error(ctx, err) 2749 return graphql.Null 2750 } 2751 if resTmp == nil { 2752 if !graphql.HasFieldError(ctx, fc) { 2753 ec.Errorf(ctx, "must not be null") 2754 } 2755 return graphql.Null 2756 } 2757 res := resTmp.([]introspection.InputValue) 2758 fc.Result = res 2759 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 2760 } 2761 2762 func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2763 fc = &graphql.FieldContext{ 2764 Object: "__Directive", 2765 Field: field, 2766 IsMethod: false, 2767 IsResolver: false, 2768 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2769 switch field.Name { 2770 case "name": 2771 return ec.fieldContext___InputValue_name(ctx, field) 2772 case "description": 2773 return ec.fieldContext___InputValue_description(ctx, field) 2774 case "type": 2775 return ec.fieldContext___InputValue_type(ctx, field) 2776 case "defaultValue": 2777 return ec.fieldContext___InputValue_defaultValue(ctx, field) 2778 } 2779 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 2780 }, 2781 } 2782 return fc, nil 2783 } 2784 2785 func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 2786 fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) 2787 if err != nil { 2788 return graphql.Null 2789 } 2790 ctx = graphql.WithFieldContext(ctx, fc) 2791 defer func() { 2792 if r := recover(); r != nil { 2793 ec.Error(ctx, ec.Recover(ctx, r)) 2794 ret = graphql.Null 2795 } 2796 }() 2797 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2798 ctx = rctx // use context from middleware stack in children 2799 return obj.IsRepeatable, nil 2800 }) 2801 if err != nil { 2802 ec.Error(ctx, err) 2803 return graphql.Null 2804 } 2805 if resTmp == nil { 2806 if !graphql.HasFieldError(ctx, fc) { 2807 ec.Errorf(ctx, "must not be null") 2808 } 2809 return graphql.Null 2810 } 2811 res := resTmp.(bool) 2812 fc.Result = res 2813 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 2814 } 2815 2816 func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2817 fc = &graphql.FieldContext{ 2818 Object: "__Directive", 2819 Field: field, 2820 IsMethod: false, 2821 IsResolver: false, 2822 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2823 return nil, errors.New("field of type Boolean does not have child fields") 2824 }, 2825 } 2826 return fc, nil 2827 } 2828 2829 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 2830 fc, err := ec.fieldContext___EnumValue_name(ctx, field) 2831 if err != nil { 2832 return graphql.Null 2833 } 2834 ctx = graphql.WithFieldContext(ctx, fc) 2835 defer func() { 2836 if r := recover(); r != nil { 2837 ec.Error(ctx, ec.Recover(ctx, r)) 2838 ret = graphql.Null 2839 } 2840 }() 2841 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2842 ctx = rctx // use context from middleware stack in children 2843 return obj.Name, nil 2844 }) 2845 if err != nil { 2846 ec.Error(ctx, err) 2847 return graphql.Null 2848 } 2849 if resTmp == nil { 2850 if !graphql.HasFieldError(ctx, fc) { 2851 ec.Errorf(ctx, "must not be null") 2852 } 2853 return graphql.Null 2854 } 2855 res := resTmp.(string) 2856 fc.Result = res 2857 return ec.marshalNString2string(ctx, field.Selections, res) 2858 } 2859 2860 func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2861 fc = &graphql.FieldContext{ 2862 Object: "__EnumValue", 2863 Field: field, 2864 IsMethod: false, 2865 IsResolver: false, 2866 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2867 return nil, errors.New("field of type String does not have child fields") 2868 }, 2869 } 2870 return fc, nil 2871 } 2872 2873 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 2874 fc, err := ec.fieldContext___EnumValue_description(ctx, field) 2875 if err != nil { 2876 return graphql.Null 2877 } 2878 ctx = graphql.WithFieldContext(ctx, fc) 2879 defer func() { 2880 if r := recover(); r != nil { 2881 ec.Error(ctx, ec.Recover(ctx, r)) 2882 ret = graphql.Null 2883 } 2884 }() 2885 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2886 ctx = rctx // use context from middleware stack in children 2887 return obj.Description(), nil 2888 }) 2889 if err != nil { 2890 ec.Error(ctx, err) 2891 return graphql.Null 2892 } 2893 if resTmp == nil { 2894 return graphql.Null 2895 } 2896 res := resTmp.(*string) 2897 fc.Result = res 2898 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2899 } 2900 2901 func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2902 fc = &graphql.FieldContext{ 2903 Object: "__EnumValue", 2904 Field: field, 2905 IsMethod: true, 2906 IsResolver: false, 2907 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2908 return nil, errors.New("field of type String does not have child fields") 2909 }, 2910 } 2911 return fc, nil 2912 } 2913 2914 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 2915 fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) 2916 if err != nil { 2917 return graphql.Null 2918 } 2919 ctx = graphql.WithFieldContext(ctx, fc) 2920 defer func() { 2921 if r := recover(); r != nil { 2922 ec.Error(ctx, ec.Recover(ctx, r)) 2923 ret = graphql.Null 2924 } 2925 }() 2926 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2927 ctx = rctx // use context from middleware stack in children 2928 return obj.IsDeprecated(), nil 2929 }) 2930 if err != nil { 2931 ec.Error(ctx, err) 2932 return graphql.Null 2933 } 2934 if resTmp == nil { 2935 if !graphql.HasFieldError(ctx, fc) { 2936 ec.Errorf(ctx, "must not be null") 2937 } 2938 return graphql.Null 2939 } 2940 res := resTmp.(bool) 2941 fc.Result = res 2942 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 2943 } 2944 2945 func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2946 fc = &graphql.FieldContext{ 2947 Object: "__EnumValue", 2948 Field: field, 2949 IsMethod: true, 2950 IsResolver: false, 2951 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2952 return nil, errors.New("field of type Boolean does not have child fields") 2953 }, 2954 } 2955 return fc, nil 2956 } 2957 2958 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 2959 fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) 2960 if err != nil { 2961 return graphql.Null 2962 } 2963 ctx = graphql.WithFieldContext(ctx, fc) 2964 defer func() { 2965 if r := recover(); r != nil { 2966 ec.Error(ctx, ec.Recover(ctx, r)) 2967 ret = graphql.Null 2968 } 2969 }() 2970 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2971 ctx = rctx // use context from middleware stack in children 2972 return obj.DeprecationReason(), nil 2973 }) 2974 if err != nil { 2975 ec.Error(ctx, err) 2976 return graphql.Null 2977 } 2978 if resTmp == nil { 2979 return graphql.Null 2980 } 2981 res := resTmp.(*string) 2982 fc.Result = res 2983 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2984 } 2985 2986 func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2987 fc = &graphql.FieldContext{ 2988 Object: "__EnumValue", 2989 Field: field, 2990 IsMethod: true, 2991 IsResolver: false, 2992 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2993 return nil, errors.New("field of type String does not have child fields") 2994 }, 2995 } 2996 return fc, nil 2997 } 2998 2999 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 3000 fc, err := ec.fieldContext___Field_name(ctx, field) 3001 if err != nil { 3002 return graphql.Null 3003 } 3004 ctx = graphql.WithFieldContext(ctx, fc) 3005 defer func() { 3006 if r := recover(); r != nil { 3007 ec.Error(ctx, ec.Recover(ctx, r)) 3008 ret = graphql.Null 3009 } 3010 }() 3011 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3012 ctx = rctx // use context from middleware stack in children 3013 return obj.Name, nil 3014 }) 3015 if err != nil { 3016 ec.Error(ctx, err) 3017 return graphql.Null 3018 } 3019 if resTmp == nil { 3020 if !graphql.HasFieldError(ctx, fc) { 3021 ec.Errorf(ctx, "must not be null") 3022 } 3023 return graphql.Null 3024 } 3025 res := resTmp.(string) 3026 fc.Result = res 3027 return ec.marshalNString2string(ctx, field.Selections, res) 3028 } 3029 3030 func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3031 fc = &graphql.FieldContext{ 3032 Object: "__Field", 3033 Field: field, 3034 IsMethod: false, 3035 IsResolver: false, 3036 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3037 return nil, errors.New("field of type String does not have child fields") 3038 }, 3039 } 3040 return fc, nil 3041 } 3042 3043 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 3044 fc, err := ec.fieldContext___Field_description(ctx, field) 3045 if err != nil { 3046 return graphql.Null 3047 } 3048 ctx = graphql.WithFieldContext(ctx, fc) 3049 defer func() { 3050 if r := recover(); r != nil { 3051 ec.Error(ctx, ec.Recover(ctx, r)) 3052 ret = graphql.Null 3053 } 3054 }() 3055 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3056 ctx = rctx // use context from middleware stack in children 3057 return obj.Description(), nil 3058 }) 3059 if err != nil { 3060 ec.Error(ctx, err) 3061 return graphql.Null 3062 } 3063 if resTmp == nil { 3064 return graphql.Null 3065 } 3066 res := resTmp.(*string) 3067 fc.Result = res 3068 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 3069 } 3070 3071 func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3072 fc = &graphql.FieldContext{ 3073 Object: "__Field", 3074 Field: field, 3075 IsMethod: true, 3076 IsResolver: false, 3077 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3078 return nil, errors.New("field of type String does not have child fields") 3079 }, 3080 } 3081 return fc, nil 3082 } 3083 3084 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 3085 fc, err := ec.fieldContext___Field_args(ctx, field) 3086 if err != nil { 3087 return graphql.Null 3088 } 3089 ctx = graphql.WithFieldContext(ctx, fc) 3090 defer func() { 3091 if r := recover(); r != nil { 3092 ec.Error(ctx, ec.Recover(ctx, r)) 3093 ret = graphql.Null 3094 } 3095 }() 3096 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3097 ctx = rctx // use context from middleware stack in children 3098 return obj.Args, nil 3099 }) 3100 if err != nil { 3101 ec.Error(ctx, err) 3102 return graphql.Null 3103 } 3104 if resTmp == nil { 3105 if !graphql.HasFieldError(ctx, fc) { 3106 ec.Errorf(ctx, "must not be null") 3107 } 3108 return graphql.Null 3109 } 3110 res := resTmp.([]introspection.InputValue) 3111 fc.Result = res 3112 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 3113 } 3114 3115 func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3116 fc = &graphql.FieldContext{ 3117 Object: "__Field", 3118 Field: field, 3119 IsMethod: false, 3120 IsResolver: false, 3121 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3122 switch field.Name { 3123 case "name": 3124 return ec.fieldContext___InputValue_name(ctx, field) 3125 case "description": 3126 return ec.fieldContext___InputValue_description(ctx, field) 3127 case "type": 3128 return ec.fieldContext___InputValue_type(ctx, field) 3129 case "defaultValue": 3130 return ec.fieldContext___InputValue_defaultValue(ctx, field) 3131 } 3132 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 3133 }, 3134 } 3135 return fc, nil 3136 } 3137 3138 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 3139 fc, err := ec.fieldContext___Field_type(ctx, field) 3140 if err != nil { 3141 return graphql.Null 3142 } 3143 ctx = graphql.WithFieldContext(ctx, fc) 3144 defer func() { 3145 if r := recover(); r != nil { 3146 ec.Error(ctx, ec.Recover(ctx, r)) 3147 ret = graphql.Null 3148 } 3149 }() 3150 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3151 ctx = rctx // use context from middleware stack in children 3152 return obj.Type, nil 3153 }) 3154 if err != nil { 3155 ec.Error(ctx, err) 3156 return graphql.Null 3157 } 3158 if resTmp == nil { 3159 if !graphql.HasFieldError(ctx, fc) { 3160 ec.Errorf(ctx, "must not be null") 3161 } 3162 return graphql.Null 3163 } 3164 res := resTmp.(*introspection.Type) 3165 fc.Result = res 3166 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 3167 } 3168 3169 func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3170 fc = &graphql.FieldContext{ 3171 Object: "__Field", 3172 Field: field, 3173 IsMethod: false, 3174 IsResolver: false, 3175 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3176 switch field.Name { 3177 case "kind": 3178 return ec.fieldContext___Type_kind(ctx, field) 3179 case "name": 3180 return ec.fieldContext___Type_name(ctx, field) 3181 case "description": 3182 return ec.fieldContext___Type_description(ctx, field) 3183 case "fields": 3184 return ec.fieldContext___Type_fields(ctx, field) 3185 case "interfaces": 3186 return ec.fieldContext___Type_interfaces(ctx, field) 3187 case "possibleTypes": 3188 return ec.fieldContext___Type_possibleTypes(ctx, field) 3189 case "enumValues": 3190 return ec.fieldContext___Type_enumValues(ctx, field) 3191 case "inputFields": 3192 return ec.fieldContext___Type_inputFields(ctx, field) 3193 case "ofType": 3194 return ec.fieldContext___Type_ofType(ctx, field) 3195 case "specifiedByURL": 3196 return ec.fieldContext___Type_specifiedByURL(ctx, field) 3197 } 3198 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 3199 }, 3200 } 3201 return fc, nil 3202 } 3203 3204 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 3205 fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) 3206 if err != nil { 3207 return graphql.Null 3208 } 3209 ctx = graphql.WithFieldContext(ctx, fc) 3210 defer func() { 3211 if r := recover(); r != nil { 3212 ec.Error(ctx, ec.Recover(ctx, r)) 3213 ret = graphql.Null 3214 } 3215 }() 3216 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3217 ctx = rctx // use context from middleware stack in children 3218 return obj.IsDeprecated(), nil 3219 }) 3220 if err != nil { 3221 ec.Error(ctx, err) 3222 return graphql.Null 3223 } 3224 if resTmp == nil { 3225 if !graphql.HasFieldError(ctx, fc) { 3226 ec.Errorf(ctx, "must not be null") 3227 } 3228 return graphql.Null 3229 } 3230 res := resTmp.(bool) 3231 fc.Result = res 3232 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 3233 } 3234 3235 func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3236 fc = &graphql.FieldContext{ 3237 Object: "__Field", 3238 Field: field, 3239 IsMethod: true, 3240 IsResolver: false, 3241 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3242 return nil, errors.New("field of type Boolean does not have child fields") 3243 }, 3244 } 3245 return fc, nil 3246 } 3247 3248 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 3249 fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) 3250 if err != nil { 3251 return graphql.Null 3252 } 3253 ctx = graphql.WithFieldContext(ctx, fc) 3254 defer func() { 3255 if r := recover(); r != nil { 3256 ec.Error(ctx, ec.Recover(ctx, r)) 3257 ret = graphql.Null 3258 } 3259 }() 3260 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3261 ctx = rctx // use context from middleware stack in children 3262 return obj.DeprecationReason(), nil 3263 }) 3264 if err != nil { 3265 ec.Error(ctx, err) 3266 return graphql.Null 3267 } 3268 if resTmp == nil { 3269 return graphql.Null 3270 } 3271 res := resTmp.(*string) 3272 fc.Result = res 3273 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 3274 } 3275 3276 func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3277 fc = &graphql.FieldContext{ 3278 Object: "__Field", 3279 Field: field, 3280 IsMethod: true, 3281 IsResolver: false, 3282 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3283 return nil, errors.New("field of type String does not have child fields") 3284 }, 3285 } 3286 return fc, nil 3287 } 3288 3289 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 3290 fc, err := ec.fieldContext___InputValue_name(ctx, field) 3291 if err != nil { 3292 return graphql.Null 3293 } 3294 ctx = graphql.WithFieldContext(ctx, fc) 3295 defer func() { 3296 if r := recover(); r != nil { 3297 ec.Error(ctx, ec.Recover(ctx, r)) 3298 ret = graphql.Null 3299 } 3300 }() 3301 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3302 ctx = rctx // use context from middleware stack in children 3303 return obj.Name, nil 3304 }) 3305 if err != nil { 3306 ec.Error(ctx, err) 3307 return graphql.Null 3308 } 3309 if resTmp == nil { 3310 if !graphql.HasFieldError(ctx, fc) { 3311 ec.Errorf(ctx, "must not be null") 3312 } 3313 return graphql.Null 3314 } 3315 res := resTmp.(string) 3316 fc.Result = res 3317 return ec.marshalNString2string(ctx, field.Selections, res) 3318 } 3319 3320 func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3321 fc = &graphql.FieldContext{ 3322 Object: "__InputValue", 3323 Field: field, 3324 IsMethod: false, 3325 IsResolver: false, 3326 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3327 return nil, errors.New("field of type String does not have child fields") 3328 }, 3329 } 3330 return fc, nil 3331 } 3332 3333 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 3334 fc, err := ec.fieldContext___InputValue_description(ctx, field) 3335 if err != nil { 3336 return graphql.Null 3337 } 3338 ctx = graphql.WithFieldContext(ctx, fc) 3339 defer func() { 3340 if r := recover(); r != nil { 3341 ec.Error(ctx, ec.Recover(ctx, r)) 3342 ret = graphql.Null 3343 } 3344 }() 3345 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3346 ctx = rctx // use context from middleware stack in children 3347 return obj.Description(), nil 3348 }) 3349 if err != nil { 3350 ec.Error(ctx, err) 3351 return graphql.Null 3352 } 3353 if resTmp == nil { 3354 return graphql.Null 3355 } 3356 res := resTmp.(*string) 3357 fc.Result = res 3358 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 3359 } 3360 3361 func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3362 fc = &graphql.FieldContext{ 3363 Object: "__InputValue", 3364 Field: field, 3365 IsMethod: true, 3366 IsResolver: false, 3367 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3368 return nil, errors.New("field of type String does not have child fields") 3369 }, 3370 } 3371 return fc, nil 3372 } 3373 3374 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 3375 fc, err := ec.fieldContext___InputValue_type(ctx, field) 3376 if err != nil { 3377 return graphql.Null 3378 } 3379 ctx = graphql.WithFieldContext(ctx, fc) 3380 defer func() { 3381 if r := recover(); r != nil { 3382 ec.Error(ctx, ec.Recover(ctx, r)) 3383 ret = graphql.Null 3384 } 3385 }() 3386 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3387 ctx = rctx // use context from middleware stack in children 3388 return obj.Type, nil 3389 }) 3390 if err != nil { 3391 ec.Error(ctx, err) 3392 return graphql.Null 3393 } 3394 if resTmp == nil { 3395 if !graphql.HasFieldError(ctx, fc) { 3396 ec.Errorf(ctx, "must not be null") 3397 } 3398 return graphql.Null 3399 } 3400 res := resTmp.(*introspection.Type) 3401 fc.Result = res 3402 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 3403 } 3404 3405 func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3406 fc = &graphql.FieldContext{ 3407 Object: "__InputValue", 3408 Field: field, 3409 IsMethod: false, 3410 IsResolver: false, 3411 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3412 switch field.Name { 3413 case "kind": 3414 return ec.fieldContext___Type_kind(ctx, field) 3415 case "name": 3416 return ec.fieldContext___Type_name(ctx, field) 3417 case "description": 3418 return ec.fieldContext___Type_description(ctx, field) 3419 case "fields": 3420 return ec.fieldContext___Type_fields(ctx, field) 3421 case "interfaces": 3422 return ec.fieldContext___Type_interfaces(ctx, field) 3423 case "possibleTypes": 3424 return ec.fieldContext___Type_possibleTypes(ctx, field) 3425 case "enumValues": 3426 return ec.fieldContext___Type_enumValues(ctx, field) 3427 case "inputFields": 3428 return ec.fieldContext___Type_inputFields(ctx, field) 3429 case "ofType": 3430 return ec.fieldContext___Type_ofType(ctx, field) 3431 case "specifiedByURL": 3432 return ec.fieldContext___Type_specifiedByURL(ctx, field) 3433 } 3434 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 3435 }, 3436 } 3437 return fc, nil 3438 } 3439 3440 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 3441 fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) 3442 if err != nil { 3443 return graphql.Null 3444 } 3445 ctx = graphql.WithFieldContext(ctx, fc) 3446 defer func() { 3447 if r := recover(); r != nil { 3448 ec.Error(ctx, ec.Recover(ctx, r)) 3449 ret = graphql.Null 3450 } 3451 }() 3452 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3453 ctx = rctx // use context from middleware stack in children 3454 return obj.DefaultValue, nil 3455 }) 3456 if err != nil { 3457 ec.Error(ctx, err) 3458 return graphql.Null 3459 } 3460 if resTmp == nil { 3461 return graphql.Null 3462 } 3463 res := resTmp.(*string) 3464 fc.Result = res 3465 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 3466 } 3467 3468 func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3469 fc = &graphql.FieldContext{ 3470 Object: "__InputValue", 3471 Field: field, 3472 IsMethod: false, 3473 IsResolver: false, 3474 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3475 return nil, errors.New("field of type String does not have child fields") 3476 }, 3477 } 3478 return fc, nil 3479 } 3480 3481 func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 3482 fc, err := ec.fieldContext___Schema_description(ctx, field) 3483 if err != nil { 3484 return graphql.Null 3485 } 3486 ctx = graphql.WithFieldContext(ctx, fc) 3487 defer func() { 3488 if r := recover(); r != nil { 3489 ec.Error(ctx, ec.Recover(ctx, r)) 3490 ret = graphql.Null 3491 } 3492 }() 3493 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3494 ctx = rctx // use context from middleware stack in children 3495 return obj.Description(), nil 3496 }) 3497 if err != nil { 3498 ec.Error(ctx, err) 3499 return graphql.Null 3500 } 3501 if resTmp == nil { 3502 return graphql.Null 3503 } 3504 res := resTmp.(*string) 3505 fc.Result = res 3506 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 3507 } 3508 3509 func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3510 fc = &graphql.FieldContext{ 3511 Object: "__Schema", 3512 Field: field, 3513 IsMethod: true, 3514 IsResolver: false, 3515 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3516 return nil, errors.New("field of type String does not have child fields") 3517 }, 3518 } 3519 return fc, nil 3520 } 3521 3522 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 3523 fc, err := ec.fieldContext___Schema_types(ctx, field) 3524 if err != nil { 3525 return graphql.Null 3526 } 3527 ctx = graphql.WithFieldContext(ctx, fc) 3528 defer func() { 3529 if r := recover(); r != nil { 3530 ec.Error(ctx, ec.Recover(ctx, r)) 3531 ret = graphql.Null 3532 } 3533 }() 3534 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3535 ctx = rctx // use context from middleware stack in children 3536 return obj.Types(), nil 3537 }) 3538 if err != nil { 3539 ec.Error(ctx, err) 3540 return graphql.Null 3541 } 3542 if resTmp == nil { 3543 if !graphql.HasFieldError(ctx, fc) { 3544 ec.Errorf(ctx, "must not be null") 3545 } 3546 return graphql.Null 3547 } 3548 res := resTmp.([]introspection.Type) 3549 fc.Result = res 3550 return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 3551 } 3552 3553 func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3554 fc = &graphql.FieldContext{ 3555 Object: "__Schema", 3556 Field: field, 3557 IsMethod: true, 3558 IsResolver: false, 3559 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3560 switch field.Name { 3561 case "kind": 3562 return ec.fieldContext___Type_kind(ctx, field) 3563 case "name": 3564 return ec.fieldContext___Type_name(ctx, field) 3565 case "description": 3566 return ec.fieldContext___Type_description(ctx, field) 3567 case "fields": 3568 return ec.fieldContext___Type_fields(ctx, field) 3569 case "interfaces": 3570 return ec.fieldContext___Type_interfaces(ctx, field) 3571 case "possibleTypes": 3572 return ec.fieldContext___Type_possibleTypes(ctx, field) 3573 case "enumValues": 3574 return ec.fieldContext___Type_enumValues(ctx, field) 3575 case "inputFields": 3576 return ec.fieldContext___Type_inputFields(ctx, field) 3577 case "ofType": 3578 return ec.fieldContext___Type_ofType(ctx, field) 3579 case "specifiedByURL": 3580 return ec.fieldContext___Type_specifiedByURL(ctx, field) 3581 } 3582 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 3583 }, 3584 } 3585 return fc, nil 3586 } 3587 3588 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 3589 fc, err := ec.fieldContext___Schema_queryType(ctx, field) 3590 if err != nil { 3591 return graphql.Null 3592 } 3593 ctx = graphql.WithFieldContext(ctx, fc) 3594 defer func() { 3595 if r := recover(); r != nil { 3596 ec.Error(ctx, ec.Recover(ctx, r)) 3597 ret = graphql.Null 3598 } 3599 }() 3600 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3601 ctx = rctx // use context from middleware stack in children 3602 return obj.QueryType(), nil 3603 }) 3604 if err != nil { 3605 ec.Error(ctx, err) 3606 return graphql.Null 3607 } 3608 if resTmp == nil { 3609 if !graphql.HasFieldError(ctx, fc) { 3610 ec.Errorf(ctx, "must not be null") 3611 } 3612 return graphql.Null 3613 } 3614 res := resTmp.(*introspection.Type) 3615 fc.Result = res 3616 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 3617 } 3618 3619 func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3620 fc = &graphql.FieldContext{ 3621 Object: "__Schema", 3622 Field: field, 3623 IsMethod: true, 3624 IsResolver: false, 3625 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3626 switch field.Name { 3627 case "kind": 3628 return ec.fieldContext___Type_kind(ctx, field) 3629 case "name": 3630 return ec.fieldContext___Type_name(ctx, field) 3631 case "description": 3632 return ec.fieldContext___Type_description(ctx, field) 3633 case "fields": 3634 return ec.fieldContext___Type_fields(ctx, field) 3635 case "interfaces": 3636 return ec.fieldContext___Type_interfaces(ctx, field) 3637 case "possibleTypes": 3638 return ec.fieldContext___Type_possibleTypes(ctx, field) 3639 case "enumValues": 3640 return ec.fieldContext___Type_enumValues(ctx, field) 3641 case "inputFields": 3642 return ec.fieldContext___Type_inputFields(ctx, field) 3643 case "ofType": 3644 return ec.fieldContext___Type_ofType(ctx, field) 3645 case "specifiedByURL": 3646 return ec.fieldContext___Type_specifiedByURL(ctx, field) 3647 } 3648 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 3649 }, 3650 } 3651 return fc, nil 3652 } 3653 3654 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 3655 fc, err := ec.fieldContext___Schema_mutationType(ctx, field) 3656 if err != nil { 3657 return graphql.Null 3658 } 3659 ctx = graphql.WithFieldContext(ctx, fc) 3660 defer func() { 3661 if r := recover(); r != nil { 3662 ec.Error(ctx, ec.Recover(ctx, r)) 3663 ret = graphql.Null 3664 } 3665 }() 3666 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3667 ctx = rctx // use context from middleware stack in children 3668 return obj.MutationType(), nil 3669 }) 3670 if err != nil { 3671 ec.Error(ctx, err) 3672 return graphql.Null 3673 } 3674 if resTmp == nil { 3675 return graphql.Null 3676 } 3677 res := resTmp.(*introspection.Type) 3678 fc.Result = res 3679 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 3680 } 3681 3682 func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3683 fc = &graphql.FieldContext{ 3684 Object: "__Schema", 3685 Field: field, 3686 IsMethod: true, 3687 IsResolver: false, 3688 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3689 switch field.Name { 3690 case "kind": 3691 return ec.fieldContext___Type_kind(ctx, field) 3692 case "name": 3693 return ec.fieldContext___Type_name(ctx, field) 3694 case "description": 3695 return ec.fieldContext___Type_description(ctx, field) 3696 case "fields": 3697 return ec.fieldContext___Type_fields(ctx, field) 3698 case "interfaces": 3699 return ec.fieldContext___Type_interfaces(ctx, field) 3700 case "possibleTypes": 3701 return ec.fieldContext___Type_possibleTypes(ctx, field) 3702 case "enumValues": 3703 return ec.fieldContext___Type_enumValues(ctx, field) 3704 case "inputFields": 3705 return ec.fieldContext___Type_inputFields(ctx, field) 3706 case "ofType": 3707 return ec.fieldContext___Type_ofType(ctx, field) 3708 case "specifiedByURL": 3709 return ec.fieldContext___Type_specifiedByURL(ctx, field) 3710 } 3711 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 3712 }, 3713 } 3714 return fc, nil 3715 } 3716 3717 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 3718 fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) 3719 if err != nil { 3720 return graphql.Null 3721 } 3722 ctx = graphql.WithFieldContext(ctx, fc) 3723 defer func() { 3724 if r := recover(); r != nil { 3725 ec.Error(ctx, ec.Recover(ctx, r)) 3726 ret = graphql.Null 3727 } 3728 }() 3729 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3730 ctx = rctx // use context from middleware stack in children 3731 return obj.SubscriptionType(), nil 3732 }) 3733 if err != nil { 3734 ec.Error(ctx, err) 3735 return graphql.Null 3736 } 3737 if resTmp == nil { 3738 return graphql.Null 3739 } 3740 res := resTmp.(*introspection.Type) 3741 fc.Result = res 3742 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 3743 } 3744 3745 func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3746 fc = &graphql.FieldContext{ 3747 Object: "__Schema", 3748 Field: field, 3749 IsMethod: true, 3750 IsResolver: false, 3751 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3752 switch field.Name { 3753 case "kind": 3754 return ec.fieldContext___Type_kind(ctx, field) 3755 case "name": 3756 return ec.fieldContext___Type_name(ctx, field) 3757 case "description": 3758 return ec.fieldContext___Type_description(ctx, field) 3759 case "fields": 3760 return ec.fieldContext___Type_fields(ctx, field) 3761 case "interfaces": 3762 return ec.fieldContext___Type_interfaces(ctx, field) 3763 case "possibleTypes": 3764 return ec.fieldContext___Type_possibleTypes(ctx, field) 3765 case "enumValues": 3766 return ec.fieldContext___Type_enumValues(ctx, field) 3767 case "inputFields": 3768 return ec.fieldContext___Type_inputFields(ctx, field) 3769 case "ofType": 3770 return ec.fieldContext___Type_ofType(ctx, field) 3771 case "specifiedByURL": 3772 return ec.fieldContext___Type_specifiedByURL(ctx, field) 3773 } 3774 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 3775 }, 3776 } 3777 return fc, nil 3778 } 3779 3780 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 3781 fc, err := ec.fieldContext___Schema_directives(ctx, field) 3782 if err != nil { 3783 return graphql.Null 3784 } 3785 ctx = graphql.WithFieldContext(ctx, fc) 3786 defer func() { 3787 if r := recover(); r != nil { 3788 ec.Error(ctx, ec.Recover(ctx, r)) 3789 ret = graphql.Null 3790 } 3791 }() 3792 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3793 ctx = rctx // use context from middleware stack in children 3794 return obj.Directives(), nil 3795 }) 3796 if err != nil { 3797 ec.Error(ctx, err) 3798 return graphql.Null 3799 } 3800 if resTmp == nil { 3801 if !graphql.HasFieldError(ctx, fc) { 3802 ec.Errorf(ctx, "must not be null") 3803 } 3804 return graphql.Null 3805 } 3806 res := resTmp.([]introspection.Directive) 3807 fc.Result = res 3808 return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) 3809 } 3810 3811 func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3812 fc = &graphql.FieldContext{ 3813 Object: "__Schema", 3814 Field: field, 3815 IsMethod: true, 3816 IsResolver: false, 3817 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3818 switch field.Name { 3819 case "name": 3820 return ec.fieldContext___Directive_name(ctx, field) 3821 case "description": 3822 return ec.fieldContext___Directive_description(ctx, field) 3823 case "locations": 3824 return ec.fieldContext___Directive_locations(ctx, field) 3825 case "args": 3826 return ec.fieldContext___Directive_args(ctx, field) 3827 case "isRepeatable": 3828 return ec.fieldContext___Directive_isRepeatable(ctx, field) 3829 } 3830 return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) 3831 }, 3832 } 3833 return fc, nil 3834 } 3835 3836 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 3837 fc, err := ec.fieldContext___Type_kind(ctx, field) 3838 if err != nil { 3839 return graphql.Null 3840 } 3841 ctx = graphql.WithFieldContext(ctx, fc) 3842 defer func() { 3843 if r := recover(); r != nil { 3844 ec.Error(ctx, ec.Recover(ctx, r)) 3845 ret = graphql.Null 3846 } 3847 }() 3848 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3849 ctx = rctx // use context from middleware stack in children 3850 return obj.Kind(), nil 3851 }) 3852 if err != nil { 3853 ec.Error(ctx, err) 3854 return graphql.Null 3855 } 3856 if resTmp == nil { 3857 if !graphql.HasFieldError(ctx, fc) { 3858 ec.Errorf(ctx, "must not be null") 3859 } 3860 return graphql.Null 3861 } 3862 res := resTmp.(string) 3863 fc.Result = res 3864 return ec.marshalN__TypeKind2string(ctx, field.Selections, res) 3865 } 3866 3867 func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3868 fc = &graphql.FieldContext{ 3869 Object: "__Type", 3870 Field: field, 3871 IsMethod: true, 3872 IsResolver: false, 3873 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3874 return nil, errors.New("field of type __TypeKind does not have child fields") 3875 }, 3876 } 3877 return fc, nil 3878 } 3879 3880 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 3881 fc, err := ec.fieldContext___Type_name(ctx, field) 3882 if err != nil { 3883 return graphql.Null 3884 } 3885 ctx = graphql.WithFieldContext(ctx, fc) 3886 defer func() { 3887 if r := recover(); r != nil { 3888 ec.Error(ctx, ec.Recover(ctx, r)) 3889 ret = graphql.Null 3890 } 3891 }() 3892 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3893 ctx = rctx // use context from middleware stack in children 3894 return obj.Name(), nil 3895 }) 3896 if err != nil { 3897 ec.Error(ctx, err) 3898 return graphql.Null 3899 } 3900 if resTmp == nil { 3901 return graphql.Null 3902 } 3903 res := resTmp.(*string) 3904 fc.Result = res 3905 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 3906 } 3907 3908 func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3909 fc = &graphql.FieldContext{ 3910 Object: "__Type", 3911 Field: field, 3912 IsMethod: true, 3913 IsResolver: false, 3914 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3915 return nil, errors.New("field of type String does not have child fields") 3916 }, 3917 } 3918 return fc, nil 3919 } 3920 3921 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 3922 fc, err := ec.fieldContext___Type_description(ctx, field) 3923 if err != nil { 3924 return graphql.Null 3925 } 3926 ctx = graphql.WithFieldContext(ctx, fc) 3927 defer func() { 3928 if r := recover(); r != nil { 3929 ec.Error(ctx, ec.Recover(ctx, r)) 3930 ret = graphql.Null 3931 } 3932 }() 3933 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3934 ctx = rctx // use context from middleware stack in children 3935 return obj.Description(), nil 3936 }) 3937 if err != nil { 3938 ec.Error(ctx, err) 3939 return graphql.Null 3940 } 3941 if resTmp == nil { 3942 return graphql.Null 3943 } 3944 res := resTmp.(*string) 3945 fc.Result = res 3946 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 3947 } 3948 3949 func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3950 fc = &graphql.FieldContext{ 3951 Object: "__Type", 3952 Field: field, 3953 IsMethod: true, 3954 IsResolver: false, 3955 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3956 return nil, errors.New("field of type String does not have child fields") 3957 }, 3958 } 3959 return fc, nil 3960 } 3961 3962 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 3963 fc, err := ec.fieldContext___Type_fields(ctx, field) 3964 if err != nil { 3965 return graphql.Null 3966 } 3967 ctx = graphql.WithFieldContext(ctx, fc) 3968 defer func() { 3969 if r := recover(); r != nil { 3970 ec.Error(ctx, ec.Recover(ctx, r)) 3971 ret = graphql.Null 3972 } 3973 }() 3974 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3975 ctx = rctx // use context from middleware stack in children 3976 return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil 3977 }) 3978 if err != nil { 3979 ec.Error(ctx, err) 3980 return graphql.Null 3981 } 3982 if resTmp == nil { 3983 return graphql.Null 3984 } 3985 res := resTmp.([]introspection.Field) 3986 fc.Result = res 3987 return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) 3988 } 3989 3990 func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3991 fc = &graphql.FieldContext{ 3992 Object: "__Type", 3993 Field: field, 3994 IsMethod: true, 3995 IsResolver: false, 3996 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3997 switch field.Name { 3998 case "name": 3999 return ec.fieldContext___Field_name(ctx, field) 4000 case "description": 4001 return ec.fieldContext___Field_description(ctx, field) 4002 case "args": 4003 return ec.fieldContext___Field_args(ctx, field) 4004 case "type": 4005 return ec.fieldContext___Field_type(ctx, field) 4006 case "isDeprecated": 4007 return ec.fieldContext___Field_isDeprecated(ctx, field) 4008 case "deprecationReason": 4009 return ec.fieldContext___Field_deprecationReason(ctx, field) 4010 } 4011 return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) 4012 }, 4013 } 4014 defer func() { 4015 if r := recover(); r != nil { 4016 err = ec.Recover(ctx, r) 4017 ec.Error(ctx, err) 4018 } 4019 }() 4020 ctx = graphql.WithFieldContext(ctx, fc) 4021 if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 4022 ec.Error(ctx, err) 4023 return fc, err 4024 } 4025 return fc, nil 4026 } 4027 4028 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 4029 fc, err := ec.fieldContext___Type_interfaces(ctx, field) 4030 if err != nil { 4031 return graphql.Null 4032 } 4033 ctx = graphql.WithFieldContext(ctx, fc) 4034 defer func() { 4035 if r := recover(); r != nil { 4036 ec.Error(ctx, ec.Recover(ctx, r)) 4037 ret = graphql.Null 4038 } 4039 }() 4040 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4041 ctx = rctx // use context from middleware stack in children 4042 return obj.Interfaces(), nil 4043 }) 4044 if err != nil { 4045 ec.Error(ctx, err) 4046 return graphql.Null 4047 } 4048 if resTmp == nil { 4049 return graphql.Null 4050 } 4051 res := resTmp.([]introspection.Type) 4052 fc.Result = res 4053 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 4054 } 4055 4056 func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4057 fc = &graphql.FieldContext{ 4058 Object: "__Type", 4059 Field: field, 4060 IsMethod: true, 4061 IsResolver: false, 4062 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4063 switch field.Name { 4064 case "kind": 4065 return ec.fieldContext___Type_kind(ctx, field) 4066 case "name": 4067 return ec.fieldContext___Type_name(ctx, field) 4068 case "description": 4069 return ec.fieldContext___Type_description(ctx, field) 4070 case "fields": 4071 return ec.fieldContext___Type_fields(ctx, field) 4072 case "interfaces": 4073 return ec.fieldContext___Type_interfaces(ctx, field) 4074 case "possibleTypes": 4075 return ec.fieldContext___Type_possibleTypes(ctx, field) 4076 case "enumValues": 4077 return ec.fieldContext___Type_enumValues(ctx, field) 4078 case "inputFields": 4079 return ec.fieldContext___Type_inputFields(ctx, field) 4080 case "ofType": 4081 return ec.fieldContext___Type_ofType(ctx, field) 4082 case "specifiedByURL": 4083 return ec.fieldContext___Type_specifiedByURL(ctx, field) 4084 } 4085 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 4086 }, 4087 } 4088 return fc, nil 4089 } 4090 4091 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 4092 fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) 4093 if err != nil { 4094 return graphql.Null 4095 } 4096 ctx = graphql.WithFieldContext(ctx, fc) 4097 defer func() { 4098 if r := recover(); r != nil { 4099 ec.Error(ctx, ec.Recover(ctx, r)) 4100 ret = graphql.Null 4101 } 4102 }() 4103 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4104 ctx = rctx // use context from middleware stack in children 4105 return obj.PossibleTypes(), nil 4106 }) 4107 if err != nil { 4108 ec.Error(ctx, err) 4109 return graphql.Null 4110 } 4111 if resTmp == nil { 4112 return graphql.Null 4113 } 4114 res := resTmp.([]introspection.Type) 4115 fc.Result = res 4116 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 4117 } 4118 4119 func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4120 fc = &graphql.FieldContext{ 4121 Object: "__Type", 4122 Field: field, 4123 IsMethod: true, 4124 IsResolver: false, 4125 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4126 switch field.Name { 4127 case "kind": 4128 return ec.fieldContext___Type_kind(ctx, field) 4129 case "name": 4130 return ec.fieldContext___Type_name(ctx, field) 4131 case "description": 4132 return ec.fieldContext___Type_description(ctx, field) 4133 case "fields": 4134 return ec.fieldContext___Type_fields(ctx, field) 4135 case "interfaces": 4136 return ec.fieldContext___Type_interfaces(ctx, field) 4137 case "possibleTypes": 4138 return ec.fieldContext___Type_possibleTypes(ctx, field) 4139 case "enumValues": 4140 return ec.fieldContext___Type_enumValues(ctx, field) 4141 case "inputFields": 4142 return ec.fieldContext___Type_inputFields(ctx, field) 4143 case "ofType": 4144 return ec.fieldContext___Type_ofType(ctx, field) 4145 case "specifiedByURL": 4146 return ec.fieldContext___Type_specifiedByURL(ctx, field) 4147 } 4148 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 4149 }, 4150 } 4151 return fc, nil 4152 } 4153 4154 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 4155 fc, err := ec.fieldContext___Type_enumValues(ctx, field) 4156 if err != nil { 4157 return graphql.Null 4158 } 4159 ctx = graphql.WithFieldContext(ctx, fc) 4160 defer func() { 4161 if r := recover(); r != nil { 4162 ec.Error(ctx, ec.Recover(ctx, r)) 4163 ret = graphql.Null 4164 } 4165 }() 4166 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4167 ctx = rctx // use context from middleware stack in children 4168 return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil 4169 }) 4170 if err != nil { 4171 ec.Error(ctx, err) 4172 return graphql.Null 4173 } 4174 if resTmp == nil { 4175 return graphql.Null 4176 } 4177 res := resTmp.([]introspection.EnumValue) 4178 fc.Result = res 4179 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) 4180 } 4181 4182 func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4183 fc = &graphql.FieldContext{ 4184 Object: "__Type", 4185 Field: field, 4186 IsMethod: true, 4187 IsResolver: false, 4188 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4189 switch field.Name { 4190 case "name": 4191 return ec.fieldContext___EnumValue_name(ctx, field) 4192 case "description": 4193 return ec.fieldContext___EnumValue_description(ctx, field) 4194 case "isDeprecated": 4195 return ec.fieldContext___EnumValue_isDeprecated(ctx, field) 4196 case "deprecationReason": 4197 return ec.fieldContext___EnumValue_deprecationReason(ctx, field) 4198 } 4199 return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) 4200 }, 4201 } 4202 defer func() { 4203 if r := recover(); r != nil { 4204 err = ec.Recover(ctx, r) 4205 ec.Error(ctx, err) 4206 } 4207 }() 4208 ctx = graphql.WithFieldContext(ctx, fc) 4209 if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 4210 ec.Error(ctx, err) 4211 return fc, err 4212 } 4213 return fc, nil 4214 } 4215 4216 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 4217 fc, err := ec.fieldContext___Type_inputFields(ctx, field) 4218 if err != nil { 4219 return graphql.Null 4220 } 4221 ctx = graphql.WithFieldContext(ctx, fc) 4222 defer func() { 4223 if r := recover(); r != nil { 4224 ec.Error(ctx, ec.Recover(ctx, r)) 4225 ret = graphql.Null 4226 } 4227 }() 4228 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4229 ctx = rctx // use context from middleware stack in children 4230 return obj.InputFields(), nil 4231 }) 4232 if err != nil { 4233 ec.Error(ctx, err) 4234 return graphql.Null 4235 } 4236 if resTmp == nil { 4237 return graphql.Null 4238 } 4239 res := resTmp.([]introspection.InputValue) 4240 fc.Result = res 4241 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 4242 } 4243 4244 func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4245 fc = &graphql.FieldContext{ 4246 Object: "__Type", 4247 Field: field, 4248 IsMethod: true, 4249 IsResolver: false, 4250 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4251 switch field.Name { 4252 case "name": 4253 return ec.fieldContext___InputValue_name(ctx, field) 4254 case "description": 4255 return ec.fieldContext___InputValue_description(ctx, field) 4256 case "type": 4257 return ec.fieldContext___InputValue_type(ctx, field) 4258 case "defaultValue": 4259 return ec.fieldContext___InputValue_defaultValue(ctx, field) 4260 } 4261 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 4262 }, 4263 } 4264 return fc, nil 4265 } 4266 4267 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 4268 fc, err := ec.fieldContext___Type_ofType(ctx, field) 4269 if err != nil { 4270 return graphql.Null 4271 } 4272 ctx = graphql.WithFieldContext(ctx, fc) 4273 defer func() { 4274 if r := recover(); r != nil { 4275 ec.Error(ctx, ec.Recover(ctx, r)) 4276 ret = graphql.Null 4277 } 4278 }() 4279 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4280 ctx = rctx // use context from middleware stack in children 4281 return obj.OfType(), nil 4282 }) 4283 if err != nil { 4284 ec.Error(ctx, err) 4285 return graphql.Null 4286 } 4287 if resTmp == nil { 4288 return graphql.Null 4289 } 4290 res := resTmp.(*introspection.Type) 4291 fc.Result = res 4292 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 4293 } 4294 4295 func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4296 fc = &graphql.FieldContext{ 4297 Object: "__Type", 4298 Field: field, 4299 IsMethod: true, 4300 IsResolver: false, 4301 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4302 switch field.Name { 4303 case "kind": 4304 return ec.fieldContext___Type_kind(ctx, field) 4305 case "name": 4306 return ec.fieldContext___Type_name(ctx, field) 4307 case "description": 4308 return ec.fieldContext___Type_description(ctx, field) 4309 case "fields": 4310 return ec.fieldContext___Type_fields(ctx, field) 4311 case "interfaces": 4312 return ec.fieldContext___Type_interfaces(ctx, field) 4313 case "possibleTypes": 4314 return ec.fieldContext___Type_possibleTypes(ctx, field) 4315 case "enumValues": 4316 return ec.fieldContext___Type_enumValues(ctx, field) 4317 case "inputFields": 4318 return ec.fieldContext___Type_inputFields(ctx, field) 4319 case "ofType": 4320 return ec.fieldContext___Type_ofType(ctx, field) 4321 case "specifiedByURL": 4322 return ec.fieldContext___Type_specifiedByURL(ctx, field) 4323 } 4324 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 4325 }, 4326 } 4327 return fc, nil 4328 } 4329 4330 func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 4331 fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) 4332 if err != nil { 4333 return graphql.Null 4334 } 4335 ctx = graphql.WithFieldContext(ctx, fc) 4336 defer func() { 4337 if r := recover(); r != nil { 4338 ec.Error(ctx, ec.Recover(ctx, r)) 4339 ret = graphql.Null 4340 } 4341 }() 4342 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4343 ctx = rctx // use context from middleware stack in children 4344 return obj.SpecifiedByURL(), nil 4345 }) 4346 if err != nil { 4347 ec.Error(ctx, err) 4348 return graphql.Null 4349 } 4350 if resTmp == nil { 4351 return graphql.Null 4352 } 4353 res := resTmp.(*string) 4354 fc.Result = res 4355 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4356 } 4357 4358 func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4359 fc = &graphql.FieldContext{ 4360 Object: "__Type", 4361 Field: field, 4362 IsMethod: true, 4363 IsResolver: false, 4364 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4365 return nil, errors.New("field of type String does not have child fields") 4366 }, 4367 } 4368 return fc, nil 4369 } 4370 4371 // endregion **************************** field.gotpl ***************************** 4372 4373 // region **************************** input.gotpl ***************************** 4374 4375 func (ec *executionContext) unmarshalInputCreateFollowingTeacherInput(ctx context.Context, obj interface{}) (model.CreateFollowingTeacherInput, error) { 4376 var it model.CreateFollowingTeacherInput 4377 asMap := map[string]interface{}{} 4378 for k, v := range obj.(map[string]interface{}) { 4379 asMap[k] = v 4380 } 4381 4382 fieldsInOrder := [...]string{"teacherIdOrUrl"} 4383 for _, k := range fieldsInOrder { 4384 v, ok := asMap[k] 4385 if !ok { 4386 continue 4387 } 4388 switch k { 4389 case "teacherIdOrUrl": 4390 var err error 4391 4392 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teacherIdOrUrl")) 4393 data, err := ec.unmarshalNString2string(ctx, v) 4394 if err != nil { 4395 return it, err 4396 } 4397 it.TeacherIDOrURL = data 4398 } 4399 } 4400 4401 return it, nil 4402 } 4403 4404 func (ec *executionContext) unmarshalInputDeleteFollowingTeachersInput(ctx context.Context, obj interface{}) (model.DeleteFollowingTeachersInput, error) { 4405 var it model.DeleteFollowingTeachersInput 4406 asMap := map[string]interface{}{} 4407 for k, v := range obj.(map[string]interface{}) { 4408 asMap[k] = v 4409 } 4410 4411 fieldsInOrder := [...]string{"teacherIds"} 4412 for _, k := range fieldsInOrder { 4413 v, ok := asMap[k] 4414 if !ok { 4415 continue 4416 } 4417 switch k { 4418 case "teacherIds": 4419 var err error 4420 4421 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teacherIds")) 4422 data, err := ec.unmarshalNID2ᚕstringᚄ(ctx, v) 4423 if err != nil { 4424 return it, err 4425 } 4426 it.TeacherIds = data 4427 } 4428 } 4429 4430 return it, nil 4431 } 4432 4433 func (ec *executionContext) unmarshalInputNotificationTimeSpanInput(ctx context.Context, obj interface{}) (model.NotificationTimeSpanInput, error) { 4434 var it model.NotificationTimeSpanInput 4435 asMap := map[string]interface{}{} 4436 for k, v := range obj.(map[string]interface{}) { 4437 asMap[k] = v 4438 } 4439 4440 fieldsInOrder := [...]string{"fromHour", "fromMinute", "toHour", "toMinute"} 4441 for _, k := range fieldsInOrder { 4442 v, ok := asMap[k] 4443 if !ok { 4444 continue 4445 } 4446 switch k { 4447 case "fromHour": 4448 var err error 4449 4450 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fromHour")) 4451 data, err := ec.unmarshalNInt2int(ctx, v) 4452 if err != nil { 4453 return it, err 4454 } 4455 it.FromHour = data 4456 case "fromMinute": 4457 var err error 4458 4459 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fromMinute")) 4460 data, err := ec.unmarshalNInt2int(ctx, v) 4461 if err != nil { 4462 return it, err 4463 } 4464 it.FromMinute = data 4465 case "toHour": 4466 var err error 4467 4468 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toHour")) 4469 data, err := ec.unmarshalNInt2int(ctx, v) 4470 if err != nil { 4471 return it, err 4472 } 4473 it.ToHour = data 4474 case "toMinute": 4475 var err error 4476 4477 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toMinute")) 4478 data, err := ec.unmarshalNInt2int(ctx, v) 4479 if err != nil { 4480 return it, err 4481 } 4482 it.ToMinute = data 4483 } 4484 } 4485 4486 return it, nil 4487 } 4488 4489 func (ec *executionContext) unmarshalInputUpdateNotificationTimeSpansInput(ctx context.Context, obj interface{}) (model.UpdateNotificationTimeSpansInput, error) { 4490 var it model.UpdateNotificationTimeSpansInput 4491 asMap := map[string]interface{}{} 4492 for k, v := range obj.(map[string]interface{}) { 4493 asMap[k] = v 4494 } 4495 4496 fieldsInOrder := [...]string{"timeSpans"} 4497 for _, k := range fieldsInOrder { 4498 v, ok := asMap[k] 4499 if !ok { 4500 continue 4501 } 4502 switch k { 4503 case "timeSpans": 4504 var err error 4505 4506 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timeSpans")) 4507 data, err := ec.unmarshalNNotificationTimeSpanInput2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanInputᚄ(ctx, v) 4508 if err != nil { 4509 return it, err 4510 } 4511 it.TimeSpans = data 4512 } 4513 } 4514 4515 return it, nil 4516 } 4517 4518 func (ec *executionContext) unmarshalInputUpdateViewerInput(ctx context.Context, obj interface{}) (model.UpdateViewerInput, error) { 4519 var it model.UpdateViewerInput 4520 asMap := map[string]interface{}{} 4521 for k, v := range obj.(map[string]interface{}) { 4522 asMap[k] = v 4523 } 4524 4525 fieldsInOrder := [...]string{"email"} 4526 for _, k := range fieldsInOrder { 4527 v, ok := asMap[k] 4528 if !ok { 4529 continue 4530 } 4531 switch k { 4532 case "email": 4533 var err error 4534 4535 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email")) 4536 data, err := ec.unmarshalOString2ᚖstring(ctx, v) 4537 if err != nil { 4538 return it, err 4539 } 4540 it.Email = data 4541 } 4542 } 4543 4544 return it, nil 4545 } 4546 4547 // endregion **************************** input.gotpl ***************************** 4548 4549 // region ************************** interface.gotpl *************************** 4550 4551 func (ec *executionContext) _Connection(ctx context.Context, sel ast.SelectionSet, obj model.Connection) graphql.Marshaler { 4552 switch obj := (obj).(type) { 4553 case nil: 4554 return graphql.Null 4555 case model.FollowingTeacherConnection: 4556 return ec._FollowingTeacherConnection(ctx, sel, &obj) 4557 case *model.FollowingTeacherConnection: 4558 if obj == nil { 4559 return graphql.Null 4560 } 4561 return ec._FollowingTeacherConnection(ctx, sel, obj) 4562 default: 4563 panic(fmt.Errorf("unexpected type %T", obj)) 4564 } 4565 } 4566 4567 func (ec *executionContext) _Edge(ctx context.Context, sel ast.SelectionSet, obj model.Edge) graphql.Marshaler { 4568 switch obj := (obj).(type) { 4569 case nil: 4570 return graphql.Null 4571 case model.FollowingTeacherEdge: 4572 return ec._FollowingTeacherEdge(ctx, sel, &obj) 4573 case *model.FollowingTeacherEdge: 4574 if obj == nil { 4575 return graphql.Null 4576 } 4577 return ec._FollowingTeacherEdge(ctx, sel, obj) 4578 default: 4579 panic(fmt.Errorf("unexpected type %T", obj)) 4580 } 4581 } 4582 4583 func (ec *executionContext) _Node(ctx context.Context, sel ast.SelectionSet, obj model.Node) graphql.Marshaler { 4584 switch obj := (obj).(type) { 4585 case nil: 4586 return graphql.Null 4587 case model.FollowingTeacher: 4588 return ec._FollowingTeacher(ctx, sel, &obj) 4589 case *model.FollowingTeacher: 4590 if obj == nil { 4591 return graphql.Null 4592 } 4593 return ec._FollowingTeacher(ctx, sel, obj) 4594 default: 4595 panic(fmt.Errorf("unexpected type %T", obj)) 4596 } 4597 } 4598 4599 // endregion ************************** interface.gotpl *************************** 4600 4601 // region **************************** object.gotpl **************************** 4602 4603 var createFollowingTeacherPayloadImplementors = []string{"CreateFollowingTeacherPayload"} 4604 4605 func (ec *executionContext) _CreateFollowingTeacherPayload(ctx context.Context, sel ast.SelectionSet, obj *model.CreateFollowingTeacherPayload) graphql.Marshaler { 4606 fields := graphql.CollectFields(ec.OperationContext, sel, createFollowingTeacherPayloadImplementors) 4607 4608 out := graphql.NewFieldSet(fields) 4609 deferred := make(map[string]*graphql.FieldSet) 4610 for i, field := range fields { 4611 switch field.Name { 4612 case "__typename": 4613 out.Values[i] = graphql.MarshalString("CreateFollowingTeacherPayload") 4614 case "id": 4615 out.Values[i] = ec._CreateFollowingTeacherPayload_id(ctx, field, obj) 4616 if out.Values[i] == graphql.Null { 4617 out.Invalids++ 4618 } 4619 case "teacherId": 4620 out.Values[i] = ec._CreateFollowingTeacherPayload_teacherId(ctx, field, obj) 4621 if out.Values[i] == graphql.Null { 4622 out.Invalids++ 4623 } 4624 default: 4625 panic("unknown field " + strconv.Quote(field.Name)) 4626 } 4627 } 4628 out.Dispatch(ctx) 4629 if out.Invalids > 0 { 4630 return graphql.Null 4631 } 4632 4633 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 4634 4635 for label, dfs := range deferred { 4636 ec.processDeferredGroup(graphql.DeferredGroup{ 4637 Label: label, 4638 Path: graphql.GetPath(ctx), 4639 FieldSet: dfs, 4640 Context: ctx, 4641 }) 4642 } 4643 4644 return out 4645 } 4646 4647 var deleteFollowingTeachersPayloadImplementors = []string{"DeleteFollowingTeachersPayload"} 4648 4649 func (ec *executionContext) _DeleteFollowingTeachersPayload(ctx context.Context, sel ast.SelectionSet, obj *model.DeleteFollowingTeachersPayload) graphql.Marshaler { 4650 fields := graphql.CollectFields(ec.OperationContext, sel, deleteFollowingTeachersPayloadImplementors) 4651 4652 out := graphql.NewFieldSet(fields) 4653 deferred := make(map[string]*graphql.FieldSet) 4654 for i, field := range fields { 4655 switch field.Name { 4656 case "__typename": 4657 out.Values[i] = graphql.MarshalString("DeleteFollowingTeachersPayload") 4658 case "teacherIds": 4659 out.Values[i] = ec._DeleteFollowingTeachersPayload_teacherIds(ctx, field, obj) 4660 if out.Values[i] == graphql.Null { 4661 out.Invalids++ 4662 } 4663 default: 4664 panic("unknown field " + strconv.Quote(field.Name)) 4665 } 4666 } 4667 out.Dispatch(ctx) 4668 if out.Invalids > 0 { 4669 return graphql.Null 4670 } 4671 4672 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 4673 4674 for label, dfs := range deferred { 4675 ec.processDeferredGroup(graphql.DeferredGroup{ 4676 Label: label, 4677 Path: graphql.GetPath(ctx), 4678 FieldSet: dfs, 4679 Context: ctx, 4680 }) 4681 } 4682 4683 return out 4684 } 4685 4686 var emptyImplementors = []string{"Empty"} 4687 4688 func (ec *executionContext) _Empty(ctx context.Context, sel ast.SelectionSet, obj *model.Empty) graphql.Marshaler { 4689 fields := graphql.CollectFields(ec.OperationContext, sel, emptyImplementors) 4690 4691 out := graphql.NewFieldSet(fields) 4692 deferred := make(map[string]*graphql.FieldSet) 4693 for i, field := range fields { 4694 switch field.Name { 4695 case "__typename": 4696 out.Values[i] = graphql.MarshalString("Empty") 4697 case "id": 4698 out.Values[i] = ec._Empty_id(ctx, field, obj) 4699 if out.Values[i] == graphql.Null { 4700 out.Invalids++ 4701 } 4702 default: 4703 panic("unknown field " + strconv.Quote(field.Name)) 4704 } 4705 } 4706 out.Dispatch(ctx) 4707 if out.Invalids > 0 { 4708 return graphql.Null 4709 } 4710 4711 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 4712 4713 for label, dfs := range deferred { 4714 ec.processDeferredGroup(graphql.DeferredGroup{ 4715 Label: label, 4716 Path: graphql.GetPath(ctx), 4717 FieldSet: dfs, 4718 Context: ctx, 4719 }) 4720 } 4721 4722 return out 4723 } 4724 4725 var followingTeacherImplementors = []string{"FollowingTeacher", "Node"} 4726 4727 func (ec *executionContext) _FollowingTeacher(ctx context.Context, sel ast.SelectionSet, obj *model.FollowingTeacher) graphql.Marshaler { 4728 fields := graphql.CollectFields(ec.OperationContext, sel, followingTeacherImplementors) 4729 4730 out := graphql.NewFieldSet(fields) 4731 deferred := make(map[string]*graphql.FieldSet) 4732 for i, field := range fields { 4733 switch field.Name { 4734 case "__typename": 4735 out.Values[i] = graphql.MarshalString("FollowingTeacher") 4736 case "id": 4737 out.Values[i] = ec._FollowingTeacher_id(ctx, field, obj) 4738 if out.Values[i] == graphql.Null { 4739 out.Invalids++ 4740 } 4741 case "teacher": 4742 out.Values[i] = ec._FollowingTeacher_teacher(ctx, field, obj) 4743 if out.Values[i] == graphql.Null { 4744 out.Invalids++ 4745 } 4746 case "createdAt": 4747 out.Values[i] = ec._FollowingTeacher_createdAt(ctx, field, obj) 4748 if out.Values[i] == graphql.Null { 4749 out.Invalids++ 4750 } 4751 default: 4752 panic("unknown field " + strconv.Quote(field.Name)) 4753 } 4754 } 4755 out.Dispatch(ctx) 4756 if out.Invalids > 0 { 4757 return graphql.Null 4758 } 4759 4760 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 4761 4762 for label, dfs := range deferred { 4763 ec.processDeferredGroup(graphql.DeferredGroup{ 4764 Label: label, 4765 Path: graphql.GetPath(ctx), 4766 FieldSet: dfs, 4767 Context: ctx, 4768 }) 4769 } 4770 4771 return out 4772 } 4773 4774 var followingTeacherConnectionImplementors = []string{"FollowingTeacherConnection", "Connection"} 4775 4776 func (ec *executionContext) _FollowingTeacherConnection(ctx context.Context, sel ast.SelectionSet, obj *model.FollowingTeacherConnection) graphql.Marshaler { 4777 fields := graphql.CollectFields(ec.OperationContext, sel, followingTeacherConnectionImplementors) 4778 4779 out := graphql.NewFieldSet(fields) 4780 deferred := make(map[string]*graphql.FieldSet) 4781 for i, field := range fields { 4782 switch field.Name { 4783 case "__typename": 4784 out.Values[i] = graphql.MarshalString("FollowingTeacherConnection") 4785 case "pageInfo": 4786 out.Values[i] = ec._FollowingTeacherConnection_pageInfo(ctx, field, obj) 4787 if out.Values[i] == graphql.Null { 4788 out.Invalids++ 4789 } 4790 case "edges": 4791 out.Values[i] = ec._FollowingTeacherConnection_edges(ctx, field, obj) 4792 if out.Values[i] == graphql.Null { 4793 out.Invalids++ 4794 } 4795 case "nodes": 4796 out.Values[i] = ec._FollowingTeacherConnection_nodes(ctx, field, obj) 4797 if out.Values[i] == graphql.Null { 4798 out.Invalids++ 4799 } 4800 default: 4801 panic("unknown field " + strconv.Quote(field.Name)) 4802 } 4803 } 4804 out.Dispatch(ctx) 4805 if out.Invalids > 0 { 4806 return graphql.Null 4807 } 4808 4809 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 4810 4811 for label, dfs := range deferred { 4812 ec.processDeferredGroup(graphql.DeferredGroup{ 4813 Label: label, 4814 Path: graphql.GetPath(ctx), 4815 FieldSet: dfs, 4816 Context: ctx, 4817 }) 4818 } 4819 4820 return out 4821 } 4822 4823 var followingTeacherEdgeImplementors = []string{"FollowingTeacherEdge", "Edge"} 4824 4825 func (ec *executionContext) _FollowingTeacherEdge(ctx context.Context, sel ast.SelectionSet, obj *model.FollowingTeacherEdge) graphql.Marshaler { 4826 fields := graphql.CollectFields(ec.OperationContext, sel, followingTeacherEdgeImplementors) 4827 4828 out := graphql.NewFieldSet(fields) 4829 deferred := make(map[string]*graphql.FieldSet) 4830 for i, field := range fields { 4831 switch field.Name { 4832 case "__typename": 4833 out.Values[i] = graphql.MarshalString("FollowingTeacherEdge") 4834 case "cursor": 4835 out.Values[i] = ec._FollowingTeacherEdge_cursor(ctx, field, obj) 4836 if out.Values[i] == graphql.Null { 4837 out.Invalids++ 4838 } 4839 case "node": 4840 out.Values[i] = ec._FollowingTeacherEdge_node(ctx, field, obj) 4841 if out.Values[i] == graphql.Null { 4842 out.Invalids++ 4843 } 4844 default: 4845 panic("unknown field " + strconv.Quote(field.Name)) 4846 } 4847 } 4848 out.Dispatch(ctx) 4849 if out.Invalids > 0 { 4850 return graphql.Null 4851 } 4852 4853 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 4854 4855 for label, dfs := range deferred { 4856 ec.processDeferredGroup(graphql.DeferredGroup{ 4857 Label: label, 4858 Path: graphql.GetPath(ctx), 4859 FieldSet: dfs, 4860 Context: ctx, 4861 }) 4862 } 4863 4864 return out 4865 } 4866 4867 var mutationImplementors = []string{"Mutation"} 4868 4869 func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 4870 fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) 4871 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 4872 Object: "Mutation", 4873 }) 4874 4875 out := graphql.NewFieldSet(fields) 4876 deferred := make(map[string]*graphql.FieldSet) 4877 for i, field := range fields { 4878 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 4879 Object: field.Name, 4880 Field: field, 4881 }) 4882 4883 switch field.Name { 4884 case "__typename": 4885 out.Values[i] = graphql.MarshalString("Mutation") 4886 case "createEmpty": 4887 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 4888 return ec._Mutation_createEmpty(ctx, field) 4889 }) 4890 case "createFollowingTeacher": 4891 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 4892 return ec._Mutation_createFollowingTeacher(ctx, field) 4893 }) 4894 case "deleteFollowingTeachers": 4895 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 4896 return ec._Mutation_deleteFollowingTeachers(ctx, field) 4897 }) 4898 case "updateNotificationTimeSpans": 4899 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 4900 return ec._Mutation_updateNotificationTimeSpans(ctx, field) 4901 }) 4902 case "updateViewer": 4903 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 4904 return ec._Mutation_updateViewer(ctx, field) 4905 }) 4906 if out.Values[i] == graphql.Null { 4907 out.Invalids++ 4908 } 4909 default: 4910 panic("unknown field " + strconv.Quote(field.Name)) 4911 } 4912 } 4913 out.Dispatch(ctx) 4914 if out.Invalids > 0 { 4915 return graphql.Null 4916 } 4917 4918 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 4919 4920 for label, dfs := range deferred { 4921 ec.processDeferredGroup(graphql.DeferredGroup{ 4922 Label: label, 4923 Path: graphql.GetPath(ctx), 4924 FieldSet: dfs, 4925 Context: ctx, 4926 }) 4927 } 4928 4929 return out 4930 } 4931 4932 var notificationTimeSpanImplementors = []string{"NotificationTimeSpan"} 4933 4934 func (ec *executionContext) _NotificationTimeSpan(ctx context.Context, sel ast.SelectionSet, obj *model.NotificationTimeSpan) graphql.Marshaler { 4935 fields := graphql.CollectFields(ec.OperationContext, sel, notificationTimeSpanImplementors) 4936 4937 out := graphql.NewFieldSet(fields) 4938 deferred := make(map[string]*graphql.FieldSet) 4939 for i, field := range fields { 4940 switch field.Name { 4941 case "__typename": 4942 out.Values[i] = graphql.MarshalString("NotificationTimeSpan") 4943 case "fromHour": 4944 out.Values[i] = ec._NotificationTimeSpan_fromHour(ctx, field, obj) 4945 if out.Values[i] == graphql.Null { 4946 out.Invalids++ 4947 } 4948 case "fromMinute": 4949 out.Values[i] = ec._NotificationTimeSpan_fromMinute(ctx, field, obj) 4950 if out.Values[i] == graphql.Null { 4951 out.Invalids++ 4952 } 4953 case "toHour": 4954 out.Values[i] = ec._NotificationTimeSpan_toHour(ctx, field, obj) 4955 if out.Values[i] == graphql.Null { 4956 out.Invalids++ 4957 } 4958 case "toMinute": 4959 out.Values[i] = ec._NotificationTimeSpan_toMinute(ctx, field, obj) 4960 if out.Values[i] == graphql.Null { 4961 out.Invalids++ 4962 } 4963 default: 4964 panic("unknown field " + strconv.Quote(field.Name)) 4965 } 4966 } 4967 out.Dispatch(ctx) 4968 if out.Invalids > 0 { 4969 return graphql.Null 4970 } 4971 4972 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 4973 4974 for label, dfs := range deferred { 4975 ec.processDeferredGroup(graphql.DeferredGroup{ 4976 Label: label, 4977 Path: graphql.GetPath(ctx), 4978 FieldSet: dfs, 4979 Context: ctx, 4980 }) 4981 } 4982 4983 return out 4984 } 4985 4986 var notificationTimeSpanPayloadImplementors = []string{"NotificationTimeSpanPayload"} 4987 4988 func (ec *executionContext) _NotificationTimeSpanPayload(ctx context.Context, sel ast.SelectionSet, obj *model.NotificationTimeSpanPayload) graphql.Marshaler { 4989 fields := graphql.CollectFields(ec.OperationContext, sel, notificationTimeSpanPayloadImplementors) 4990 4991 out := graphql.NewFieldSet(fields) 4992 deferred := make(map[string]*graphql.FieldSet) 4993 for i, field := range fields { 4994 switch field.Name { 4995 case "__typename": 4996 out.Values[i] = graphql.MarshalString("NotificationTimeSpanPayload") 4997 case "timeSpans": 4998 out.Values[i] = ec._NotificationTimeSpanPayload_timeSpans(ctx, field, obj) 4999 default: 5000 panic("unknown field " + strconv.Quote(field.Name)) 5001 } 5002 } 5003 out.Dispatch(ctx) 5004 if out.Invalids > 0 { 5005 return graphql.Null 5006 } 5007 5008 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5009 5010 for label, dfs := range deferred { 5011 ec.processDeferredGroup(graphql.DeferredGroup{ 5012 Label: label, 5013 Path: graphql.GetPath(ctx), 5014 FieldSet: dfs, 5015 Context: ctx, 5016 }) 5017 } 5018 5019 return out 5020 } 5021 5022 var pageInfoImplementors = []string{"PageInfo"} 5023 5024 func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *model.PageInfo) graphql.Marshaler { 5025 fields := graphql.CollectFields(ec.OperationContext, sel, pageInfoImplementors) 5026 5027 out := graphql.NewFieldSet(fields) 5028 deferred := make(map[string]*graphql.FieldSet) 5029 for i, field := range fields { 5030 switch field.Name { 5031 case "__typename": 5032 out.Values[i] = graphql.MarshalString("PageInfo") 5033 case "hasNextPage": 5034 out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) 5035 if out.Values[i] == graphql.Null { 5036 out.Invalids++ 5037 } 5038 case "hasPreviousPage": 5039 out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) 5040 if out.Values[i] == graphql.Null { 5041 out.Invalids++ 5042 } 5043 default: 5044 panic("unknown field " + strconv.Quote(field.Name)) 5045 } 5046 } 5047 out.Dispatch(ctx) 5048 if out.Invalids > 0 { 5049 return graphql.Null 5050 } 5051 5052 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5053 5054 for label, dfs := range deferred { 5055 ec.processDeferredGroup(graphql.DeferredGroup{ 5056 Label: label, 5057 Path: graphql.GetPath(ctx), 5058 FieldSet: dfs, 5059 Context: ctx, 5060 }) 5061 } 5062 5063 return out 5064 } 5065 5066 var queryImplementors = []string{"Query"} 5067 5068 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 5069 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) 5070 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 5071 Object: "Query", 5072 }) 5073 5074 out := graphql.NewFieldSet(fields) 5075 deferred := make(map[string]*graphql.FieldSet) 5076 for i, field := range fields { 5077 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 5078 Object: field.Name, 5079 Field: field, 5080 }) 5081 5082 switch field.Name { 5083 case "__typename": 5084 out.Values[i] = graphql.MarshalString("Query") 5085 case "empty": 5086 field := field 5087 5088 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { 5089 defer func() { 5090 if r := recover(); r != nil { 5091 ec.Error(ctx, ec.Recover(ctx, r)) 5092 } 5093 }() 5094 res = ec._Query_empty(ctx, field) 5095 return res 5096 } 5097 5098 rrm := func(ctx context.Context) graphql.Marshaler { 5099 return ec.OperationContext.RootResolverMiddleware(ctx, 5100 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) 5101 } 5102 5103 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) 5104 case "followingTeachers": 5105 field := field 5106 5107 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { 5108 defer func() { 5109 if r := recover(); r != nil { 5110 ec.Error(ctx, ec.Recover(ctx, r)) 5111 } 5112 }() 5113 res = ec._Query_followingTeachers(ctx, field) 5114 if res == graphql.Null { 5115 atomic.AddUint32(&fs.Invalids, 1) 5116 } 5117 return res 5118 } 5119 5120 rrm := func(ctx context.Context) graphql.Marshaler { 5121 return ec.OperationContext.RootResolverMiddleware(ctx, 5122 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) 5123 } 5124 5125 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) 5126 case "viewer": 5127 field := field 5128 5129 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { 5130 defer func() { 5131 if r := recover(); r != nil { 5132 ec.Error(ctx, ec.Recover(ctx, r)) 5133 } 5134 }() 5135 res = ec._Query_viewer(ctx, field) 5136 if res == graphql.Null { 5137 atomic.AddUint32(&fs.Invalids, 1) 5138 } 5139 return res 5140 } 5141 5142 rrm := func(ctx context.Context) graphql.Marshaler { 5143 return ec.OperationContext.RootResolverMiddleware(ctx, 5144 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) 5145 } 5146 5147 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) 5148 case "__type": 5149 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 5150 return ec._Query___type(ctx, field) 5151 }) 5152 case "__schema": 5153 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 5154 return ec._Query___schema(ctx, field) 5155 }) 5156 default: 5157 panic("unknown field " + strconv.Quote(field.Name)) 5158 } 5159 } 5160 out.Dispatch(ctx) 5161 if out.Invalids > 0 { 5162 return graphql.Null 5163 } 5164 5165 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5166 5167 for label, dfs := range deferred { 5168 ec.processDeferredGroup(graphql.DeferredGroup{ 5169 Label: label, 5170 Path: graphql.GetPath(ctx), 5171 FieldSet: dfs, 5172 Context: ctx, 5173 }) 5174 } 5175 5176 return out 5177 } 5178 5179 var teacherImplementors = []string{"Teacher"} 5180 5181 func (ec *executionContext) _Teacher(ctx context.Context, sel ast.SelectionSet, obj *model.Teacher) graphql.Marshaler { 5182 fields := graphql.CollectFields(ec.OperationContext, sel, teacherImplementors) 5183 5184 out := graphql.NewFieldSet(fields) 5185 deferred := make(map[string]*graphql.FieldSet) 5186 for i, field := range fields { 5187 switch field.Name { 5188 case "__typename": 5189 out.Values[i] = graphql.MarshalString("Teacher") 5190 case "id": 5191 out.Values[i] = ec._Teacher_id(ctx, field, obj) 5192 if out.Values[i] == graphql.Null { 5193 out.Invalids++ 5194 } 5195 case "name": 5196 out.Values[i] = ec._Teacher_name(ctx, field, obj) 5197 if out.Values[i] == graphql.Null { 5198 out.Invalids++ 5199 } 5200 default: 5201 panic("unknown field " + strconv.Quote(field.Name)) 5202 } 5203 } 5204 out.Dispatch(ctx) 5205 if out.Invalids > 0 { 5206 return graphql.Null 5207 } 5208 5209 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5210 5211 for label, dfs := range deferred { 5212 ec.processDeferredGroup(graphql.DeferredGroup{ 5213 Label: label, 5214 Path: graphql.GetPath(ctx), 5215 FieldSet: dfs, 5216 Context: ctx, 5217 }) 5218 } 5219 5220 return out 5221 } 5222 5223 var userImplementors = []string{"User"} 5224 5225 func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *model.User) graphql.Marshaler { 5226 fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) 5227 5228 out := graphql.NewFieldSet(fields) 5229 deferred := make(map[string]*graphql.FieldSet) 5230 for i, field := range fields { 5231 switch field.Name { 5232 case "__typename": 5233 out.Values[i] = graphql.MarshalString("User") 5234 case "id": 5235 out.Values[i] = ec._User_id(ctx, field, obj) 5236 if out.Values[i] == graphql.Null { 5237 atomic.AddUint32(&out.Invalids, 1) 5238 } 5239 case "email": 5240 out.Values[i] = ec._User_email(ctx, field, obj) 5241 if out.Values[i] == graphql.Null { 5242 atomic.AddUint32(&out.Invalids, 1) 5243 } 5244 case "followingTeachers": 5245 field := field 5246 5247 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { 5248 defer func() { 5249 if r := recover(); r != nil { 5250 ec.Error(ctx, ec.Recover(ctx, r)) 5251 } 5252 }() 5253 res = ec._User_followingTeachers(ctx, field, obj) 5254 if res == graphql.Null { 5255 atomic.AddUint32(&fs.Invalids, 1) 5256 } 5257 return res 5258 } 5259 5260 if field.Deferrable != nil { 5261 dfs, ok := deferred[field.Deferrable.Label] 5262 di := 0 5263 if ok { 5264 dfs.AddField(field) 5265 di = len(dfs.Values) - 1 5266 } else { 5267 dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) 5268 deferred[field.Deferrable.Label] = dfs 5269 } 5270 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { 5271 return innerFunc(ctx, dfs) 5272 }) 5273 5274 // don't run the out.Concurrently() call below 5275 out.Values[i] = graphql.Null 5276 continue 5277 } 5278 5279 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) 5280 case "notificationTimeSpans": 5281 field := field 5282 5283 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { 5284 defer func() { 5285 if r := recover(); r != nil { 5286 ec.Error(ctx, ec.Recover(ctx, r)) 5287 } 5288 }() 5289 res = ec._User_notificationTimeSpans(ctx, field, obj) 5290 if res == graphql.Null { 5291 atomic.AddUint32(&fs.Invalids, 1) 5292 } 5293 return res 5294 } 5295 5296 if field.Deferrable != nil { 5297 dfs, ok := deferred[field.Deferrable.Label] 5298 di := 0 5299 if ok { 5300 dfs.AddField(field) 5301 di = len(dfs.Values) - 1 5302 } else { 5303 dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) 5304 deferred[field.Deferrable.Label] = dfs 5305 } 5306 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { 5307 return innerFunc(ctx, dfs) 5308 }) 5309 5310 // don't run the out.Concurrently() call below 5311 out.Values[i] = graphql.Null 5312 continue 5313 } 5314 5315 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) 5316 case "showTutorial": 5317 out.Values[i] = ec._User_showTutorial(ctx, field, obj) 5318 if out.Values[i] == graphql.Null { 5319 atomic.AddUint32(&out.Invalids, 1) 5320 } 5321 default: 5322 panic("unknown field " + strconv.Quote(field.Name)) 5323 } 5324 } 5325 out.Dispatch(ctx) 5326 if out.Invalids > 0 { 5327 return graphql.Null 5328 } 5329 5330 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5331 5332 for label, dfs := range deferred { 5333 ec.processDeferredGroup(graphql.DeferredGroup{ 5334 Label: label, 5335 Path: graphql.GetPath(ctx), 5336 FieldSet: dfs, 5337 Context: ctx, 5338 }) 5339 } 5340 5341 return out 5342 } 5343 5344 var __DirectiveImplementors = []string{"__Directive"} 5345 5346 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 5347 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 5348 5349 out := graphql.NewFieldSet(fields) 5350 deferred := make(map[string]*graphql.FieldSet) 5351 for i, field := range fields { 5352 switch field.Name { 5353 case "__typename": 5354 out.Values[i] = graphql.MarshalString("__Directive") 5355 case "name": 5356 out.Values[i] = ec.___Directive_name(ctx, field, obj) 5357 if out.Values[i] == graphql.Null { 5358 out.Invalids++ 5359 } 5360 case "description": 5361 out.Values[i] = ec.___Directive_description(ctx, field, obj) 5362 case "locations": 5363 out.Values[i] = ec.___Directive_locations(ctx, field, obj) 5364 if out.Values[i] == graphql.Null { 5365 out.Invalids++ 5366 } 5367 case "args": 5368 out.Values[i] = ec.___Directive_args(ctx, field, obj) 5369 if out.Values[i] == graphql.Null { 5370 out.Invalids++ 5371 } 5372 case "isRepeatable": 5373 out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) 5374 if out.Values[i] == graphql.Null { 5375 out.Invalids++ 5376 } 5377 default: 5378 panic("unknown field " + strconv.Quote(field.Name)) 5379 } 5380 } 5381 out.Dispatch(ctx) 5382 if out.Invalids > 0 { 5383 return graphql.Null 5384 } 5385 5386 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5387 5388 for label, dfs := range deferred { 5389 ec.processDeferredGroup(graphql.DeferredGroup{ 5390 Label: label, 5391 Path: graphql.GetPath(ctx), 5392 FieldSet: dfs, 5393 Context: ctx, 5394 }) 5395 } 5396 5397 return out 5398 } 5399 5400 var __EnumValueImplementors = []string{"__EnumValue"} 5401 5402 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 5403 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 5404 5405 out := graphql.NewFieldSet(fields) 5406 deferred := make(map[string]*graphql.FieldSet) 5407 for i, field := range fields { 5408 switch field.Name { 5409 case "__typename": 5410 out.Values[i] = graphql.MarshalString("__EnumValue") 5411 case "name": 5412 out.Values[i] = ec.___EnumValue_name(ctx, field, obj) 5413 if out.Values[i] == graphql.Null { 5414 out.Invalids++ 5415 } 5416 case "description": 5417 out.Values[i] = ec.___EnumValue_description(ctx, field, obj) 5418 case "isDeprecated": 5419 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) 5420 if out.Values[i] == graphql.Null { 5421 out.Invalids++ 5422 } 5423 case "deprecationReason": 5424 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) 5425 default: 5426 panic("unknown field " + strconv.Quote(field.Name)) 5427 } 5428 } 5429 out.Dispatch(ctx) 5430 if out.Invalids > 0 { 5431 return graphql.Null 5432 } 5433 5434 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5435 5436 for label, dfs := range deferred { 5437 ec.processDeferredGroup(graphql.DeferredGroup{ 5438 Label: label, 5439 Path: graphql.GetPath(ctx), 5440 FieldSet: dfs, 5441 Context: ctx, 5442 }) 5443 } 5444 5445 return out 5446 } 5447 5448 var __FieldImplementors = []string{"__Field"} 5449 5450 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 5451 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 5452 5453 out := graphql.NewFieldSet(fields) 5454 deferred := make(map[string]*graphql.FieldSet) 5455 for i, field := range fields { 5456 switch field.Name { 5457 case "__typename": 5458 out.Values[i] = graphql.MarshalString("__Field") 5459 case "name": 5460 out.Values[i] = ec.___Field_name(ctx, field, obj) 5461 if out.Values[i] == graphql.Null { 5462 out.Invalids++ 5463 } 5464 case "description": 5465 out.Values[i] = ec.___Field_description(ctx, field, obj) 5466 case "args": 5467 out.Values[i] = ec.___Field_args(ctx, field, obj) 5468 if out.Values[i] == graphql.Null { 5469 out.Invalids++ 5470 } 5471 case "type": 5472 out.Values[i] = ec.___Field_type(ctx, field, obj) 5473 if out.Values[i] == graphql.Null { 5474 out.Invalids++ 5475 } 5476 case "isDeprecated": 5477 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) 5478 if out.Values[i] == graphql.Null { 5479 out.Invalids++ 5480 } 5481 case "deprecationReason": 5482 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) 5483 default: 5484 panic("unknown field " + strconv.Quote(field.Name)) 5485 } 5486 } 5487 out.Dispatch(ctx) 5488 if out.Invalids > 0 { 5489 return graphql.Null 5490 } 5491 5492 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5493 5494 for label, dfs := range deferred { 5495 ec.processDeferredGroup(graphql.DeferredGroup{ 5496 Label: label, 5497 Path: graphql.GetPath(ctx), 5498 FieldSet: dfs, 5499 Context: ctx, 5500 }) 5501 } 5502 5503 return out 5504 } 5505 5506 var __InputValueImplementors = []string{"__InputValue"} 5507 5508 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 5509 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 5510 5511 out := graphql.NewFieldSet(fields) 5512 deferred := make(map[string]*graphql.FieldSet) 5513 for i, field := range fields { 5514 switch field.Name { 5515 case "__typename": 5516 out.Values[i] = graphql.MarshalString("__InputValue") 5517 case "name": 5518 out.Values[i] = ec.___InputValue_name(ctx, field, obj) 5519 if out.Values[i] == graphql.Null { 5520 out.Invalids++ 5521 } 5522 case "description": 5523 out.Values[i] = ec.___InputValue_description(ctx, field, obj) 5524 case "type": 5525 out.Values[i] = ec.___InputValue_type(ctx, field, obj) 5526 if out.Values[i] == graphql.Null { 5527 out.Invalids++ 5528 } 5529 case "defaultValue": 5530 out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) 5531 default: 5532 panic("unknown field " + strconv.Quote(field.Name)) 5533 } 5534 } 5535 out.Dispatch(ctx) 5536 if out.Invalids > 0 { 5537 return graphql.Null 5538 } 5539 5540 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5541 5542 for label, dfs := range deferred { 5543 ec.processDeferredGroup(graphql.DeferredGroup{ 5544 Label: label, 5545 Path: graphql.GetPath(ctx), 5546 FieldSet: dfs, 5547 Context: ctx, 5548 }) 5549 } 5550 5551 return out 5552 } 5553 5554 var __SchemaImplementors = []string{"__Schema"} 5555 5556 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 5557 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 5558 5559 out := graphql.NewFieldSet(fields) 5560 deferred := make(map[string]*graphql.FieldSet) 5561 for i, field := range fields { 5562 switch field.Name { 5563 case "__typename": 5564 out.Values[i] = graphql.MarshalString("__Schema") 5565 case "description": 5566 out.Values[i] = ec.___Schema_description(ctx, field, obj) 5567 case "types": 5568 out.Values[i] = ec.___Schema_types(ctx, field, obj) 5569 if out.Values[i] == graphql.Null { 5570 out.Invalids++ 5571 } 5572 case "queryType": 5573 out.Values[i] = ec.___Schema_queryType(ctx, field, obj) 5574 if out.Values[i] == graphql.Null { 5575 out.Invalids++ 5576 } 5577 case "mutationType": 5578 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) 5579 case "subscriptionType": 5580 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) 5581 case "directives": 5582 out.Values[i] = ec.___Schema_directives(ctx, field, obj) 5583 if out.Values[i] == graphql.Null { 5584 out.Invalids++ 5585 } 5586 default: 5587 panic("unknown field " + strconv.Quote(field.Name)) 5588 } 5589 } 5590 out.Dispatch(ctx) 5591 if out.Invalids > 0 { 5592 return graphql.Null 5593 } 5594 5595 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5596 5597 for label, dfs := range deferred { 5598 ec.processDeferredGroup(graphql.DeferredGroup{ 5599 Label: label, 5600 Path: graphql.GetPath(ctx), 5601 FieldSet: dfs, 5602 Context: ctx, 5603 }) 5604 } 5605 5606 return out 5607 } 5608 5609 var __TypeImplementors = []string{"__Type"} 5610 5611 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 5612 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 5613 5614 out := graphql.NewFieldSet(fields) 5615 deferred := make(map[string]*graphql.FieldSet) 5616 for i, field := range fields { 5617 switch field.Name { 5618 case "__typename": 5619 out.Values[i] = graphql.MarshalString("__Type") 5620 case "kind": 5621 out.Values[i] = ec.___Type_kind(ctx, field, obj) 5622 if out.Values[i] == graphql.Null { 5623 out.Invalids++ 5624 } 5625 case "name": 5626 out.Values[i] = ec.___Type_name(ctx, field, obj) 5627 case "description": 5628 out.Values[i] = ec.___Type_description(ctx, field, obj) 5629 case "fields": 5630 out.Values[i] = ec.___Type_fields(ctx, field, obj) 5631 case "interfaces": 5632 out.Values[i] = ec.___Type_interfaces(ctx, field, obj) 5633 case "possibleTypes": 5634 out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) 5635 case "enumValues": 5636 out.Values[i] = ec.___Type_enumValues(ctx, field, obj) 5637 case "inputFields": 5638 out.Values[i] = ec.___Type_inputFields(ctx, field, obj) 5639 case "ofType": 5640 out.Values[i] = ec.___Type_ofType(ctx, field, obj) 5641 case "specifiedByURL": 5642 out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) 5643 default: 5644 panic("unknown field " + strconv.Quote(field.Name)) 5645 } 5646 } 5647 out.Dispatch(ctx) 5648 if out.Invalids > 0 { 5649 return graphql.Null 5650 } 5651 5652 atomic.AddInt32(&ec.deferred, int32(len(deferred))) 5653 5654 for label, dfs := range deferred { 5655 ec.processDeferredGroup(graphql.DeferredGroup{ 5656 Label: label, 5657 Path: graphql.GetPath(ctx), 5658 FieldSet: dfs, 5659 Context: ctx, 5660 }) 5661 } 5662 5663 return out 5664 } 5665 5666 // endregion **************************** object.gotpl **************************** 5667 5668 // region ***************************** type.gotpl ***************************** 5669 5670 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 5671 res, err := graphql.UnmarshalBoolean(v) 5672 return res, graphql.ErrorOnPath(ctx, err) 5673 } 5674 5675 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 5676 res := graphql.MarshalBoolean(v) 5677 if res == graphql.Null { 5678 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5679 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5680 } 5681 } 5682 return res 5683 } 5684 5685 func (ec *executionContext) unmarshalNCreateFollowingTeacherInput2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐCreateFollowingTeacherInput(ctx context.Context, v interface{}) (model.CreateFollowingTeacherInput, error) { 5686 res, err := ec.unmarshalInputCreateFollowingTeacherInput(ctx, v) 5687 return res, graphql.ErrorOnPath(ctx, err) 5688 } 5689 5690 func (ec *executionContext) unmarshalNDeleteFollowingTeachersInput2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐDeleteFollowingTeachersInput(ctx context.Context, v interface{}) (model.DeleteFollowingTeachersInput, error) { 5691 res, err := ec.unmarshalInputDeleteFollowingTeachersInput(ctx, v) 5692 return res, graphql.ErrorOnPath(ctx, err) 5693 } 5694 5695 func (ec *executionContext) marshalNFollowingTeacher2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.FollowingTeacher) graphql.Marshaler { 5696 ret := make(graphql.Array, len(v)) 5697 var wg sync.WaitGroup 5698 isLen1 := len(v) == 1 5699 if !isLen1 { 5700 wg.Add(len(v)) 5701 } 5702 for i := range v { 5703 i := i 5704 fc := &graphql.FieldContext{ 5705 Index: &i, 5706 Result: &v[i], 5707 } 5708 ctx := graphql.WithFieldContext(ctx, fc) 5709 f := func(i int) { 5710 defer func() { 5711 if r := recover(); r != nil { 5712 ec.Error(ctx, ec.Recover(ctx, r)) 5713 ret = nil 5714 } 5715 }() 5716 if !isLen1 { 5717 defer wg.Done() 5718 } 5719 ret[i] = ec.marshalNFollowingTeacher2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacher(ctx, sel, v[i]) 5720 } 5721 if isLen1 { 5722 f(i) 5723 } else { 5724 go f(i) 5725 } 5726 5727 } 5728 wg.Wait() 5729 5730 for _, e := range ret { 5731 if e == graphql.Null { 5732 return graphql.Null 5733 } 5734 } 5735 5736 return ret 5737 } 5738 5739 func (ec *executionContext) marshalNFollowingTeacher2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacher(ctx context.Context, sel ast.SelectionSet, v *model.FollowingTeacher) graphql.Marshaler { 5740 if v == nil { 5741 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5742 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5743 } 5744 return graphql.Null 5745 } 5746 return ec._FollowingTeacher(ctx, sel, v) 5747 } 5748 5749 func (ec *executionContext) marshalNFollowingTeacherConnection2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherConnection(ctx context.Context, sel ast.SelectionSet, v model.FollowingTeacherConnection) graphql.Marshaler { 5750 return ec._FollowingTeacherConnection(ctx, sel, &v) 5751 } 5752 5753 func (ec *executionContext) marshalNFollowingTeacherConnection2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherConnection(ctx context.Context, sel ast.SelectionSet, v *model.FollowingTeacherConnection) graphql.Marshaler { 5754 if v == nil { 5755 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5756 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5757 } 5758 return graphql.Null 5759 } 5760 return ec._FollowingTeacherConnection(ctx, sel, v) 5761 } 5762 5763 func (ec *executionContext) marshalNFollowingTeacherEdge2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.FollowingTeacherEdge) graphql.Marshaler { 5764 ret := make(graphql.Array, len(v)) 5765 var wg sync.WaitGroup 5766 isLen1 := len(v) == 1 5767 if !isLen1 { 5768 wg.Add(len(v)) 5769 } 5770 for i := range v { 5771 i := i 5772 fc := &graphql.FieldContext{ 5773 Index: &i, 5774 Result: &v[i], 5775 } 5776 ctx := graphql.WithFieldContext(ctx, fc) 5777 f := func(i int) { 5778 defer func() { 5779 if r := recover(); r != nil { 5780 ec.Error(ctx, ec.Recover(ctx, r)) 5781 ret = nil 5782 } 5783 }() 5784 if !isLen1 { 5785 defer wg.Done() 5786 } 5787 ret[i] = ec.marshalNFollowingTeacherEdge2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherEdge(ctx, sel, v[i]) 5788 } 5789 if isLen1 { 5790 f(i) 5791 } else { 5792 go f(i) 5793 } 5794 5795 } 5796 wg.Wait() 5797 5798 for _, e := range ret { 5799 if e == graphql.Null { 5800 return graphql.Null 5801 } 5802 } 5803 5804 return ret 5805 } 5806 5807 func (ec *executionContext) marshalNFollowingTeacherEdge2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐFollowingTeacherEdge(ctx context.Context, sel ast.SelectionSet, v *model.FollowingTeacherEdge) graphql.Marshaler { 5808 if v == nil { 5809 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5810 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5811 } 5812 return graphql.Null 5813 } 5814 return ec._FollowingTeacherEdge(ctx, sel, v) 5815 } 5816 5817 func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { 5818 res, err := graphql.UnmarshalID(v) 5819 return res, graphql.ErrorOnPath(ctx, err) 5820 } 5821 5822 func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 5823 res := graphql.MarshalID(v) 5824 if res == graphql.Null { 5825 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5826 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5827 } 5828 } 5829 return res 5830 } 5831 5832 func (ec *executionContext) unmarshalNID2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 5833 var vSlice []interface{} 5834 if v != nil { 5835 vSlice = graphql.CoerceList(v) 5836 } 5837 var err error 5838 res := make([]string, len(vSlice)) 5839 for i := range vSlice { 5840 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 5841 res[i], err = ec.unmarshalNID2string(ctx, vSlice[i]) 5842 if err != nil { 5843 return nil, err 5844 } 5845 } 5846 return res, nil 5847 } 5848 5849 func (ec *executionContext) marshalNID2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 5850 ret := make(graphql.Array, len(v)) 5851 for i := range v { 5852 ret[i] = ec.marshalNID2string(ctx, sel, v[i]) 5853 } 5854 5855 for _, e := range ret { 5856 if e == graphql.Null { 5857 return graphql.Null 5858 } 5859 } 5860 5861 return ret 5862 } 5863 5864 func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { 5865 res, err := graphql.UnmarshalInt(v) 5866 return res, graphql.ErrorOnPath(ctx, err) 5867 } 5868 5869 func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 5870 res := graphql.MarshalInt(v) 5871 if res == graphql.Null { 5872 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5873 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5874 } 5875 } 5876 return res 5877 } 5878 5879 func (ec *executionContext) marshalNNotificationTimeSpan2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.NotificationTimeSpan) graphql.Marshaler { 5880 ret := make(graphql.Array, len(v)) 5881 var wg sync.WaitGroup 5882 isLen1 := len(v) == 1 5883 if !isLen1 { 5884 wg.Add(len(v)) 5885 } 5886 for i := range v { 5887 i := i 5888 fc := &graphql.FieldContext{ 5889 Index: &i, 5890 Result: &v[i], 5891 } 5892 ctx := graphql.WithFieldContext(ctx, fc) 5893 f := func(i int) { 5894 defer func() { 5895 if r := recover(); r != nil { 5896 ec.Error(ctx, ec.Recover(ctx, r)) 5897 ret = nil 5898 } 5899 }() 5900 if !isLen1 { 5901 defer wg.Done() 5902 } 5903 ret[i] = ec.marshalNNotificationTimeSpan2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpan(ctx, sel, v[i]) 5904 } 5905 if isLen1 { 5906 f(i) 5907 } else { 5908 go f(i) 5909 } 5910 5911 } 5912 wg.Wait() 5913 5914 for _, e := range ret { 5915 if e == graphql.Null { 5916 return graphql.Null 5917 } 5918 } 5919 5920 return ret 5921 } 5922 5923 func (ec *executionContext) marshalNNotificationTimeSpan2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpan(ctx context.Context, sel ast.SelectionSet, v *model.NotificationTimeSpan) graphql.Marshaler { 5924 if v == nil { 5925 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5926 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5927 } 5928 return graphql.Null 5929 } 5930 return ec._NotificationTimeSpan(ctx, sel, v) 5931 } 5932 5933 func (ec *executionContext) unmarshalNNotificationTimeSpanInput2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanInputᚄ(ctx context.Context, v interface{}) ([]*model.NotificationTimeSpanInput, error) { 5934 var vSlice []interface{} 5935 if v != nil { 5936 vSlice = graphql.CoerceList(v) 5937 } 5938 var err error 5939 res := make([]*model.NotificationTimeSpanInput, len(vSlice)) 5940 for i := range vSlice { 5941 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 5942 res[i], err = ec.unmarshalNNotificationTimeSpanInput2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanInput(ctx, vSlice[i]) 5943 if err != nil { 5944 return nil, err 5945 } 5946 } 5947 return res, nil 5948 } 5949 5950 func (ec *executionContext) unmarshalNNotificationTimeSpanInput2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanInput(ctx context.Context, v interface{}) (*model.NotificationTimeSpanInput, error) { 5951 res, err := ec.unmarshalInputNotificationTimeSpanInput(ctx, v) 5952 return &res, graphql.ErrorOnPath(ctx, err) 5953 } 5954 5955 func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *model.PageInfo) graphql.Marshaler { 5956 if v == nil { 5957 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5958 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5959 } 5960 return graphql.Null 5961 } 5962 return ec._PageInfo(ctx, sel, v) 5963 } 5964 5965 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 5966 res, err := graphql.UnmarshalString(v) 5967 return res, graphql.ErrorOnPath(ctx, err) 5968 } 5969 5970 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 5971 res := graphql.MarshalString(v) 5972 if res == graphql.Null { 5973 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5974 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5975 } 5976 } 5977 return res 5978 } 5979 5980 func (ec *executionContext) marshalNTeacher2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐTeacher(ctx context.Context, sel ast.SelectionSet, v *model.Teacher) graphql.Marshaler { 5981 if v == nil { 5982 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 5983 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 5984 } 5985 return graphql.Null 5986 } 5987 return ec._Teacher(ctx, sel, v) 5988 } 5989 5990 func (ec *executionContext) unmarshalNUpdateNotificationTimeSpansInput2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐUpdateNotificationTimeSpansInput(ctx context.Context, v interface{}) (model.UpdateNotificationTimeSpansInput, error) { 5991 res, err := ec.unmarshalInputUpdateNotificationTimeSpansInput(ctx, v) 5992 return res, graphql.ErrorOnPath(ctx, err) 5993 } 5994 5995 func (ec *executionContext) unmarshalNUpdateViewerInput2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐUpdateViewerInput(ctx context.Context, v interface{}) (model.UpdateViewerInput, error) { 5996 res, err := ec.unmarshalInputUpdateViewerInput(ctx, v) 5997 return res, graphql.ErrorOnPath(ctx, err) 5998 } 5999 6000 func (ec *executionContext) marshalNUser2githubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v model.User) graphql.Marshaler { 6001 return ec._User(ctx, sel, &v) 6002 } 6003 6004 func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler { 6005 if v == nil { 6006 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 6007 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 6008 } 6009 return graphql.Null 6010 } 6011 return ec._User(ctx, sel, v) 6012 } 6013 6014 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 6015 return ec.___Directive(ctx, sel, &v) 6016 } 6017 6018 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 6019 ret := make(graphql.Array, len(v)) 6020 var wg sync.WaitGroup 6021 isLen1 := len(v) == 1 6022 if !isLen1 { 6023 wg.Add(len(v)) 6024 } 6025 for i := range v { 6026 i := i 6027 fc := &graphql.FieldContext{ 6028 Index: &i, 6029 Result: &v[i], 6030 } 6031 ctx := graphql.WithFieldContext(ctx, fc) 6032 f := func(i int) { 6033 defer func() { 6034 if r := recover(); r != nil { 6035 ec.Error(ctx, ec.Recover(ctx, r)) 6036 ret = nil 6037 } 6038 }() 6039 if !isLen1 { 6040 defer wg.Done() 6041 } 6042 ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 6043 } 6044 if isLen1 { 6045 f(i) 6046 } else { 6047 go f(i) 6048 } 6049 6050 } 6051 wg.Wait() 6052 6053 for _, e := range ret { 6054 if e == graphql.Null { 6055 return graphql.Null 6056 } 6057 } 6058 6059 return ret 6060 } 6061 6062 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 6063 res, err := graphql.UnmarshalString(v) 6064 return res, graphql.ErrorOnPath(ctx, err) 6065 } 6066 6067 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 6068 res := graphql.MarshalString(v) 6069 if res == graphql.Null { 6070 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 6071 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 6072 } 6073 } 6074 return res 6075 } 6076 6077 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 6078 var vSlice []interface{} 6079 if v != nil { 6080 vSlice = graphql.CoerceList(v) 6081 } 6082 var err error 6083 res := make([]string, len(vSlice)) 6084 for i := range vSlice { 6085 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 6086 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 6087 if err != nil { 6088 return nil, err 6089 } 6090 } 6091 return res, nil 6092 } 6093 6094 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 6095 ret := make(graphql.Array, len(v)) 6096 var wg sync.WaitGroup 6097 isLen1 := len(v) == 1 6098 if !isLen1 { 6099 wg.Add(len(v)) 6100 } 6101 for i := range v { 6102 i := i 6103 fc := &graphql.FieldContext{ 6104 Index: &i, 6105 Result: &v[i], 6106 } 6107 ctx := graphql.WithFieldContext(ctx, fc) 6108 f := func(i int) { 6109 defer func() { 6110 if r := recover(); r != nil { 6111 ec.Error(ctx, ec.Recover(ctx, r)) 6112 ret = nil 6113 } 6114 }() 6115 if !isLen1 { 6116 defer wg.Done() 6117 } 6118 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 6119 } 6120 if isLen1 { 6121 f(i) 6122 } else { 6123 go f(i) 6124 } 6125 6126 } 6127 wg.Wait() 6128 6129 for _, e := range ret { 6130 if e == graphql.Null { 6131 return graphql.Null 6132 } 6133 } 6134 6135 return ret 6136 } 6137 6138 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 6139 return ec.___EnumValue(ctx, sel, &v) 6140 } 6141 6142 func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 6143 return ec.___Field(ctx, sel, &v) 6144 } 6145 6146 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 6147 return ec.___InputValue(ctx, sel, &v) 6148 } 6149 6150 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 6151 ret := make(graphql.Array, len(v)) 6152 var wg sync.WaitGroup 6153 isLen1 := len(v) == 1 6154 if !isLen1 { 6155 wg.Add(len(v)) 6156 } 6157 for i := range v { 6158 i := i 6159 fc := &graphql.FieldContext{ 6160 Index: &i, 6161 Result: &v[i], 6162 } 6163 ctx := graphql.WithFieldContext(ctx, fc) 6164 f := func(i int) { 6165 defer func() { 6166 if r := recover(); r != nil { 6167 ec.Error(ctx, ec.Recover(ctx, r)) 6168 ret = nil 6169 } 6170 }() 6171 if !isLen1 { 6172 defer wg.Done() 6173 } 6174 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 6175 } 6176 if isLen1 { 6177 f(i) 6178 } else { 6179 go f(i) 6180 } 6181 6182 } 6183 wg.Wait() 6184 6185 for _, e := range ret { 6186 if e == graphql.Null { 6187 return graphql.Null 6188 } 6189 } 6190 6191 return ret 6192 } 6193 6194 func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 6195 return ec.___Type(ctx, sel, &v) 6196 } 6197 6198 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 6199 ret := make(graphql.Array, len(v)) 6200 var wg sync.WaitGroup 6201 isLen1 := len(v) == 1 6202 if !isLen1 { 6203 wg.Add(len(v)) 6204 } 6205 for i := range v { 6206 i := i 6207 fc := &graphql.FieldContext{ 6208 Index: &i, 6209 Result: &v[i], 6210 } 6211 ctx := graphql.WithFieldContext(ctx, fc) 6212 f := func(i int) { 6213 defer func() { 6214 if r := recover(); r != nil { 6215 ec.Error(ctx, ec.Recover(ctx, r)) 6216 ret = nil 6217 } 6218 }() 6219 if !isLen1 { 6220 defer wg.Done() 6221 } 6222 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 6223 } 6224 if isLen1 { 6225 f(i) 6226 } else { 6227 go f(i) 6228 } 6229 6230 } 6231 wg.Wait() 6232 6233 for _, e := range ret { 6234 if e == graphql.Null { 6235 return graphql.Null 6236 } 6237 } 6238 6239 return ret 6240 } 6241 6242 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 6243 if v == nil { 6244 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 6245 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 6246 } 6247 return graphql.Null 6248 } 6249 return ec.___Type(ctx, sel, v) 6250 } 6251 6252 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 6253 res, err := graphql.UnmarshalString(v) 6254 return res, graphql.ErrorOnPath(ctx, err) 6255 } 6256 6257 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 6258 res := graphql.MarshalString(v) 6259 if res == graphql.Null { 6260 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 6261 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 6262 } 6263 } 6264 return res 6265 } 6266 6267 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 6268 res, err := graphql.UnmarshalBoolean(v) 6269 return res, graphql.ErrorOnPath(ctx, err) 6270 } 6271 6272 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 6273 res := graphql.MarshalBoolean(v) 6274 return res 6275 } 6276 6277 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 6278 if v == nil { 6279 return nil, nil 6280 } 6281 res, err := graphql.UnmarshalBoolean(v) 6282 return &res, graphql.ErrorOnPath(ctx, err) 6283 } 6284 6285 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 6286 if v == nil { 6287 return graphql.Null 6288 } 6289 res := graphql.MarshalBoolean(*v) 6290 return res 6291 } 6292 6293 func (ec *executionContext) marshalOCreateFollowingTeacherPayload2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐCreateFollowingTeacherPayload(ctx context.Context, sel ast.SelectionSet, v *model.CreateFollowingTeacherPayload) graphql.Marshaler { 6294 if v == nil { 6295 return graphql.Null 6296 } 6297 return ec._CreateFollowingTeacherPayload(ctx, sel, v) 6298 } 6299 6300 func (ec *executionContext) marshalODeleteFollowingTeachersPayload2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐDeleteFollowingTeachersPayload(ctx context.Context, sel ast.SelectionSet, v *model.DeleteFollowingTeachersPayload) graphql.Marshaler { 6301 if v == nil { 6302 return graphql.Null 6303 } 6304 return ec._DeleteFollowingTeachersPayload(ctx, sel, v) 6305 } 6306 6307 func (ec *executionContext) marshalOEmpty2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐEmpty(ctx context.Context, sel ast.SelectionSet, v *model.Empty) graphql.Marshaler { 6308 if v == nil { 6309 return graphql.Null 6310 } 6311 return ec._Empty(ctx, sel, v) 6312 } 6313 6314 func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { 6315 if v == nil { 6316 return nil, nil 6317 } 6318 res, err := graphql.UnmarshalInt(v) 6319 return &res, graphql.ErrorOnPath(ctx, err) 6320 } 6321 6322 func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { 6323 if v == nil { 6324 return graphql.Null 6325 } 6326 res := graphql.MarshalInt(*v) 6327 return res 6328 } 6329 6330 func (ec *executionContext) marshalONotificationTimeSpan2ᚕᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.NotificationTimeSpan) graphql.Marshaler { 6331 if v == nil { 6332 return graphql.Null 6333 } 6334 ret := make(graphql.Array, len(v)) 6335 var wg sync.WaitGroup 6336 isLen1 := len(v) == 1 6337 if !isLen1 { 6338 wg.Add(len(v)) 6339 } 6340 for i := range v { 6341 i := i 6342 fc := &graphql.FieldContext{ 6343 Index: &i, 6344 Result: &v[i], 6345 } 6346 ctx := graphql.WithFieldContext(ctx, fc) 6347 f := func(i int) { 6348 defer func() { 6349 if r := recover(); r != nil { 6350 ec.Error(ctx, ec.Recover(ctx, r)) 6351 ret = nil 6352 } 6353 }() 6354 if !isLen1 { 6355 defer wg.Done() 6356 } 6357 ret[i] = ec.marshalNNotificationTimeSpan2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpan(ctx, sel, v[i]) 6358 } 6359 if isLen1 { 6360 f(i) 6361 } else { 6362 go f(i) 6363 } 6364 6365 } 6366 wg.Wait() 6367 6368 for _, e := range ret { 6369 if e == graphql.Null { 6370 return graphql.Null 6371 } 6372 } 6373 6374 return ret 6375 } 6376 6377 func (ec *executionContext) marshalONotificationTimeSpanPayload2ᚖgithubᚗcomᚋoinumeᚋlekcijeᚋbackendᚋinterfaceᚋgraphqlᚋmodelᚐNotificationTimeSpanPayload(ctx context.Context, sel ast.SelectionSet, v *model.NotificationTimeSpanPayload) graphql.Marshaler { 6378 if v == nil { 6379 return graphql.Null 6380 } 6381 return ec._NotificationTimeSpanPayload(ctx, sel, v) 6382 } 6383 6384 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 6385 if v == nil { 6386 return nil, nil 6387 } 6388 res, err := graphql.UnmarshalString(v) 6389 return &res, graphql.ErrorOnPath(ctx, err) 6390 } 6391 6392 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 6393 if v == nil { 6394 return graphql.Null 6395 } 6396 res := graphql.MarshalString(*v) 6397 return res 6398 } 6399 6400 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 6401 if v == nil { 6402 return graphql.Null 6403 } 6404 ret := make(graphql.Array, len(v)) 6405 var wg sync.WaitGroup 6406 isLen1 := len(v) == 1 6407 if !isLen1 { 6408 wg.Add(len(v)) 6409 } 6410 for i := range v { 6411 i := i 6412 fc := &graphql.FieldContext{ 6413 Index: &i, 6414 Result: &v[i], 6415 } 6416 ctx := graphql.WithFieldContext(ctx, fc) 6417 f := func(i int) { 6418 defer func() { 6419 if r := recover(); r != nil { 6420 ec.Error(ctx, ec.Recover(ctx, r)) 6421 ret = nil 6422 } 6423 }() 6424 if !isLen1 { 6425 defer wg.Done() 6426 } 6427 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 6428 } 6429 if isLen1 { 6430 f(i) 6431 } else { 6432 go f(i) 6433 } 6434 6435 } 6436 wg.Wait() 6437 6438 for _, e := range ret { 6439 if e == graphql.Null { 6440 return graphql.Null 6441 } 6442 } 6443 6444 return ret 6445 } 6446 6447 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 6448 if v == nil { 6449 return graphql.Null 6450 } 6451 ret := make(graphql.Array, len(v)) 6452 var wg sync.WaitGroup 6453 isLen1 := len(v) == 1 6454 if !isLen1 { 6455 wg.Add(len(v)) 6456 } 6457 for i := range v { 6458 i := i 6459 fc := &graphql.FieldContext{ 6460 Index: &i, 6461 Result: &v[i], 6462 } 6463 ctx := graphql.WithFieldContext(ctx, fc) 6464 f := func(i int) { 6465 defer func() { 6466 if r := recover(); r != nil { 6467 ec.Error(ctx, ec.Recover(ctx, r)) 6468 ret = nil 6469 } 6470 }() 6471 if !isLen1 { 6472 defer wg.Done() 6473 } 6474 ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 6475 } 6476 if isLen1 { 6477 f(i) 6478 } else { 6479 go f(i) 6480 } 6481 6482 } 6483 wg.Wait() 6484 6485 for _, e := range ret { 6486 if e == graphql.Null { 6487 return graphql.Null 6488 } 6489 } 6490 6491 return ret 6492 } 6493 6494 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 6495 if v == nil { 6496 return graphql.Null 6497 } 6498 ret := make(graphql.Array, len(v)) 6499 var wg sync.WaitGroup 6500 isLen1 := len(v) == 1 6501 if !isLen1 { 6502 wg.Add(len(v)) 6503 } 6504 for i := range v { 6505 i := i 6506 fc := &graphql.FieldContext{ 6507 Index: &i, 6508 Result: &v[i], 6509 } 6510 ctx := graphql.WithFieldContext(ctx, fc) 6511 f := func(i int) { 6512 defer func() { 6513 if r := recover(); r != nil { 6514 ec.Error(ctx, ec.Recover(ctx, r)) 6515 ret = nil 6516 } 6517 }() 6518 if !isLen1 { 6519 defer wg.Done() 6520 } 6521 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 6522 } 6523 if isLen1 { 6524 f(i) 6525 } else { 6526 go f(i) 6527 } 6528 6529 } 6530 wg.Wait() 6531 6532 for _, e := range ret { 6533 if e == graphql.Null { 6534 return graphql.Null 6535 } 6536 } 6537 6538 return ret 6539 } 6540 6541 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 6542 if v == nil { 6543 return graphql.Null 6544 } 6545 return ec.___Schema(ctx, sel, v) 6546 } 6547 6548 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 6549 if v == nil { 6550 return graphql.Null 6551 } 6552 ret := make(graphql.Array, len(v)) 6553 var wg sync.WaitGroup 6554 isLen1 := len(v) == 1 6555 if !isLen1 { 6556 wg.Add(len(v)) 6557 } 6558 for i := range v { 6559 i := i 6560 fc := &graphql.FieldContext{ 6561 Index: &i, 6562 Result: &v[i], 6563 } 6564 ctx := graphql.WithFieldContext(ctx, fc) 6565 f := func(i int) { 6566 defer func() { 6567 if r := recover(); r != nil { 6568 ec.Error(ctx, ec.Recover(ctx, r)) 6569 ret = nil 6570 } 6571 }() 6572 if !isLen1 { 6573 defer wg.Done() 6574 } 6575 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 6576 } 6577 if isLen1 { 6578 f(i) 6579 } else { 6580 go f(i) 6581 } 6582 6583 } 6584 wg.Wait() 6585 6586 for _, e := range ret { 6587 if e == graphql.Null { 6588 return graphql.Null 6589 } 6590 } 6591 6592 return ret 6593 } 6594 6595 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 6596 if v == nil { 6597 return graphql.Null 6598 } 6599 return ec.___Type(ctx, sel, v) 6600 } 6601 6602 // endregion ***************************** type.gotpl *****************************