func()

in _examples/chat/generated.go [104:203]


func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
	ec := executionContext{nil, e, 0, 0, nil}
	_ = ec
	switch typeName + "." + field {

	case "Chatroom.messages":
		if e.complexity.Chatroom.Messages == nil {
			break
		}

		return e.complexity.Chatroom.Messages(childComplexity), true

	case "Chatroom.name":
		if e.complexity.Chatroom.Name == nil {
			break
		}

		return e.complexity.Chatroom.Name(childComplexity), true

	case "Chatroom.subscription":
		if e.complexity.Chatroom.Subscription == nil {
			break
		}

		return e.complexity.Chatroom.Subscription(childComplexity), true

	case "Message.createdAt":
		if e.complexity.Message.CreatedAt == nil {
			break
		}

		return e.complexity.Message.CreatedAt(childComplexity), true

	case "Message.createdBy":
		if e.complexity.Message.CreatedBy == nil {
			break
		}

		return e.complexity.Message.CreatedBy(childComplexity), true

	case "Message.id":
		if e.complexity.Message.ID == nil {
			break
		}

		return e.complexity.Message.ID(childComplexity), true

	case "Message.subscription":
		if e.complexity.Message.Subscription == nil {
			break
		}

		return e.complexity.Message.Subscription(childComplexity), true

	case "Message.text":
		if e.complexity.Message.Text == nil {
			break
		}

		return e.complexity.Message.Text(childComplexity), true

	case "Mutation.post":
		if e.complexity.Mutation.Post == nil {
			break
		}

		args, err := ec.field_Mutation_post_args(context.TODO(), rawArgs)
		if err != nil {
			return 0, false
		}

		return e.complexity.Mutation.Post(childComplexity, args["text"].(string), args["username"].(string), args["roomName"].(string)), true

	case "Query.room":
		if e.complexity.Query.Room == nil {
			break
		}

		args, err := ec.field_Query_room_args(context.TODO(), rawArgs)
		if err != nil {
			return 0, false
		}

		return e.complexity.Query.Room(childComplexity, args["name"].(string)), true

	case "Subscription.messageAdded":
		if e.complexity.Subscription.MessageAdded == nil {
			break
		}

		args, err := ec.field_Subscription_messageAdded_args(context.TODO(), rawArgs)
		if err != nil {
			return 0, false
		}

		return e.complexity.Subscription.MessageAdded(childComplexity, args["roomName"].(string)), true

	}
	return 0, false
}