github.com/HaswinVidanage/gqlgen@v0.8.1-0.20220609041233-69528c1bf712/example/chat/generated.go (about)

     1  // Code generated by github.com/HaswinVidanage/gqlgen, DO NOT EDIT.
     2  
     3  package chat
     4  
     5  import (
     6  	"bytes"
     7  	"context"
     8  	"errors"
     9  	"io"
    10  	"strconv"
    11  	"sync"
    12  	"time"
    13  
    14  	"github.com/HaswinVidanage/gqlgen/graphql"
    15  	"github.com/HaswinVidanage/gqlgen/graphql/introspection"
    16  	"github.com/vektah/gqlparser"
    17  	"github.com/vektah/gqlparser/ast"
    18  )
    19  
    20  // region    ************************** generated!.gotpl **************************
    21  
    22  // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
    23  func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
    24  	return &executableSchema{
    25  		resolvers:  cfg.Resolvers,
    26  		directives: cfg.Directives,
    27  		complexity: cfg.Complexity,
    28  	}
    29  }
    30  
    31  type Config struct {
    32  	Resolvers  ResolverRoot
    33  	Directives DirectiveRoot
    34  	Complexity ComplexityRoot
    35  }
    36  
    37  type ResolverRoot interface {
    38  	Mutation() MutationResolver
    39  	Query() QueryResolver
    40  	Subscription() SubscriptionResolver
    41  }
    42  
    43  type DirectiveRoot struct {
    44  }
    45  
    46  type ComplexityRoot struct {
    47  	Chatroom struct {
    48  		Name     func(childComplexity int) int
    49  		Messages func(childComplexity int) int
    50  	}
    51  
    52  	Message struct {
    53  		ID        func(childComplexity int) int
    54  		Text      func(childComplexity int) int
    55  		CreatedBy func(childComplexity int) int
    56  		CreatedAt func(childComplexity int) int
    57  	}
    58  
    59  	Mutation struct {
    60  		Post func(childComplexity int, text string, username string, roomName string) int
    61  	}
    62  
    63  	Query struct {
    64  		Room func(childComplexity int, name string) int
    65  	}
    66  
    67  	Subscription struct {
    68  		MessageAdded func(childComplexity int, roomName string) int
    69  	}
    70  }
    71  
    72  type MutationResolver interface {
    73  	Post(ctx context.Context, text string, username string, roomName string) (*Message, error)
    74  }
    75  type QueryResolver interface {
    76  	Room(ctx context.Context, name string) (*Chatroom, error)
    77  }
    78  type SubscriptionResolver interface {
    79  	MessageAdded(ctx context.Context, roomName string) (<-chan *Message, error)
    80  }
    81  
    82  type executableSchema struct {
    83  	resolvers  ResolverRoot
    84  	directives DirectiveRoot
    85  	complexity ComplexityRoot
    86  }
    87  
    88  func (e *executableSchema) Schema() *ast.Schema {
    89  	return parsedSchema
    90  }
    91  
    92  func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
    93  	ec := executionContext{nil, e}
    94  	_ = ec
    95  	switch typeName + "." + field {
    96  
    97  	case "Chatroom.Name":
    98  		if e.complexity.Chatroom.Name == nil {
    99  			break
   100  		}
   101  
   102  		return e.complexity.Chatroom.Name(childComplexity), true
   103  
   104  	case "Chatroom.Messages":
   105  		if e.complexity.Chatroom.Messages == nil {
   106  			break
   107  		}
   108  
   109  		return e.complexity.Chatroom.Messages(childComplexity), true
   110  
   111  	case "Message.ID":
   112  		if e.complexity.Message.ID == nil {
   113  			break
   114  		}
   115  
   116  		return e.complexity.Message.ID(childComplexity), true
   117  
   118  	case "Message.Text":
   119  		if e.complexity.Message.Text == nil {
   120  			break
   121  		}
   122  
   123  		return e.complexity.Message.Text(childComplexity), true
   124  
   125  	case "Message.CreatedBy":
   126  		if e.complexity.Message.CreatedBy == nil {
   127  			break
   128  		}
   129  
   130  		return e.complexity.Message.CreatedBy(childComplexity), true
   131  
   132  	case "Message.CreatedAt":
   133  		if e.complexity.Message.CreatedAt == nil {
   134  			break
   135  		}
   136  
   137  		return e.complexity.Message.CreatedAt(childComplexity), true
   138  
   139  	case "Mutation.Post":
   140  		if e.complexity.Mutation.Post == nil {
   141  			break
   142  		}
   143  
   144  		args, err := ec.field_Mutation_post_args(context.TODO(), rawArgs)
   145  		if err != nil {
   146  			return 0, false
   147  		}
   148  
   149  		return e.complexity.Mutation.Post(childComplexity, args["text"].(string), args["username"].(string), args["roomName"].(string)), true
   150  
   151  	case "Query.Room":
   152  		if e.complexity.Query.Room == nil {
   153  			break
   154  		}
   155  
   156  		args, err := ec.field_Query_room_args(context.TODO(), rawArgs)
   157  		if err != nil {
   158  			return 0, false
   159  		}
   160  
   161  		return e.complexity.Query.Room(childComplexity, args["name"].(string)), true
   162  
   163  	case "Subscription.MessageAdded":
   164  		if e.complexity.Subscription.MessageAdded == nil {
   165  			break
   166  		}
   167  
   168  		args, err := ec.field_Subscription_messageAdded_args(context.TODO(), rawArgs)
   169  		if err != nil {
   170  			return 0, false
   171  		}
   172  
   173  		return e.complexity.Subscription.MessageAdded(childComplexity, args["roomName"].(string)), true
   174  
   175  	}
   176  	return 0, false
   177  }
   178  
   179  func (e *executableSchema) Query(ctx context.Context, op *ast.OperationDefinition) *graphql.Response {
   180  	ec := executionContext{graphql.GetRequestContext(ctx), e}
   181  
   182  	buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
   183  		data := ec._Query(ctx, op.SelectionSet)
   184  		var buf bytes.Buffer
   185  		data.MarshalGQL(&buf)
   186  		return buf.Bytes()
   187  	})
   188  
   189  	return &graphql.Response{
   190  		Data:       buf,
   191  		Errors:     ec.Errors,
   192  		Extensions: ec.Extensions,
   193  	}
   194  }
   195  
   196  func (e *executableSchema) Mutation(ctx context.Context, op *ast.OperationDefinition) *graphql.Response {
   197  	ec := executionContext{graphql.GetRequestContext(ctx), e}
   198  
   199  	buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
   200  		data := ec._Mutation(ctx, op.SelectionSet)
   201  		var buf bytes.Buffer
   202  		data.MarshalGQL(&buf)
   203  		return buf.Bytes()
   204  	})
   205  
   206  	return &graphql.Response{
   207  		Data:       buf,
   208  		Errors:     ec.Errors,
   209  		Extensions: ec.Extensions,
   210  	}
   211  }
   212  
   213  func (e *executableSchema) Subscription(ctx context.Context, op *ast.OperationDefinition) func() *graphql.Response {
   214  	ec := executionContext{graphql.GetRequestContext(ctx), e}
   215  
   216  	next := ec._Subscription(ctx, op.SelectionSet)
   217  	if ec.Errors != nil {
   218  		return graphql.OneShot(&graphql.Response{Data: []byte("null"), Errors: ec.Errors})
   219  	}
   220  
   221  	var buf bytes.Buffer
   222  	return func() *graphql.Response {
   223  		buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
   224  			buf.Reset()
   225  			data := next()
   226  
   227  			if data == nil {
   228  				return nil
   229  			}
   230  			data.MarshalGQL(&buf)
   231  			return buf.Bytes()
   232  		})
   233  
   234  		if buf == nil {
   235  			return nil
   236  		}
   237  
   238  		return &graphql.Response{
   239  			Data:       buf,
   240  			Errors:     ec.Errors,
   241  			Extensions: ec.Extensions,
   242  		}
   243  	}
   244  }
   245  
   246  type executionContext struct {
   247  	*graphql.RequestContext
   248  	*executableSchema
   249  }
   250  
   251  func (ec *executionContext) FieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) (ret interface{}) {
   252  	defer func() {
   253  		if r := recover(); r != nil {
   254  			ec.Error(ctx, ec.Recover(ctx, r))
   255  			ret = nil
   256  		}
   257  	}()
   258  	res, err := ec.ResolverMiddleware(ctx, next)
   259  	if err != nil {
   260  		ec.Error(ctx, err)
   261  		return nil
   262  	}
   263  	return res
   264  }
   265  
   266  func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
   267  	if ec.DisableIntrospection {
   268  		return nil, errors.New("introspection disabled")
   269  	}
   270  	return introspection.WrapSchema(parsedSchema), nil
   271  }
   272  
   273  func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
   274  	if ec.DisableIntrospection {
   275  		return nil, errors.New("introspection disabled")
   276  	}
   277  	return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
   278  }
   279  
   280  var parsedSchema = gqlparser.MustLoadSchema(
   281  	&ast.Source{Name: "schema.graphql", Input: `type Chatroom {
   282      name: String!
   283      messages: [Message!]!
   284  }
   285  
   286  type Message {
   287      id: ID!
   288      text: String!
   289      createdBy: String!
   290      createdAt: Time!
   291  }
   292  
   293  type Query {
   294      room(name:String!): Chatroom
   295  }
   296  
   297  type Mutation {
   298      post(text: String!, username: String!, roomName: String!): Message!
   299  }
   300  
   301  type Subscription {
   302      messageAdded(roomName: String!): Message!
   303  }
   304  
   305  scalar Time
   306  `},
   307  )
   308  
   309  // endregion ************************** generated!.gotpl **************************
   310  
   311  // region    ***************************** args.gotpl *****************************
   312  
   313  func (ec *executionContext) field_Mutation_post_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   314  	var err error
   315  	args := map[string]interface{}{}
   316  	var arg0 string
   317  	if tmp, ok := rawArgs["text"]; ok {
   318  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
   319  		if err != nil {
   320  			return nil, err
   321  		}
   322  	}
   323  	args["text"] = arg0
   324  	var arg1 string
   325  	if tmp, ok := rawArgs["username"]; ok {
   326  		arg1, err = ec.unmarshalNString2string(ctx, tmp)
   327  		if err != nil {
   328  			return nil, err
   329  		}
   330  	}
   331  	args["username"] = arg1
   332  	var arg2 string
   333  	if tmp, ok := rawArgs["roomName"]; ok {
   334  		arg2, err = ec.unmarshalNString2string(ctx, tmp)
   335  		if err != nil {
   336  			return nil, err
   337  		}
   338  	}
   339  	args["roomName"] = arg2
   340  	return args, nil
   341  }
   342  
   343  func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   344  	var err error
   345  	args := map[string]interface{}{}
   346  	var arg0 string
   347  	if tmp, ok := rawArgs["name"]; ok {
   348  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
   349  		if err != nil {
   350  			return nil, err
   351  		}
   352  	}
   353  	args["name"] = arg0
   354  	return args, nil
   355  }
   356  
   357  func (ec *executionContext) field_Query_room_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   358  	var err error
   359  	args := map[string]interface{}{}
   360  	var arg0 string
   361  	if tmp, ok := rawArgs["name"]; ok {
   362  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
   363  		if err != nil {
   364  			return nil, err
   365  		}
   366  	}
   367  	args["name"] = arg0
   368  	return args, nil
   369  }
   370  
   371  func (ec *executionContext) field_Subscription_messageAdded_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   372  	var err error
   373  	args := map[string]interface{}{}
   374  	var arg0 string
   375  	if tmp, ok := rawArgs["roomName"]; ok {
   376  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
   377  		if err != nil {
   378  			return nil, err
   379  		}
   380  	}
   381  	args["roomName"] = arg0
   382  	return args, nil
   383  }
   384  
   385  func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   386  	var err error
   387  	args := map[string]interface{}{}
   388  	var arg0 bool
   389  	if tmp, ok := rawArgs["includeDeprecated"]; ok {
   390  		arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
   391  		if err != nil {
   392  			return nil, err
   393  		}
   394  	}
   395  	args["includeDeprecated"] = arg0
   396  	return args, nil
   397  }
   398  
   399  func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   400  	var err error
   401  	args := map[string]interface{}{}
   402  	var arg0 bool
   403  	if tmp, ok := rawArgs["includeDeprecated"]; ok {
   404  		arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
   405  		if err != nil {
   406  			return nil, err
   407  		}
   408  	}
   409  	args["includeDeprecated"] = arg0
   410  	return args, nil
   411  }
   412  
   413  // endregion ***************************** args.gotpl *****************************
   414  
   415  // region    **************************** field.gotpl *****************************
   416  
   417  func (ec *executionContext) _Chatroom_name(ctx context.Context, field graphql.CollectedField, obj *Chatroom) graphql.Marshaler {
   418  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   419  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   420  	rctx := &graphql.ResolverContext{
   421  		Object: "Chatroom",
   422  		Field:  field,
   423  		Args:   nil,
   424  	}
   425  	ctx = graphql.WithResolverContext(ctx, rctx)
   426  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   427  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   428  		ctx = rctx // use context from middleware stack in children
   429  		return obj.Name, nil
   430  	})
   431  	if resTmp == nil {
   432  		if !ec.HasError(rctx) {
   433  			ec.Errorf(ctx, "must not be null")
   434  		}
   435  		return graphql.Null
   436  	}
   437  	res := resTmp.(string)
   438  	rctx.Result = res
   439  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   440  	return ec.marshalNString2string(ctx, field.Selections, res)
   441  }
   442  
   443  func (ec *executionContext) _Chatroom_messages(ctx context.Context, field graphql.CollectedField, obj *Chatroom) graphql.Marshaler {
   444  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   445  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   446  	rctx := &graphql.ResolverContext{
   447  		Object: "Chatroom",
   448  		Field:  field,
   449  		Args:   nil,
   450  	}
   451  	ctx = graphql.WithResolverContext(ctx, rctx)
   452  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   453  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   454  		ctx = rctx // use context from middleware stack in children
   455  		return obj.Messages, nil
   456  	})
   457  	if resTmp == nil {
   458  		if !ec.HasError(rctx) {
   459  			ec.Errorf(ctx, "must not be null")
   460  		}
   461  		return graphql.Null
   462  	}
   463  	res := resTmp.([]Message)
   464  	rctx.Result = res
   465  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   466  	return ec.marshalNMessage2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx, field.Selections, res)
   467  }
   468  
   469  func (ec *executionContext) _Message_id(ctx context.Context, field graphql.CollectedField, obj *Message) graphql.Marshaler {
   470  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   471  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   472  	rctx := &graphql.ResolverContext{
   473  		Object: "Message",
   474  		Field:  field,
   475  		Args:   nil,
   476  	}
   477  	ctx = graphql.WithResolverContext(ctx, rctx)
   478  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   479  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   480  		ctx = rctx // use context from middleware stack in children
   481  		return obj.ID, nil
   482  	})
   483  	if resTmp == nil {
   484  		if !ec.HasError(rctx) {
   485  			ec.Errorf(ctx, "must not be null")
   486  		}
   487  		return graphql.Null
   488  	}
   489  	res := resTmp.(string)
   490  	rctx.Result = res
   491  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   492  	return ec.marshalNID2string(ctx, field.Selections, res)
   493  }
   494  
   495  func (ec *executionContext) _Message_text(ctx context.Context, field graphql.CollectedField, obj *Message) graphql.Marshaler {
   496  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   497  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   498  	rctx := &graphql.ResolverContext{
   499  		Object: "Message",
   500  		Field:  field,
   501  		Args:   nil,
   502  	}
   503  	ctx = graphql.WithResolverContext(ctx, rctx)
   504  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   505  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   506  		ctx = rctx // use context from middleware stack in children
   507  		return obj.Text, nil
   508  	})
   509  	if resTmp == nil {
   510  		if !ec.HasError(rctx) {
   511  			ec.Errorf(ctx, "must not be null")
   512  		}
   513  		return graphql.Null
   514  	}
   515  	res := resTmp.(string)
   516  	rctx.Result = res
   517  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   518  	return ec.marshalNString2string(ctx, field.Selections, res)
   519  }
   520  
   521  func (ec *executionContext) _Message_createdBy(ctx context.Context, field graphql.CollectedField, obj *Message) graphql.Marshaler {
   522  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   523  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   524  	rctx := &graphql.ResolverContext{
   525  		Object: "Message",
   526  		Field:  field,
   527  		Args:   nil,
   528  	}
   529  	ctx = graphql.WithResolverContext(ctx, rctx)
   530  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   531  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   532  		ctx = rctx // use context from middleware stack in children
   533  		return obj.CreatedBy, nil
   534  	})
   535  	if resTmp == nil {
   536  		if !ec.HasError(rctx) {
   537  			ec.Errorf(ctx, "must not be null")
   538  		}
   539  		return graphql.Null
   540  	}
   541  	res := resTmp.(string)
   542  	rctx.Result = res
   543  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   544  	return ec.marshalNString2string(ctx, field.Selections, res)
   545  }
   546  
   547  func (ec *executionContext) _Message_createdAt(ctx context.Context, field graphql.CollectedField, obj *Message) graphql.Marshaler {
   548  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   549  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   550  	rctx := &graphql.ResolverContext{
   551  		Object: "Message",
   552  		Field:  field,
   553  		Args:   nil,
   554  	}
   555  	ctx = graphql.WithResolverContext(ctx, rctx)
   556  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   557  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   558  		ctx = rctx // use context from middleware stack in children
   559  		return obj.CreatedAt, nil
   560  	})
   561  	if resTmp == nil {
   562  		if !ec.HasError(rctx) {
   563  			ec.Errorf(ctx, "must not be null")
   564  		}
   565  		return graphql.Null
   566  	}
   567  	res := resTmp.(time.Time)
   568  	rctx.Result = res
   569  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   570  	return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
   571  }
   572  
   573  func (ec *executionContext) _Mutation_post(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
   574  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   575  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   576  	rctx := &graphql.ResolverContext{
   577  		Object: "Mutation",
   578  		Field:  field,
   579  		Args:   nil,
   580  	}
   581  	ctx = graphql.WithResolverContext(ctx, rctx)
   582  	rawArgs := field.ArgumentMap(ec.Variables)
   583  	args, err := ec.field_Mutation_post_args(ctx, rawArgs)
   584  	if err != nil {
   585  		ec.Error(ctx, err)
   586  		return graphql.Null
   587  	}
   588  	rctx.Args = args
   589  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   590  	resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
   591  		ctx = rctx // use context from middleware stack in children
   592  		return ec.resolvers.Mutation().Post(rctx, args["text"].(string), args["username"].(string), args["roomName"].(string))
   593  	})
   594  	if resTmp == nil {
   595  		if !ec.HasError(rctx) {
   596  			ec.Errorf(ctx, "must not be null")
   597  		}
   598  		return graphql.Null
   599  	}
   600  	res := resTmp.(*Message)
   601  	rctx.Result = res
   602  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   603  	return ec.marshalNMessage2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx, field.Selections, res)
   604  }
   605  
   606  func (ec *executionContext) _Query_room(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
   607  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   608  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   609  	rctx := &graphql.ResolverContext{
   610  		Object: "Query",
   611  		Field:  field,
   612  		Args:   nil,
   613  	}
   614  	ctx = graphql.WithResolverContext(ctx, rctx)
   615  	rawArgs := field.ArgumentMap(ec.Variables)
   616  	args, err := ec.field_Query_room_args(ctx, rawArgs)
   617  	if err != nil {
   618  		ec.Error(ctx, err)
   619  		return graphql.Null
   620  	}
   621  	rctx.Args = args
   622  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   623  	resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
   624  		ctx = rctx // use context from middleware stack in children
   625  		return ec.resolvers.Query().Room(rctx, args["name"].(string))
   626  	})
   627  	if resTmp == nil {
   628  		return graphql.Null
   629  	}
   630  	res := resTmp.(*Chatroom)
   631  	rctx.Result = res
   632  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   633  	return ec.marshalOChatroom2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐChatroom(ctx, field.Selections, res)
   634  }
   635  
   636  func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
   637  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   638  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   639  	rctx := &graphql.ResolverContext{
   640  		Object: "Query",
   641  		Field:  field,
   642  		Args:   nil,
   643  	}
   644  	ctx = graphql.WithResolverContext(ctx, rctx)
   645  	rawArgs := field.ArgumentMap(ec.Variables)
   646  	args, err := ec.field_Query___type_args(ctx, rawArgs)
   647  	if err != nil {
   648  		ec.Error(ctx, err)
   649  		return graphql.Null
   650  	}
   651  	rctx.Args = args
   652  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   653  	resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
   654  		ctx = rctx // use context from middleware stack in children
   655  		return ec.introspectType(args["name"].(string))
   656  	})
   657  	if resTmp == nil {
   658  		return graphql.Null
   659  	}
   660  	res := resTmp.(*introspection.Type)
   661  	rctx.Result = res
   662  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   663  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
   664  }
   665  
   666  func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
   667  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   668  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   669  	rctx := &graphql.ResolverContext{
   670  		Object: "Query",
   671  		Field:  field,
   672  		Args:   nil,
   673  	}
   674  	ctx = graphql.WithResolverContext(ctx, rctx)
   675  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   676  	resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
   677  		ctx = rctx // use context from middleware stack in children
   678  		return ec.introspectSchema()
   679  	})
   680  	if resTmp == nil {
   681  		return graphql.Null
   682  	}
   683  	res := resTmp.(*introspection.Schema)
   684  	rctx.Result = res
   685  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   686  	return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
   687  }
   688  
   689  func (ec *executionContext) _Subscription_messageAdded(ctx context.Context, field graphql.CollectedField) func() graphql.Marshaler {
   690  	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
   691  		Field: field,
   692  		Args:  nil,
   693  	})
   694  	rawArgs := field.ArgumentMap(ec.Variables)
   695  	args, err := ec.field_Subscription_messageAdded_args(ctx, rawArgs)
   696  	if err != nil {
   697  		ec.Error(ctx, err)
   698  		return nil
   699  	}
   700  	// FIXME: subscriptions are missing request middleware stack https://github.com/HaswinVidanage/gqlgen/issues/259
   701  	//          and Tracer stack
   702  	rctx := ctx
   703  	results, err := ec.resolvers.Subscription().MessageAdded(rctx, args["roomName"].(string))
   704  	if err != nil {
   705  		ec.Error(ctx, err)
   706  		return nil
   707  	}
   708  	return func() graphql.Marshaler {
   709  		res, ok := <-results
   710  		if !ok {
   711  			return nil
   712  		}
   713  		return graphql.WriterFunc(func(w io.Writer) {
   714  			w.Write([]byte{'{'})
   715  			graphql.MarshalString(field.Alias).MarshalGQL(w)
   716  			w.Write([]byte{':'})
   717  			ec.marshalNMessage2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx, field.Selections, res).MarshalGQL(w)
   718  			w.Write([]byte{'}'})
   719  		})
   720  	}
   721  }
   722  
   723  func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
   724  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   725  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   726  	rctx := &graphql.ResolverContext{
   727  		Object: "__Directive",
   728  		Field:  field,
   729  		Args:   nil,
   730  	}
   731  	ctx = graphql.WithResolverContext(ctx, rctx)
   732  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   733  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   734  		ctx = rctx // use context from middleware stack in children
   735  		return obj.Name, nil
   736  	})
   737  	if resTmp == nil {
   738  		if !ec.HasError(rctx) {
   739  			ec.Errorf(ctx, "must not be null")
   740  		}
   741  		return graphql.Null
   742  	}
   743  	res := resTmp.(string)
   744  	rctx.Result = res
   745  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   746  	return ec.marshalNString2string(ctx, field.Selections, res)
   747  }
   748  
   749  func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
   750  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   751  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   752  	rctx := &graphql.ResolverContext{
   753  		Object: "__Directive",
   754  		Field:  field,
   755  		Args:   nil,
   756  	}
   757  	ctx = graphql.WithResolverContext(ctx, rctx)
   758  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   759  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   760  		ctx = rctx // use context from middleware stack in children
   761  		return obj.Description, nil
   762  	})
   763  	if resTmp == nil {
   764  		return graphql.Null
   765  	}
   766  	res := resTmp.(string)
   767  	rctx.Result = res
   768  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   769  	return ec.marshalOString2string(ctx, field.Selections, res)
   770  }
   771  
   772  func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
   773  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   774  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   775  	rctx := &graphql.ResolverContext{
   776  		Object: "__Directive",
   777  		Field:  field,
   778  		Args:   nil,
   779  	}
   780  	ctx = graphql.WithResolverContext(ctx, rctx)
   781  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   782  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   783  		ctx = rctx // use context from middleware stack in children
   784  		return obj.Locations, nil
   785  	})
   786  	if resTmp == nil {
   787  		if !ec.HasError(rctx) {
   788  			ec.Errorf(ctx, "must not be null")
   789  		}
   790  		return graphql.Null
   791  	}
   792  	res := resTmp.([]string)
   793  	rctx.Result = res
   794  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   795  	return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res)
   796  }
   797  
   798  func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
   799  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   800  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   801  	rctx := &graphql.ResolverContext{
   802  		Object: "__Directive",
   803  		Field:  field,
   804  		Args:   nil,
   805  	}
   806  	ctx = graphql.WithResolverContext(ctx, rctx)
   807  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   808  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   809  		ctx = rctx // use context from middleware stack in children
   810  		return obj.Args, nil
   811  	})
   812  	if resTmp == nil {
   813  		if !ec.HasError(rctx) {
   814  			ec.Errorf(ctx, "must not be null")
   815  		}
   816  		return graphql.Null
   817  	}
   818  	res := resTmp.([]introspection.InputValue)
   819  	rctx.Result = res
   820  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   821  	return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res)
   822  }
   823  
   824  func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
   825  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   826  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   827  	rctx := &graphql.ResolverContext{
   828  		Object: "__EnumValue",
   829  		Field:  field,
   830  		Args:   nil,
   831  	}
   832  	ctx = graphql.WithResolverContext(ctx, rctx)
   833  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   834  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   835  		ctx = rctx // use context from middleware stack in children
   836  		return obj.Name, nil
   837  	})
   838  	if resTmp == nil {
   839  		if !ec.HasError(rctx) {
   840  			ec.Errorf(ctx, "must not be null")
   841  		}
   842  		return graphql.Null
   843  	}
   844  	res := resTmp.(string)
   845  	rctx.Result = res
   846  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   847  	return ec.marshalNString2string(ctx, field.Selections, res)
   848  }
   849  
   850  func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
   851  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   852  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   853  	rctx := &graphql.ResolverContext{
   854  		Object: "__EnumValue",
   855  		Field:  field,
   856  		Args:   nil,
   857  	}
   858  	ctx = graphql.WithResolverContext(ctx, rctx)
   859  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   860  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   861  		ctx = rctx // use context from middleware stack in children
   862  		return obj.Description, nil
   863  	})
   864  	if resTmp == nil {
   865  		return graphql.Null
   866  	}
   867  	res := resTmp.(string)
   868  	rctx.Result = res
   869  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   870  	return ec.marshalOString2string(ctx, field.Selections, res)
   871  }
   872  
   873  func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
   874  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   875  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   876  	rctx := &graphql.ResolverContext{
   877  		Object: "__EnumValue",
   878  		Field:  field,
   879  		Args:   nil,
   880  	}
   881  	ctx = graphql.WithResolverContext(ctx, rctx)
   882  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   883  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   884  		ctx = rctx // use context from middleware stack in children
   885  		return obj.IsDeprecated(), nil
   886  	})
   887  	if resTmp == nil {
   888  		if !ec.HasError(rctx) {
   889  			ec.Errorf(ctx, "must not be null")
   890  		}
   891  		return graphql.Null
   892  	}
   893  	res := resTmp.(bool)
   894  	rctx.Result = res
   895  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   896  	return ec.marshalNBoolean2bool(ctx, field.Selections, res)
   897  }
   898  
   899  func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
   900  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   901  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   902  	rctx := &graphql.ResolverContext{
   903  		Object: "__EnumValue",
   904  		Field:  field,
   905  		Args:   nil,
   906  	}
   907  	ctx = graphql.WithResolverContext(ctx, rctx)
   908  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   909  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   910  		ctx = rctx // use context from middleware stack in children
   911  		return obj.DeprecationReason(), nil
   912  	})
   913  	if resTmp == nil {
   914  		return graphql.Null
   915  	}
   916  	res := resTmp.(*string)
   917  	rctx.Result = res
   918  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   919  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
   920  }
   921  
   922  func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
   923  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   924  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   925  	rctx := &graphql.ResolverContext{
   926  		Object: "__Field",
   927  		Field:  field,
   928  		Args:   nil,
   929  	}
   930  	ctx = graphql.WithResolverContext(ctx, rctx)
   931  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   932  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   933  		ctx = rctx // use context from middleware stack in children
   934  		return obj.Name, nil
   935  	})
   936  	if resTmp == nil {
   937  		if !ec.HasError(rctx) {
   938  			ec.Errorf(ctx, "must not be null")
   939  		}
   940  		return graphql.Null
   941  	}
   942  	res := resTmp.(string)
   943  	rctx.Result = res
   944  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   945  	return ec.marshalNString2string(ctx, field.Selections, res)
   946  }
   947  
   948  func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
   949  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   950  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   951  	rctx := &graphql.ResolverContext{
   952  		Object: "__Field",
   953  		Field:  field,
   954  		Args:   nil,
   955  	}
   956  	ctx = graphql.WithResolverContext(ctx, rctx)
   957  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   958  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   959  		ctx = rctx // use context from middleware stack in children
   960  		return obj.Description, nil
   961  	})
   962  	if resTmp == nil {
   963  		return graphql.Null
   964  	}
   965  	res := resTmp.(string)
   966  	rctx.Result = res
   967  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   968  	return ec.marshalOString2string(ctx, field.Selections, res)
   969  }
   970  
   971  func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
   972  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   973  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
   974  	rctx := &graphql.ResolverContext{
   975  		Object: "__Field",
   976  		Field:  field,
   977  		Args:   nil,
   978  	}
   979  	ctx = graphql.WithResolverContext(ctx, rctx)
   980  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
   981  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   982  		ctx = rctx // use context from middleware stack in children
   983  		return obj.Args, nil
   984  	})
   985  	if resTmp == nil {
   986  		if !ec.HasError(rctx) {
   987  			ec.Errorf(ctx, "must not be null")
   988  		}
   989  		return graphql.Null
   990  	}
   991  	res := resTmp.([]introspection.InputValue)
   992  	rctx.Result = res
   993  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
   994  	return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res)
   995  }
   996  
   997  func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
   998  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
   999  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1000  	rctx := &graphql.ResolverContext{
  1001  		Object: "__Field",
  1002  		Field:  field,
  1003  		Args:   nil,
  1004  	}
  1005  	ctx = graphql.WithResolverContext(ctx, rctx)
  1006  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1007  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1008  		ctx = rctx // use context from middleware stack in children
  1009  		return obj.Type, nil
  1010  	})
  1011  	if resTmp == nil {
  1012  		if !ec.HasError(rctx) {
  1013  			ec.Errorf(ctx, "must not be null")
  1014  		}
  1015  		return graphql.Null
  1016  	}
  1017  	res := resTmp.(*introspection.Type)
  1018  	rctx.Result = res
  1019  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1020  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1021  }
  1022  
  1023  func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
  1024  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1025  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1026  	rctx := &graphql.ResolverContext{
  1027  		Object: "__Field",
  1028  		Field:  field,
  1029  		Args:   nil,
  1030  	}
  1031  	ctx = graphql.WithResolverContext(ctx, rctx)
  1032  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1033  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1034  		ctx = rctx // use context from middleware stack in children
  1035  		return obj.IsDeprecated(), nil
  1036  	})
  1037  	if resTmp == nil {
  1038  		if !ec.HasError(rctx) {
  1039  			ec.Errorf(ctx, "must not be null")
  1040  		}
  1041  		return graphql.Null
  1042  	}
  1043  	res := resTmp.(bool)
  1044  	rctx.Result = res
  1045  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1046  	return ec.marshalNBoolean2bool(ctx, field.Selections, res)
  1047  }
  1048  
  1049  func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
  1050  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1051  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1052  	rctx := &graphql.ResolverContext{
  1053  		Object: "__Field",
  1054  		Field:  field,
  1055  		Args:   nil,
  1056  	}
  1057  	ctx = graphql.WithResolverContext(ctx, rctx)
  1058  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1059  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1060  		ctx = rctx // use context from middleware stack in children
  1061  		return obj.DeprecationReason(), nil
  1062  	})
  1063  	if resTmp == nil {
  1064  		return graphql.Null
  1065  	}
  1066  	res := resTmp.(*string)
  1067  	rctx.Result = res
  1068  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1069  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  1070  }
  1071  
  1072  func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
  1073  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1074  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1075  	rctx := &graphql.ResolverContext{
  1076  		Object: "__InputValue",
  1077  		Field:  field,
  1078  		Args:   nil,
  1079  	}
  1080  	ctx = graphql.WithResolverContext(ctx, rctx)
  1081  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1082  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1083  		ctx = rctx // use context from middleware stack in children
  1084  		return obj.Name, nil
  1085  	})
  1086  	if resTmp == nil {
  1087  		if !ec.HasError(rctx) {
  1088  			ec.Errorf(ctx, "must not be null")
  1089  		}
  1090  		return graphql.Null
  1091  	}
  1092  	res := resTmp.(string)
  1093  	rctx.Result = res
  1094  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1095  	return ec.marshalNString2string(ctx, field.Selections, res)
  1096  }
  1097  
  1098  func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
  1099  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1100  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1101  	rctx := &graphql.ResolverContext{
  1102  		Object: "__InputValue",
  1103  		Field:  field,
  1104  		Args:   nil,
  1105  	}
  1106  	ctx = graphql.WithResolverContext(ctx, rctx)
  1107  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1108  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1109  		ctx = rctx // use context from middleware stack in children
  1110  		return obj.Description, nil
  1111  	})
  1112  	if resTmp == nil {
  1113  		return graphql.Null
  1114  	}
  1115  	res := resTmp.(string)
  1116  	rctx.Result = res
  1117  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1118  	return ec.marshalOString2string(ctx, field.Selections, res)
  1119  }
  1120  
  1121  func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
  1122  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1123  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1124  	rctx := &graphql.ResolverContext{
  1125  		Object: "__InputValue",
  1126  		Field:  field,
  1127  		Args:   nil,
  1128  	}
  1129  	ctx = graphql.WithResolverContext(ctx, rctx)
  1130  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1131  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1132  		ctx = rctx // use context from middleware stack in children
  1133  		return obj.Type, nil
  1134  	})
  1135  	if resTmp == nil {
  1136  		if !ec.HasError(rctx) {
  1137  			ec.Errorf(ctx, "must not be null")
  1138  		}
  1139  		return graphql.Null
  1140  	}
  1141  	res := resTmp.(*introspection.Type)
  1142  	rctx.Result = res
  1143  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1144  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1145  }
  1146  
  1147  func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
  1148  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1149  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1150  	rctx := &graphql.ResolverContext{
  1151  		Object: "__InputValue",
  1152  		Field:  field,
  1153  		Args:   nil,
  1154  	}
  1155  	ctx = graphql.WithResolverContext(ctx, rctx)
  1156  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1157  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1158  		ctx = rctx // use context from middleware stack in children
  1159  		return obj.DefaultValue, nil
  1160  	})
  1161  	if resTmp == nil {
  1162  		return graphql.Null
  1163  	}
  1164  	res := resTmp.(*string)
  1165  	rctx.Result = res
  1166  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1167  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  1168  }
  1169  
  1170  func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
  1171  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1172  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1173  	rctx := &graphql.ResolverContext{
  1174  		Object: "__Schema",
  1175  		Field:  field,
  1176  		Args:   nil,
  1177  	}
  1178  	ctx = graphql.WithResolverContext(ctx, rctx)
  1179  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1180  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1181  		ctx = rctx // use context from middleware stack in children
  1182  		return obj.Types(), nil
  1183  	})
  1184  	if resTmp == nil {
  1185  		if !ec.HasError(rctx) {
  1186  			ec.Errorf(ctx, "must not be null")
  1187  		}
  1188  		return graphql.Null
  1189  	}
  1190  	res := resTmp.([]introspection.Type)
  1191  	rctx.Result = res
  1192  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1193  	return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1194  }
  1195  
  1196  func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
  1197  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1198  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1199  	rctx := &graphql.ResolverContext{
  1200  		Object: "__Schema",
  1201  		Field:  field,
  1202  		Args:   nil,
  1203  	}
  1204  	ctx = graphql.WithResolverContext(ctx, rctx)
  1205  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1206  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1207  		ctx = rctx // use context from middleware stack in children
  1208  		return obj.QueryType(), nil
  1209  	})
  1210  	if resTmp == nil {
  1211  		if !ec.HasError(rctx) {
  1212  			ec.Errorf(ctx, "must not be null")
  1213  		}
  1214  		return graphql.Null
  1215  	}
  1216  	res := resTmp.(*introspection.Type)
  1217  	rctx.Result = res
  1218  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1219  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1220  }
  1221  
  1222  func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
  1223  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1224  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1225  	rctx := &graphql.ResolverContext{
  1226  		Object: "__Schema",
  1227  		Field:  field,
  1228  		Args:   nil,
  1229  	}
  1230  	ctx = graphql.WithResolverContext(ctx, rctx)
  1231  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1232  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1233  		ctx = rctx // use context from middleware stack in children
  1234  		return obj.MutationType(), nil
  1235  	})
  1236  	if resTmp == nil {
  1237  		return graphql.Null
  1238  	}
  1239  	res := resTmp.(*introspection.Type)
  1240  	rctx.Result = res
  1241  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1242  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1243  }
  1244  
  1245  func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
  1246  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1247  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1248  	rctx := &graphql.ResolverContext{
  1249  		Object: "__Schema",
  1250  		Field:  field,
  1251  		Args:   nil,
  1252  	}
  1253  	ctx = graphql.WithResolverContext(ctx, rctx)
  1254  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1255  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1256  		ctx = rctx // use context from middleware stack in children
  1257  		return obj.SubscriptionType(), nil
  1258  	})
  1259  	if resTmp == nil {
  1260  		return graphql.Null
  1261  	}
  1262  	res := resTmp.(*introspection.Type)
  1263  	rctx.Result = res
  1264  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1265  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1266  }
  1267  
  1268  func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
  1269  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1270  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1271  	rctx := &graphql.ResolverContext{
  1272  		Object: "__Schema",
  1273  		Field:  field,
  1274  		Args:   nil,
  1275  	}
  1276  	ctx = graphql.WithResolverContext(ctx, rctx)
  1277  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1278  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1279  		ctx = rctx // use context from middleware stack in children
  1280  		return obj.Directives(), nil
  1281  	})
  1282  	if resTmp == nil {
  1283  		if !ec.HasError(rctx) {
  1284  			ec.Errorf(ctx, "must not be null")
  1285  		}
  1286  		return graphql.Null
  1287  	}
  1288  	res := resTmp.([]introspection.Directive)
  1289  	rctx.Result = res
  1290  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1291  	return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res)
  1292  }
  1293  
  1294  func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1295  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1296  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1297  	rctx := &graphql.ResolverContext{
  1298  		Object: "__Type",
  1299  		Field:  field,
  1300  		Args:   nil,
  1301  	}
  1302  	ctx = graphql.WithResolverContext(ctx, rctx)
  1303  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1304  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1305  		ctx = rctx // use context from middleware stack in children
  1306  		return obj.Kind(), nil
  1307  	})
  1308  	if resTmp == nil {
  1309  		if !ec.HasError(rctx) {
  1310  			ec.Errorf(ctx, "must not be null")
  1311  		}
  1312  		return graphql.Null
  1313  	}
  1314  	res := resTmp.(string)
  1315  	rctx.Result = res
  1316  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1317  	return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
  1318  }
  1319  
  1320  func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1321  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1322  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1323  	rctx := &graphql.ResolverContext{
  1324  		Object: "__Type",
  1325  		Field:  field,
  1326  		Args:   nil,
  1327  	}
  1328  	ctx = graphql.WithResolverContext(ctx, rctx)
  1329  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1330  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1331  		ctx = rctx // use context from middleware stack in children
  1332  		return obj.Name(), nil
  1333  	})
  1334  	if resTmp == nil {
  1335  		return graphql.Null
  1336  	}
  1337  	res := resTmp.(*string)
  1338  	rctx.Result = res
  1339  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1340  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  1341  }
  1342  
  1343  func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1344  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1345  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1346  	rctx := &graphql.ResolverContext{
  1347  		Object: "__Type",
  1348  		Field:  field,
  1349  		Args:   nil,
  1350  	}
  1351  	ctx = graphql.WithResolverContext(ctx, rctx)
  1352  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1353  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1354  		ctx = rctx // use context from middleware stack in children
  1355  		return obj.Description(), nil
  1356  	})
  1357  	if resTmp == nil {
  1358  		return graphql.Null
  1359  	}
  1360  	res := resTmp.(string)
  1361  	rctx.Result = res
  1362  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1363  	return ec.marshalOString2string(ctx, field.Selections, res)
  1364  }
  1365  
  1366  func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1367  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1368  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1369  	rctx := &graphql.ResolverContext{
  1370  		Object: "__Type",
  1371  		Field:  field,
  1372  		Args:   nil,
  1373  	}
  1374  	ctx = graphql.WithResolverContext(ctx, rctx)
  1375  	rawArgs := field.ArgumentMap(ec.Variables)
  1376  	args, err := ec.field___Type_fields_args(ctx, rawArgs)
  1377  	if err != nil {
  1378  		ec.Error(ctx, err)
  1379  		return graphql.Null
  1380  	}
  1381  	rctx.Args = args
  1382  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1383  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1384  		ctx = rctx // use context from middleware stack in children
  1385  		return obj.Fields(args["includeDeprecated"].(bool)), nil
  1386  	})
  1387  	if resTmp == nil {
  1388  		return graphql.Null
  1389  	}
  1390  	res := resTmp.([]introspection.Field)
  1391  	rctx.Result = res
  1392  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1393  	return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res)
  1394  }
  1395  
  1396  func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1397  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1398  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1399  	rctx := &graphql.ResolverContext{
  1400  		Object: "__Type",
  1401  		Field:  field,
  1402  		Args:   nil,
  1403  	}
  1404  	ctx = graphql.WithResolverContext(ctx, rctx)
  1405  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1406  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1407  		ctx = rctx // use context from middleware stack in children
  1408  		return obj.Interfaces(), nil
  1409  	})
  1410  	if resTmp == nil {
  1411  		return graphql.Null
  1412  	}
  1413  	res := resTmp.([]introspection.Type)
  1414  	rctx.Result = res
  1415  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1416  	return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1417  }
  1418  
  1419  func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1420  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1421  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1422  	rctx := &graphql.ResolverContext{
  1423  		Object: "__Type",
  1424  		Field:  field,
  1425  		Args:   nil,
  1426  	}
  1427  	ctx = graphql.WithResolverContext(ctx, rctx)
  1428  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1429  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1430  		ctx = rctx // use context from middleware stack in children
  1431  		return obj.PossibleTypes(), nil
  1432  	})
  1433  	if resTmp == nil {
  1434  		return graphql.Null
  1435  	}
  1436  	res := resTmp.([]introspection.Type)
  1437  	rctx.Result = res
  1438  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1439  	return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1440  }
  1441  
  1442  func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1443  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1444  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1445  	rctx := &graphql.ResolverContext{
  1446  		Object: "__Type",
  1447  		Field:  field,
  1448  		Args:   nil,
  1449  	}
  1450  	ctx = graphql.WithResolverContext(ctx, rctx)
  1451  	rawArgs := field.ArgumentMap(ec.Variables)
  1452  	args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
  1453  	if err != nil {
  1454  		ec.Error(ctx, err)
  1455  		return graphql.Null
  1456  	}
  1457  	rctx.Args = args
  1458  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1459  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1460  		ctx = rctx // use context from middleware stack in children
  1461  		return obj.EnumValues(args["includeDeprecated"].(bool)), nil
  1462  	})
  1463  	if resTmp == nil {
  1464  		return graphql.Null
  1465  	}
  1466  	res := resTmp.([]introspection.EnumValue)
  1467  	rctx.Result = res
  1468  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1469  	return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res)
  1470  }
  1471  
  1472  func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1473  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1474  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1475  	rctx := &graphql.ResolverContext{
  1476  		Object: "__Type",
  1477  		Field:  field,
  1478  		Args:   nil,
  1479  	}
  1480  	ctx = graphql.WithResolverContext(ctx, rctx)
  1481  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1482  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1483  		ctx = rctx // use context from middleware stack in children
  1484  		return obj.InputFields(), nil
  1485  	})
  1486  	if resTmp == nil {
  1487  		return graphql.Null
  1488  	}
  1489  	res := resTmp.([]introspection.InputValue)
  1490  	rctx.Result = res
  1491  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1492  	return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res)
  1493  }
  1494  
  1495  func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
  1496  	ctx = ec.Tracer.StartFieldExecution(ctx, field)
  1497  	defer func() { ec.Tracer.EndFieldExecution(ctx) }()
  1498  	rctx := &graphql.ResolverContext{
  1499  		Object: "__Type",
  1500  		Field:  field,
  1501  		Args:   nil,
  1502  	}
  1503  	ctx = graphql.WithResolverContext(ctx, rctx)
  1504  	ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
  1505  	resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
  1506  		ctx = rctx // use context from middleware stack in children
  1507  		return obj.OfType(), nil
  1508  	})
  1509  	if resTmp == nil {
  1510  		return graphql.Null
  1511  	}
  1512  	res := resTmp.(*introspection.Type)
  1513  	rctx.Result = res
  1514  	ctx = ec.Tracer.StartFieldChildExecution(ctx)
  1515  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1516  }
  1517  
  1518  // endregion **************************** field.gotpl *****************************
  1519  
  1520  // region    **************************** input.gotpl *****************************
  1521  
  1522  // endregion **************************** input.gotpl *****************************
  1523  
  1524  // region    ************************** interface.gotpl ***************************
  1525  
  1526  // endregion ************************** interface.gotpl ***************************
  1527  
  1528  // region    **************************** object.gotpl ****************************
  1529  
  1530  var chatroomImplementors = []string{"Chatroom"}
  1531  
  1532  func (ec *executionContext) _Chatroom(ctx context.Context, sel ast.SelectionSet, obj *Chatroom) graphql.Marshaler {
  1533  	fields := graphql.CollectFields(ctx, sel, chatroomImplementors)
  1534  
  1535  	out := graphql.NewFieldSet(fields)
  1536  	invalid := false
  1537  	for i, field := range fields {
  1538  		switch field.Name {
  1539  		case "__typename":
  1540  			out.Values[i] = graphql.MarshalString("Chatroom")
  1541  		case "name":
  1542  			out.Values[i] = ec._Chatroom_name(ctx, field, obj)
  1543  			if out.Values[i] == graphql.Null {
  1544  				invalid = true
  1545  			}
  1546  		case "messages":
  1547  			out.Values[i] = ec._Chatroom_messages(ctx, field, obj)
  1548  			if out.Values[i] == graphql.Null {
  1549  				invalid = true
  1550  			}
  1551  		default:
  1552  			panic("unknown field " + strconv.Quote(field.Name))
  1553  		}
  1554  	}
  1555  	out.Dispatch()
  1556  	if invalid {
  1557  		return graphql.Null
  1558  	}
  1559  	return out
  1560  }
  1561  
  1562  var messageImplementors = []string{"Message"}
  1563  
  1564  func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, obj *Message) graphql.Marshaler {
  1565  	fields := graphql.CollectFields(ctx, sel, messageImplementors)
  1566  
  1567  	out := graphql.NewFieldSet(fields)
  1568  	invalid := false
  1569  	for i, field := range fields {
  1570  		switch field.Name {
  1571  		case "__typename":
  1572  			out.Values[i] = graphql.MarshalString("Message")
  1573  		case "id":
  1574  			out.Values[i] = ec._Message_id(ctx, field, obj)
  1575  			if out.Values[i] == graphql.Null {
  1576  				invalid = true
  1577  			}
  1578  		case "text":
  1579  			out.Values[i] = ec._Message_text(ctx, field, obj)
  1580  			if out.Values[i] == graphql.Null {
  1581  				invalid = true
  1582  			}
  1583  		case "createdBy":
  1584  			out.Values[i] = ec._Message_createdBy(ctx, field, obj)
  1585  			if out.Values[i] == graphql.Null {
  1586  				invalid = true
  1587  			}
  1588  		case "createdAt":
  1589  			out.Values[i] = ec._Message_createdAt(ctx, field, obj)
  1590  			if out.Values[i] == graphql.Null {
  1591  				invalid = true
  1592  			}
  1593  		default:
  1594  			panic("unknown field " + strconv.Quote(field.Name))
  1595  		}
  1596  	}
  1597  	out.Dispatch()
  1598  	if invalid {
  1599  		return graphql.Null
  1600  	}
  1601  	return out
  1602  }
  1603  
  1604  var mutationImplementors = []string{"Mutation"}
  1605  
  1606  func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
  1607  	fields := graphql.CollectFields(ctx, sel, mutationImplementors)
  1608  
  1609  	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
  1610  		Object: "Mutation",
  1611  	})
  1612  
  1613  	out := graphql.NewFieldSet(fields)
  1614  	invalid := false
  1615  	for i, field := range fields {
  1616  		switch field.Name {
  1617  		case "__typename":
  1618  			out.Values[i] = graphql.MarshalString("Mutation")
  1619  		case "post":
  1620  			out.Values[i] = ec._Mutation_post(ctx, field)
  1621  			if out.Values[i] == graphql.Null {
  1622  				invalid = true
  1623  			}
  1624  		default:
  1625  			panic("unknown field " + strconv.Quote(field.Name))
  1626  		}
  1627  	}
  1628  	out.Dispatch()
  1629  	if invalid {
  1630  		return graphql.Null
  1631  	}
  1632  	return out
  1633  }
  1634  
  1635  var queryImplementors = []string{"Query"}
  1636  
  1637  func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
  1638  	fields := graphql.CollectFields(ctx, sel, queryImplementors)
  1639  
  1640  	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
  1641  		Object: "Query",
  1642  	})
  1643  
  1644  	out := graphql.NewFieldSet(fields)
  1645  	invalid := false
  1646  	for i, field := range fields {
  1647  		switch field.Name {
  1648  		case "__typename":
  1649  			out.Values[i] = graphql.MarshalString("Query")
  1650  		case "room":
  1651  			field := field
  1652  			out.Concurrently(i, func() (res graphql.Marshaler) {
  1653  				defer func() {
  1654  					if r := recover(); r != nil {
  1655  						ec.Error(ctx, ec.Recover(ctx, r))
  1656  					}
  1657  				}()
  1658  				res = ec._Query_room(ctx, field)
  1659  				return res
  1660  			})
  1661  		case "__type":
  1662  			out.Values[i] = ec._Query___type(ctx, field)
  1663  		case "__schema":
  1664  			out.Values[i] = ec._Query___schema(ctx, field)
  1665  		default:
  1666  			panic("unknown field " + strconv.Quote(field.Name))
  1667  		}
  1668  	}
  1669  	out.Dispatch()
  1670  	if invalid {
  1671  		return graphql.Null
  1672  	}
  1673  	return out
  1674  }
  1675  
  1676  var subscriptionImplementors = []string{"Subscription"}
  1677  
  1678  func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler {
  1679  	fields := graphql.CollectFields(ctx, sel, subscriptionImplementors)
  1680  	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
  1681  		Object: "Subscription",
  1682  	})
  1683  	if len(fields) != 1 {
  1684  		ec.Errorf(ctx, "must subscribe to exactly one stream")
  1685  		return nil
  1686  	}
  1687  
  1688  	switch fields[0].Name {
  1689  	case "messageAdded":
  1690  		return ec._Subscription_messageAdded(ctx, fields[0])
  1691  	default:
  1692  		panic("unknown field " + strconv.Quote(fields[0].Name))
  1693  	}
  1694  }
  1695  
  1696  var __DirectiveImplementors = []string{"__Directive"}
  1697  
  1698  func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
  1699  	fields := graphql.CollectFields(ctx, sel, __DirectiveImplementors)
  1700  
  1701  	out := graphql.NewFieldSet(fields)
  1702  	invalid := false
  1703  	for i, field := range fields {
  1704  		switch field.Name {
  1705  		case "__typename":
  1706  			out.Values[i] = graphql.MarshalString("__Directive")
  1707  		case "name":
  1708  			out.Values[i] = ec.___Directive_name(ctx, field, obj)
  1709  			if out.Values[i] == graphql.Null {
  1710  				invalid = true
  1711  			}
  1712  		case "description":
  1713  			out.Values[i] = ec.___Directive_description(ctx, field, obj)
  1714  		case "locations":
  1715  			out.Values[i] = ec.___Directive_locations(ctx, field, obj)
  1716  			if out.Values[i] == graphql.Null {
  1717  				invalid = true
  1718  			}
  1719  		case "args":
  1720  			out.Values[i] = ec.___Directive_args(ctx, field, obj)
  1721  			if out.Values[i] == graphql.Null {
  1722  				invalid = true
  1723  			}
  1724  		default:
  1725  			panic("unknown field " + strconv.Quote(field.Name))
  1726  		}
  1727  	}
  1728  	out.Dispatch()
  1729  	if invalid {
  1730  		return graphql.Null
  1731  	}
  1732  	return out
  1733  }
  1734  
  1735  var __EnumValueImplementors = []string{"__EnumValue"}
  1736  
  1737  func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
  1738  	fields := graphql.CollectFields(ctx, sel, __EnumValueImplementors)
  1739  
  1740  	out := graphql.NewFieldSet(fields)
  1741  	invalid := false
  1742  	for i, field := range fields {
  1743  		switch field.Name {
  1744  		case "__typename":
  1745  			out.Values[i] = graphql.MarshalString("__EnumValue")
  1746  		case "name":
  1747  			out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
  1748  			if out.Values[i] == graphql.Null {
  1749  				invalid = true
  1750  			}
  1751  		case "description":
  1752  			out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
  1753  		case "isDeprecated":
  1754  			out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
  1755  			if out.Values[i] == graphql.Null {
  1756  				invalid = true
  1757  			}
  1758  		case "deprecationReason":
  1759  			out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
  1760  		default:
  1761  			panic("unknown field " + strconv.Quote(field.Name))
  1762  		}
  1763  	}
  1764  	out.Dispatch()
  1765  	if invalid {
  1766  		return graphql.Null
  1767  	}
  1768  	return out
  1769  }
  1770  
  1771  var __FieldImplementors = []string{"__Field"}
  1772  
  1773  func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
  1774  	fields := graphql.CollectFields(ctx, sel, __FieldImplementors)
  1775  
  1776  	out := graphql.NewFieldSet(fields)
  1777  	invalid := false
  1778  	for i, field := range fields {
  1779  		switch field.Name {
  1780  		case "__typename":
  1781  			out.Values[i] = graphql.MarshalString("__Field")
  1782  		case "name":
  1783  			out.Values[i] = ec.___Field_name(ctx, field, obj)
  1784  			if out.Values[i] == graphql.Null {
  1785  				invalid = true
  1786  			}
  1787  		case "description":
  1788  			out.Values[i] = ec.___Field_description(ctx, field, obj)
  1789  		case "args":
  1790  			out.Values[i] = ec.___Field_args(ctx, field, obj)
  1791  			if out.Values[i] == graphql.Null {
  1792  				invalid = true
  1793  			}
  1794  		case "type":
  1795  			out.Values[i] = ec.___Field_type(ctx, field, obj)
  1796  			if out.Values[i] == graphql.Null {
  1797  				invalid = true
  1798  			}
  1799  		case "isDeprecated":
  1800  			out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
  1801  			if out.Values[i] == graphql.Null {
  1802  				invalid = true
  1803  			}
  1804  		case "deprecationReason":
  1805  			out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
  1806  		default:
  1807  			panic("unknown field " + strconv.Quote(field.Name))
  1808  		}
  1809  	}
  1810  	out.Dispatch()
  1811  	if invalid {
  1812  		return graphql.Null
  1813  	}
  1814  	return out
  1815  }
  1816  
  1817  var __InputValueImplementors = []string{"__InputValue"}
  1818  
  1819  func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
  1820  	fields := graphql.CollectFields(ctx, sel, __InputValueImplementors)
  1821  
  1822  	out := graphql.NewFieldSet(fields)
  1823  	invalid := false
  1824  	for i, field := range fields {
  1825  		switch field.Name {
  1826  		case "__typename":
  1827  			out.Values[i] = graphql.MarshalString("__InputValue")
  1828  		case "name":
  1829  			out.Values[i] = ec.___InputValue_name(ctx, field, obj)
  1830  			if out.Values[i] == graphql.Null {
  1831  				invalid = true
  1832  			}
  1833  		case "description":
  1834  			out.Values[i] = ec.___InputValue_description(ctx, field, obj)
  1835  		case "type":
  1836  			out.Values[i] = ec.___InputValue_type(ctx, field, obj)
  1837  			if out.Values[i] == graphql.Null {
  1838  				invalid = true
  1839  			}
  1840  		case "defaultValue":
  1841  			out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
  1842  		default:
  1843  			panic("unknown field " + strconv.Quote(field.Name))
  1844  		}
  1845  	}
  1846  	out.Dispatch()
  1847  	if invalid {
  1848  		return graphql.Null
  1849  	}
  1850  	return out
  1851  }
  1852  
  1853  var __SchemaImplementors = []string{"__Schema"}
  1854  
  1855  func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
  1856  	fields := graphql.CollectFields(ctx, sel, __SchemaImplementors)
  1857  
  1858  	out := graphql.NewFieldSet(fields)
  1859  	invalid := false
  1860  	for i, field := range fields {
  1861  		switch field.Name {
  1862  		case "__typename":
  1863  			out.Values[i] = graphql.MarshalString("__Schema")
  1864  		case "types":
  1865  			out.Values[i] = ec.___Schema_types(ctx, field, obj)
  1866  			if out.Values[i] == graphql.Null {
  1867  				invalid = true
  1868  			}
  1869  		case "queryType":
  1870  			out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
  1871  			if out.Values[i] == graphql.Null {
  1872  				invalid = true
  1873  			}
  1874  		case "mutationType":
  1875  			out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
  1876  		case "subscriptionType":
  1877  			out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
  1878  		case "directives":
  1879  			out.Values[i] = ec.___Schema_directives(ctx, field, obj)
  1880  			if out.Values[i] == graphql.Null {
  1881  				invalid = true
  1882  			}
  1883  		default:
  1884  			panic("unknown field " + strconv.Quote(field.Name))
  1885  		}
  1886  	}
  1887  	out.Dispatch()
  1888  	if invalid {
  1889  		return graphql.Null
  1890  	}
  1891  	return out
  1892  }
  1893  
  1894  var __TypeImplementors = []string{"__Type"}
  1895  
  1896  func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
  1897  	fields := graphql.CollectFields(ctx, sel, __TypeImplementors)
  1898  
  1899  	out := graphql.NewFieldSet(fields)
  1900  	invalid := false
  1901  	for i, field := range fields {
  1902  		switch field.Name {
  1903  		case "__typename":
  1904  			out.Values[i] = graphql.MarshalString("__Type")
  1905  		case "kind":
  1906  			out.Values[i] = ec.___Type_kind(ctx, field, obj)
  1907  			if out.Values[i] == graphql.Null {
  1908  				invalid = true
  1909  			}
  1910  		case "name":
  1911  			out.Values[i] = ec.___Type_name(ctx, field, obj)
  1912  		case "description":
  1913  			out.Values[i] = ec.___Type_description(ctx, field, obj)
  1914  		case "fields":
  1915  			out.Values[i] = ec.___Type_fields(ctx, field, obj)
  1916  		case "interfaces":
  1917  			out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
  1918  		case "possibleTypes":
  1919  			out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
  1920  		case "enumValues":
  1921  			out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
  1922  		case "inputFields":
  1923  			out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
  1924  		case "ofType":
  1925  			out.Values[i] = ec.___Type_ofType(ctx, field, obj)
  1926  		default:
  1927  			panic("unknown field " + strconv.Quote(field.Name))
  1928  		}
  1929  	}
  1930  	out.Dispatch()
  1931  	if invalid {
  1932  		return graphql.Null
  1933  	}
  1934  	return out
  1935  }
  1936  
  1937  // endregion **************************** object.gotpl ****************************
  1938  
  1939  // region    ***************************** type.gotpl *****************************
  1940  
  1941  func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
  1942  	return graphql.UnmarshalBoolean(v)
  1943  }
  1944  
  1945  func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
  1946  	return graphql.MarshalBoolean(v)
  1947  }
  1948  
  1949  func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) {
  1950  	return graphql.UnmarshalID(v)
  1951  }
  1952  
  1953  func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  1954  	return graphql.MarshalID(v)
  1955  }
  1956  
  1957  func (ec *executionContext) marshalNMessage2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx context.Context, sel ast.SelectionSet, v Message) graphql.Marshaler {
  1958  	return ec._Message(ctx, sel, &v)
  1959  }
  1960  
  1961  func (ec *executionContext) marshalNMessage2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx context.Context, sel ast.SelectionSet, v []Message) graphql.Marshaler {
  1962  	ret := make(graphql.Array, len(v))
  1963  	var wg sync.WaitGroup
  1964  	isLen1 := len(v) == 1
  1965  	if !isLen1 {
  1966  		wg.Add(len(v))
  1967  	}
  1968  	for i := range v {
  1969  		i := i
  1970  		rctx := &graphql.ResolverContext{
  1971  			Index:  &i,
  1972  			Result: &v[i],
  1973  		}
  1974  		ctx := graphql.WithResolverContext(ctx, rctx)
  1975  		f := func(i int) {
  1976  			defer func() {
  1977  				if r := recover(); r != nil {
  1978  					ec.Error(ctx, ec.Recover(ctx, r))
  1979  					ret = nil
  1980  				}
  1981  			}()
  1982  			if !isLen1 {
  1983  				defer wg.Done()
  1984  			}
  1985  			ret[i] = ec.marshalNMessage2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx, sel, v[i])
  1986  		}
  1987  		if isLen1 {
  1988  			f(i)
  1989  		} else {
  1990  			go f(i)
  1991  		}
  1992  
  1993  	}
  1994  	wg.Wait()
  1995  	return ret
  1996  }
  1997  
  1998  func (ec *executionContext) marshalNMessage2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx context.Context, sel ast.SelectionSet, v *Message) graphql.Marshaler {
  1999  	if v == nil {
  2000  		if !ec.HasError(graphql.GetResolverContext(ctx)) {
  2001  			ec.Errorf(ctx, "must not be null")
  2002  		}
  2003  		return graphql.Null
  2004  	}
  2005  	return ec._Message(ctx, sel, v)
  2006  }
  2007  
  2008  func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
  2009  	return graphql.UnmarshalString(v)
  2010  }
  2011  
  2012  func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  2013  	return graphql.MarshalString(v)
  2014  }
  2015  
  2016  func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
  2017  	return graphql.UnmarshalTime(v)
  2018  }
  2019  
  2020  func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
  2021  	if v.IsZero() {
  2022  		if !ec.HasError(graphql.GetResolverContext(ctx)) {
  2023  			ec.Errorf(ctx, "must not be null")
  2024  		}
  2025  		return graphql.Null
  2026  	}
  2027  	return graphql.MarshalTime(v)
  2028  }
  2029  
  2030  func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
  2031  	return ec.___Directive(ctx, sel, &v)
  2032  }
  2033  
  2034  func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
  2035  	ret := make(graphql.Array, len(v))
  2036  	var wg sync.WaitGroup
  2037  	isLen1 := len(v) == 1
  2038  	if !isLen1 {
  2039  		wg.Add(len(v))
  2040  	}
  2041  	for i := range v {
  2042  		i := i
  2043  		rctx := &graphql.ResolverContext{
  2044  			Index:  &i,
  2045  			Result: &v[i],
  2046  		}
  2047  		ctx := graphql.WithResolverContext(ctx, rctx)
  2048  		f := func(i int) {
  2049  			defer func() {
  2050  				if r := recover(); r != nil {
  2051  					ec.Error(ctx, ec.Recover(ctx, r))
  2052  					ret = nil
  2053  				}
  2054  			}()
  2055  			if !isLen1 {
  2056  				defer wg.Done()
  2057  			}
  2058  			ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
  2059  		}
  2060  		if isLen1 {
  2061  			f(i)
  2062  		} else {
  2063  			go f(i)
  2064  		}
  2065  
  2066  	}
  2067  	wg.Wait()
  2068  	return ret
  2069  }
  2070  
  2071  func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
  2072  	return graphql.UnmarshalString(v)
  2073  }
  2074  
  2075  func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  2076  	return graphql.MarshalString(v)
  2077  }
  2078  
  2079  func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstring(ctx context.Context, v interface{}) ([]string, error) {
  2080  	var vSlice []interface{}
  2081  	if v != nil {
  2082  		if tmp1, ok := v.([]interface{}); ok {
  2083  			vSlice = tmp1
  2084  		} else {
  2085  			vSlice = []interface{}{v}
  2086  		}
  2087  	}
  2088  	var err error
  2089  	res := make([]string, len(vSlice))
  2090  	for i := range vSlice {
  2091  		res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
  2092  		if err != nil {
  2093  			return nil, err
  2094  		}
  2095  	}
  2096  	return res, nil
  2097  }
  2098  
  2099  func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
  2100  	ret := make(graphql.Array, len(v))
  2101  	var wg sync.WaitGroup
  2102  	isLen1 := len(v) == 1
  2103  	if !isLen1 {
  2104  		wg.Add(len(v))
  2105  	}
  2106  	for i := range v {
  2107  		i := i
  2108  		rctx := &graphql.ResolverContext{
  2109  			Index:  &i,
  2110  			Result: &v[i],
  2111  		}
  2112  		ctx := graphql.WithResolverContext(ctx, rctx)
  2113  		f := func(i int) {
  2114  			defer func() {
  2115  				if r := recover(); r != nil {
  2116  					ec.Error(ctx, ec.Recover(ctx, r))
  2117  					ret = nil
  2118  				}
  2119  			}()
  2120  			if !isLen1 {
  2121  				defer wg.Done()
  2122  			}
  2123  			ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
  2124  		}
  2125  		if isLen1 {
  2126  			f(i)
  2127  		} else {
  2128  			go f(i)
  2129  		}
  2130  
  2131  	}
  2132  	wg.Wait()
  2133  	return ret
  2134  }
  2135  
  2136  func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
  2137  	return ec.___EnumValue(ctx, sel, &v)
  2138  }
  2139  
  2140  func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
  2141  	return ec.___Field(ctx, sel, &v)
  2142  }
  2143  
  2144  func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
  2145  	return ec.___InputValue(ctx, sel, &v)
  2146  }
  2147  
  2148  func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
  2149  	ret := make(graphql.Array, len(v))
  2150  	var wg sync.WaitGroup
  2151  	isLen1 := len(v) == 1
  2152  	if !isLen1 {
  2153  		wg.Add(len(v))
  2154  	}
  2155  	for i := range v {
  2156  		i := i
  2157  		rctx := &graphql.ResolverContext{
  2158  			Index:  &i,
  2159  			Result: &v[i],
  2160  		}
  2161  		ctx := graphql.WithResolverContext(ctx, rctx)
  2162  		f := func(i int) {
  2163  			defer func() {
  2164  				if r := recover(); r != nil {
  2165  					ec.Error(ctx, ec.Recover(ctx, r))
  2166  					ret = nil
  2167  				}
  2168  			}()
  2169  			if !isLen1 {
  2170  				defer wg.Done()
  2171  			}
  2172  			ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
  2173  		}
  2174  		if isLen1 {
  2175  			f(i)
  2176  		} else {
  2177  			go f(i)
  2178  		}
  2179  
  2180  	}
  2181  	wg.Wait()
  2182  	return ret
  2183  }
  2184  
  2185  func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
  2186  	return ec.___Type(ctx, sel, &v)
  2187  }
  2188  
  2189  func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
  2190  	ret := make(graphql.Array, len(v))
  2191  	var wg sync.WaitGroup
  2192  	isLen1 := len(v) == 1
  2193  	if !isLen1 {
  2194  		wg.Add(len(v))
  2195  	}
  2196  	for i := range v {
  2197  		i := i
  2198  		rctx := &graphql.ResolverContext{
  2199  			Index:  &i,
  2200  			Result: &v[i],
  2201  		}
  2202  		ctx := graphql.WithResolverContext(ctx, rctx)
  2203  		f := func(i int) {
  2204  			defer func() {
  2205  				if r := recover(); r != nil {
  2206  					ec.Error(ctx, ec.Recover(ctx, r))
  2207  					ret = nil
  2208  				}
  2209  			}()
  2210  			if !isLen1 {
  2211  				defer wg.Done()
  2212  			}
  2213  			ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
  2214  		}
  2215  		if isLen1 {
  2216  			f(i)
  2217  		} else {
  2218  			go f(i)
  2219  		}
  2220  
  2221  	}
  2222  	wg.Wait()
  2223  	return ret
  2224  }
  2225  
  2226  func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
  2227  	if v == nil {
  2228  		if !ec.HasError(graphql.GetResolverContext(ctx)) {
  2229  			ec.Errorf(ctx, "must not be null")
  2230  		}
  2231  		return graphql.Null
  2232  	}
  2233  	return ec.___Type(ctx, sel, v)
  2234  }
  2235  
  2236  func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
  2237  	return graphql.UnmarshalString(v)
  2238  }
  2239  
  2240  func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  2241  	return graphql.MarshalString(v)
  2242  }
  2243  
  2244  func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
  2245  	return graphql.UnmarshalBoolean(v)
  2246  }
  2247  
  2248  func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
  2249  	return graphql.MarshalBoolean(v)
  2250  }
  2251  
  2252  func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
  2253  	if v == nil {
  2254  		return nil, nil
  2255  	}
  2256  	res, err := ec.unmarshalOBoolean2bool(ctx, v)
  2257  	return &res, err
  2258  }
  2259  
  2260  func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
  2261  	if v == nil {
  2262  		return graphql.Null
  2263  	}
  2264  	return ec.marshalOBoolean2bool(ctx, sel, *v)
  2265  }
  2266  
  2267  func (ec *executionContext) marshalOChatroom2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐChatroom(ctx context.Context, sel ast.SelectionSet, v Chatroom) graphql.Marshaler {
  2268  	return ec._Chatroom(ctx, sel, &v)
  2269  }
  2270  
  2271  func (ec *executionContext) marshalOChatroom2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐChatroom(ctx context.Context, sel ast.SelectionSet, v *Chatroom) graphql.Marshaler {
  2272  	if v == nil {
  2273  		return graphql.Null
  2274  	}
  2275  	return ec._Chatroom(ctx, sel, v)
  2276  }
  2277  
  2278  func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
  2279  	return graphql.UnmarshalString(v)
  2280  }
  2281  
  2282  func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  2283  	return graphql.MarshalString(v)
  2284  }
  2285  
  2286  func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
  2287  	if v == nil {
  2288  		return nil, nil
  2289  	}
  2290  	res, err := ec.unmarshalOString2string(ctx, v)
  2291  	return &res, err
  2292  }
  2293  
  2294  func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
  2295  	if v == nil {
  2296  		return graphql.Null
  2297  	}
  2298  	return ec.marshalOString2string(ctx, sel, *v)
  2299  }
  2300  
  2301  func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
  2302  	ret := make(graphql.Array, len(v))
  2303  	var wg sync.WaitGroup
  2304  	isLen1 := len(v) == 1
  2305  	if !isLen1 {
  2306  		wg.Add(len(v))
  2307  	}
  2308  	for i := range v {
  2309  		i := i
  2310  		rctx := &graphql.ResolverContext{
  2311  			Index:  &i,
  2312  			Result: &v[i],
  2313  		}
  2314  		ctx := graphql.WithResolverContext(ctx, rctx)
  2315  		f := func(i int) {
  2316  			defer func() {
  2317  				if r := recover(); r != nil {
  2318  					ec.Error(ctx, ec.Recover(ctx, r))
  2319  					ret = nil
  2320  				}
  2321  			}()
  2322  			if !isLen1 {
  2323  				defer wg.Done()
  2324  			}
  2325  			ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
  2326  		}
  2327  		if isLen1 {
  2328  			f(i)
  2329  		} else {
  2330  			go f(i)
  2331  		}
  2332  
  2333  	}
  2334  	wg.Wait()
  2335  	return ret
  2336  }
  2337  
  2338  func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
  2339  	ret := make(graphql.Array, len(v))
  2340  	var wg sync.WaitGroup
  2341  	isLen1 := len(v) == 1
  2342  	if !isLen1 {
  2343  		wg.Add(len(v))
  2344  	}
  2345  	for i := range v {
  2346  		i := i
  2347  		rctx := &graphql.ResolverContext{
  2348  			Index:  &i,
  2349  			Result: &v[i],
  2350  		}
  2351  		ctx := graphql.WithResolverContext(ctx, rctx)
  2352  		f := func(i int) {
  2353  			defer func() {
  2354  				if r := recover(); r != nil {
  2355  					ec.Error(ctx, ec.Recover(ctx, r))
  2356  					ret = nil
  2357  				}
  2358  			}()
  2359  			if !isLen1 {
  2360  				defer wg.Done()
  2361  			}
  2362  			ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
  2363  		}
  2364  		if isLen1 {
  2365  			f(i)
  2366  		} else {
  2367  			go f(i)
  2368  		}
  2369  
  2370  	}
  2371  	wg.Wait()
  2372  	return ret
  2373  }
  2374  
  2375  func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
  2376  	ret := make(graphql.Array, len(v))
  2377  	var wg sync.WaitGroup
  2378  	isLen1 := len(v) == 1
  2379  	if !isLen1 {
  2380  		wg.Add(len(v))
  2381  	}
  2382  	for i := range v {
  2383  		i := i
  2384  		rctx := &graphql.ResolverContext{
  2385  			Index:  &i,
  2386  			Result: &v[i],
  2387  		}
  2388  		ctx := graphql.WithResolverContext(ctx, rctx)
  2389  		f := func(i int) {
  2390  			defer func() {
  2391  				if r := recover(); r != nil {
  2392  					ec.Error(ctx, ec.Recover(ctx, r))
  2393  					ret = nil
  2394  				}
  2395  			}()
  2396  			if !isLen1 {
  2397  				defer wg.Done()
  2398  			}
  2399  			ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
  2400  		}
  2401  		if isLen1 {
  2402  			f(i)
  2403  		} else {
  2404  			go f(i)
  2405  		}
  2406  
  2407  	}
  2408  	wg.Wait()
  2409  	return ret
  2410  }
  2411  
  2412  func (ec *executionContext) marshalO__Schema2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler {
  2413  	return ec.___Schema(ctx, sel, &v)
  2414  }
  2415  
  2416  func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
  2417  	if v == nil {
  2418  		return graphql.Null
  2419  	}
  2420  	return ec.___Schema(ctx, sel, v)
  2421  }
  2422  
  2423  func (ec *executionContext) marshalO__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
  2424  	return ec.___Type(ctx, sel, &v)
  2425  }
  2426  
  2427  func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
  2428  	ret := make(graphql.Array, len(v))
  2429  	var wg sync.WaitGroup
  2430  	isLen1 := len(v) == 1
  2431  	if !isLen1 {
  2432  		wg.Add(len(v))
  2433  	}
  2434  	for i := range v {
  2435  		i := i
  2436  		rctx := &graphql.ResolverContext{
  2437  			Index:  &i,
  2438  			Result: &v[i],
  2439  		}
  2440  		ctx := graphql.WithResolverContext(ctx, rctx)
  2441  		f := func(i int) {
  2442  			defer func() {
  2443  				if r := recover(); r != nil {
  2444  					ec.Error(ctx, ec.Recover(ctx, r))
  2445  					ret = nil
  2446  				}
  2447  			}()
  2448  			if !isLen1 {
  2449  				defer wg.Done()
  2450  			}
  2451  			ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
  2452  		}
  2453  		if isLen1 {
  2454  			f(i)
  2455  		} else {
  2456  			go f(i)
  2457  		}
  2458  
  2459  	}
  2460  	wg.Wait()
  2461  	return ret
  2462  }
  2463  
  2464  func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
  2465  	if v == nil {
  2466  		return graphql.Null
  2467  	}
  2468  	return ec.___Type(ctx, sel, v)
  2469  }
  2470  
  2471  // endregion ***************************** type.gotpl *****************************