diff --git a/alert/log/entry.go b/alert/log/entry.go index 469831944d..51c75b8a70 100644 --- a/alert/log/entry.go +++ b/alert/log/entry.go @@ -1,27 +1,171 @@ package alertlog import ( + "context" + "database/sql" + "encoding/json" + "fmt" "time" + + "github.com/target/goalert/util/log" ) -// An Entry is an alert log entry. -type Entry interface { - // AlertID returns the ID of the alert the Entry belongs to. - AlertID() int +type Entry struct { + id int + alertID int + timestamp time.Time + _type Type + message string + subject struct { + _type SubjectType + userID sql.NullString + userName sql.NullString + integrationKeyID sql.NullString + integrationKeyName sql.NullString + heartbeatMonitorID sql.NullString + heartbeatMonitorName sql.NullString + channelID sql.NullString + channelName sql.NullString + classifier string + } + meta rawJSON +} + +func (e Entry) Meta() interface{} { + switch e.Type() { + case TypeEscalated: + var esc EscalationMetaData + err := json.Unmarshal(e.meta, &esc) + if err != nil { + log.Debug(context.Background(), err) + return nil + } + return &esc + } + + return nil +} +func (e Entry) AlertID() int { + return e.alertID +} + +func (e Entry) ID() int { + return e.id +} + +func (e Entry) Timestamp() time.Time { + return e.timestamp +} +func (e Entry) Type() Type { + switch e._type { + case _TypeResponseReceived: + return respRecvType(e.message) + case _TypeStatusChanged: + return statChgType(e.message) + } + + return e._type +} + +func (e Entry) Subject() *Subject { + if e.subject._type == SubjectTypeNone { + if e.message != "" { + return e.subjectFromMessage() + } + return nil + } + + s := &Subject{ + Type: e.subject._type, + Classifier: e.subject.classifier, + } + + switch s.Type { + case SubjectTypeUser: + s.ID = e.subject.userID.String + s.Name = e.subject.userName.String + case SubjectTypeIntegrationKey: + s.ID = e.subject.integrationKeyID.String + s.Name = e.subject.integrationKeyName.String + case SubjectTypeHeartbeatMonitor: + s.ID = e.subject.heartbeatMonitorID.String + s.Name = e.subject.heartbeatMonitorName.String + case SubjectTypeChannel: + s.ID = e.subject.channelID.String + s.Name = e.subject.channelName.String + } - // ID returns the ID of the log entry. - ID() int - // Timestamp returns the time the Entry was created. - Timestamp() time.Time + return s +} + +func escalationMsg(m *EscalationMetaData) string { + msg := fmt.Sprintf(" to step #%d", m.NewStepIndex+1) + if m.Repeat { + msg += " (policy repeat)" + } + if m.Forced { + msg += " due to manual escalation" + } else if m.Deleted { + msg += " due to current step being deleted" + } else if m.OldDelayMinutes > 0 { + msg += fmt.Sprintf(" automatically after %d minutes", m.OldDelayMinutes) + } - // Type returns type type of log entry. - Type() Type + return msg +} - // Subject will return the subject, if available of the Entry. - Subject() *Subject +func (e Entry) String() string { + var msg string + var infinitive bool + switch e.Type() { + case TypeCreated: + msg = "Created" + case TypeAcknowledged: + msg = "Acknowledged" + case TypeClosed: + msg = "Closed" + case TypeEscalated: + msg = "Escalated" + meta, ok := e.Meta().(*EscalationMetaData) + if ok { + msg += escalationMsg(meta) + } + case TypeNotificationSent: + msg = "Notification sent" + infinitive = true + case TypePolicyUpdated: + msg = "Policy updated" + case TypeDuplicateSupressed: + msg = "Suppressed duplicate: created" + case TypeEscalationRequest: + msg = "Escalation requested" + default: + return "Error" + } - // String returns the string representation of a log Event. - String() string + // include subject, if available + msg += subjectString(infinitive, e.Subject()) + + return msg +} - Meta() interface{} +func (e *Entry) scanWith(scan func(...interface{}) error) error { + return scan( + &e.id, + &e.alertID, + &e.timestamp, + &e._type, + &e.message, + &e.subject._type, + &e.subject.userID, + &e.subject.userName, + &e.subject.integrationKeyID, + &e.subject.integrationKeyName, + &e.subject.heartbeatMonitorID, + &e.subject.heartbeatMonitorName, + &e.subject.channelID, + &e.subject.channelName, + &e.subject.classifier, + &e.meta, + ) } diff --git a/alert/log/legacylogs.go b/alert/log/legacylogs.go index f9c493f4ee..a6461f08a5 100644 --- a/alert/log/legacylogs.go +++ b/alert/log/legacylogs.go @@ -5,7 +5,7 @@ import ( "strings" ) -func (e *rawEntry) subjectFromMessage() *Subject { +func (e *Entry) subjectFromMessage() *Subject { switch e._type { case TypeCreated: return createdSubject(e.message) diff --git a/alert/log/legacysearch.go b/alert/log/legacysearch.go index e127acb58d..fb7d5f8633 100644 --- a/alert/log/legacysearch.go +++ b/alert/log/legacysearch.go @@ -5,15 +5,14 @@ import ( "context" "database/sql" "fmt" - "github.com/target/goalert/util/sqlutil" "time" + "github.com/pkg/errors" "github.com/target/goalert/permission" "github.com/target/goalert/search" + "github.com/target/goalert/util/sqlutil" "github.com/target/goalert/validation" "github.com/target/goalert/validation/validate" - - "github.com/pkg/errors" ) // LegacySearchOptions contains criteria for filtering alert logs. At a minimum, at least one of AlertID or ServiceID must be specified. @@ -213,21 +212,17 @@ func (db *DB) LegacySearch(ctx context.Context, opts *LegacySearchOptions) ([]En } defer rows.Close() - var result []rawEntry + var result []Entry for rows.Next() { - var r rawEntry + var r Entry err = r.scanWith(rows.Scan) if err != nil { return nil, 0, err } result = append(result, r) } - var logs []Entry - for _, e := range result { - logs = append(logs, e) - } - return logs, total, nil + return result, total, nil } diff --git a/alert/log/rawentry.go b/alert/log/rawentry.go deleted file mode 100644 index 038477ab72..0000000000 --- a/alert/log/rawentry.go +++ /dev/null @@ -1,170 +0,0 @@ -package alertlog - -import ( - "context" - "database/sql" - "encoding/json" - "fmt" - "github.com/target/goalert/util/log" - "time" -) - -type rawEntry struct { - id int - alertID int - timestamp time.Time - _type Type - message string - subject struct { - _type SubjectType - userID sql.NullString - userName sql.NullString - integrationKeyID sql.NullString - integrationKeyName sql.NullString - heartbeatMonitorID sql.NullString - heartbeatMonitorName sql.NullString - channelID sql.NullString - channelName sql.NullString - classifier string - } - meta rawJSON -} - -func (e rawEntry) Meta() interface{} { - switch e.Type() { - case TypeEscalated: - var esc EscalationMetaData - err := json.Unmarshal(e.meta, &esc) - if err != nil { - log.Debug(context.Background(), err) - return nil - } - return &esc - } - - return nil -} -func (e rawEntry) AlertID() int { - return e.alertID -} - -func (e rawEntry) ID() int { - return e.id -} - -func (e rawEntry) Timestamp() time.Time { - return e.timestamp -} -func (e rawEntry) Type() Type { - switch e._type { - case _TypeResponseReceived: - return respRecvType(e.message) - case _TypeStatusChanged: - return statChgType(e.message) - } - - return e._type -} - -func (e rawEntry) Subject() *Subject { - if e.subject._type == SubjectTypeNone { - if e.message != "" { - return e.subjectFromMessage() - } - return nil - } - - s := &Subject{ - Type: e.subject._type, - Classifier: e.subject.classifier, - } - - switch s.Type { - case SubjectTypeUser: - s.ID = e.subject.userID.String - s.Name = e.subject.userName.String - case SubjectTypeIntegrationKey: - s.ID = e.subject.integrationKeyID.String - s.Name = e.subject.integrationKeyName.String - case SubjectTypeHeartbeatMonitor: - s.ID = e.subject.heartbeatMonitorID.String - s.Name = e.subject.heartbeatMonitorName.String - case SubjectTypeChannel: - s.ID = e.subject.channelID.String - s.Name = e.subject.channelName.String - } - - return s -} - -func escalationMsg(m *EscalationMetaData) string { - msg := fmt.Sprintf(" to step #%d", m.NewStepIndex+1) - if m.Repeat { - msg += " (policy repeat)" - } - if m.Forced { - msg += " due to manual escalation" - } else if m.Deleted { - msg += " due to current step being deleted" - } else if m.OldDelayMinutes > 0 { - msg += fmt.Sprintf(" automatically after %d minutes", m.OldDelayMinutes) - } - - return msg -} - -func (e rawEntry) String() string { - var msg string - var infinitive bool - switch e.Type() { - case TypeCreated: - msg = "Created" - case TypeAcknowledged: - msg = "Acknowledged" - case TypeClosed: - msg = "Closed" - case TypeEscalated: - msg = "Escalated" - meta, ok := e.Meta().(*EscalationMetaData) - if ok { - msg += escalationMsg(meta) - } - case TypeNotificationSent: - msg = "Notification sent" - infinitive = true - case TypePolicyUpdated: - msg = "Policy updated" - case TypeDuplicateSupressed: - msg = "Suppressed duplicate: created" - case TypeEscalationRequest: - msg = "Escalation requested" - default: - return "Error" - } - - // include subject, if available - msg += subjectString(infinitive, e.Subject()) - - return msg -} - -func (e *rawEntry) scanWith(scan func(...interface{}) error) error { - return scan( - &e.id, - &e.alertID, - &e.timestamp, - &e._type, - &e.message, - &e.subject._type, - &e.subject.userID, - &e.subject.userName, - &e.subject.integrationKeyID, - &e.subject.integrationKeyName, - &e.subject.heartbeatMonitorID, - &e.subject.heartbeatMonitorName, - &e.subject.channelID, - &e.subject.channelName, - &e.subject.classifier, - &e.meta, - ) -} diff --git a/alert/log/search.go b/alert/log/search.go index bc60edf2d6..53f81edbc8 100644 --- a/alert/log/search.go +++ b/alert/log/search.go @@ -3,11 +3,12 @@ package alertlog import ( "context" "database/sql" + "text/template" + "github.com/target/goalert/permission" "github.com/target/goalert/search" "github.com/target/goalert/util/sqlutil" "github.com/target/goalert/validation/validate" - "text/template" "github.com/pkg/errors" ) @@ -113,20 +114,16 @@ func (db *DB) Search(ctx context.Context, opts *SearchOptions) ([]Entry, error) } defer rows.Close() - var result []rawEntry + var result []Entry for rows.Next() { - var r rawEntry + var r Entry err = r.scanWith(rows.Scan) if err != nil { return nil, err } result = append(result, r) } - var logs []Entry - for _, e := range result { - logs = append(logs, e) - } - return logs, nil + return result, nil } diff --git a/alert/log/store.go b/alert/log/store.go index 4c1acedcd9..b653fa7176 100644 --- a/alert/log/store.go +++ b/alert/log/store.go @@ -20,14 +20,14 @@ import ( ) type Store interface { - FindOne(ctx context.Context, logID int) (Entry, error) + FindOne(ctx context.Context, logID int) (*Entry, error) FindAll(ctx context.Context, alertID int) ([]Entry, error) Log(ctx context.Context, alertID int, _type Type, meta interface{}) error LogTx(ctx context.Context, tx *sql.Tx, alertID int, _type Type, meta interface{}) error LogEPTx(ctx context.Context, tx *sql.Tx, epID string, _type Type, meta *EscalationMetaData) error LogServiceTx(ctx context.Context, tx *sql.Tx, serviceID string, _type Type, meta interface{}) error LogManyTx(ctx context.Context, tx *sql.Tx, alertIDs []int, _type Type, meta interface{}) error - FindLatestByType(ctx context.Context, alertID int, status Type) (Entry, error) + FindLatestByType(ctx context.Context, alertID int, status Type) (*Entry, error) LegacySearch(ctx context.Context, opt *LegacySearchOptions) ([]Entry, int, error) Search(ctx context.Context, opt *SearchOptions) ([]Entry, error) @@ -276,7 +276,7 @@ func (db *DB) logAny(ctx context.Context, tx *sql.Tx, insertStmt *sql.Stmt, id i _type = TypeClosed } - var r rawEntry + var r Entry r._type = _type if meta != nil { @@ -411,13 +411,13 @@ func (db *DB) logAny(ctx context.Context, tx *sql.Tx, insertStmt *sql.Stmt, id i _, err = txWrap(ctx, tx, insertStmt).ExecContext(ctx, idArg, _type, r.subject._type, r.subject.userID, r.subject.integrationKeyID, r.subject.heartbeatMonitorID, r.subject.channelID, r.subject.classifier, r.meta, r.String()) return err } -func (db *DB) FindOne(ctx context.Context, logID int) (Entry, error) { +func (db *DB) FindOne(ctx context.Context, logID int) (*Entry, error) { err := permission.LimitCheckAny(ctx, permission.All) if err != nil { return nil, err } - var e rawEntry + var e Entry row := db.findOne.QueryRowContext(ctx, logID) err = e.scanWith(row.Scan) if err != nil { @@ -438,8 +438,8 @@ func (db *DB) FindAll(ctx context.Context, alertID int) ([]Entry, error) { } defer rows.Close() - var raw []rawEntry - var e rawEntry + var raw []Entry + var e Entry for rows.Next() { err := e.scanWith(rows.Scan) if err != nil { @@ -451,8 +451,8 @@ func (db *DB) FindAll(ctx context.Context, alertID int) ([]Entry, error) { return dedupEvents(raw), nil } -func dedupEvents(raw []rawEntry) []Entry { - var cur Entry +func dedupEvents(raw []Entry) []Entry { + var cur *Entry var result []Entry for _, e := range raw { switch e.Type() { @@ -460,20 +460,20 @@ func dedupEvents(raw []rawEntry) []Entry { // these are the ones we want to dedup default: if cur != nil { - result = append(result, cur) + result = append(result, *cur) cur = nil } result = append(result, e) continue } if cur == nil { - cur = e + cur = &e continue } if e.Type() != cur.Type() { - result = append(result, cur) - cur = e + result = append(result, *cur) + cur = &e continue } @@ -486,35 +486,35 @@ func dedupEvents(raw []rawEntry) []Entry { cSub := cur.Subject() if cSub == nil { // old one has none, new one does - cur = e + cur = &e continue } // both have subjects, only replace if the new one // has a classifier if eSub.Classifier != "" { - cur = e + cur = &e continue } } if cur != nil { - result = append(result, cur) + result = append(result, *cur) } return result } // FindLatestByType returns the latest Log Entry given alertID and status type -func (db *DB) FindLatestByType(ctx context.Context, alertID int, status Type) (Entry, error) { +func (db *DB) FindLatestByType(ctx context.Context, alertID int, status Type) (*Entry, error) { err := permission.LimitCheckAny(ctx, permission.All) if err != nil { return nil, err } - var e rawEntry + var e Entry row := db.findAllByType.QueryRowContext(ctx, alertID, status) err = e.scanWith(row.Scan) if err != nil { return nil, err } - return e, nil + return &e, nil } diff --git a/alert/logentryfetcher.go b/alert/logentryfetcher.go index c55f7e469d..e49b0c1685 100644 --- a/alert/logentryfetcher.go +++ b/alert/logentryfetcher.go @@ -2,6 +2,7 @@ package alert import ( "context" + alertlog "github.com/target/goalert/alert/log" "github.com/pkg/errors" @@ -9,7 +10,7 @@ import ( type LogEntryFetcher interface { // LogEntry fetchs the latest log entry for a given alertID and type. - LogEntry(ctx context.Context) (alertlog.Entry, error) + LogEntry(ctx context.Context) (*alertlog.Entry, error) } type logError struct { @@ -20,7 +21,7 @@ type logError struct { logDB alertlog.Store } -func (e logError) LogEntry(ctx context.Context) (alertlog.Entry, error) { +func (e logError) LogEntry(ctx context.Context) (*alertlog.Entry, error) { return e.logDB.FindLatestByType(ctx, e.alertID, e._type) } diff --git a/app/inithttp.go b/app/inithttp.go index c25a214782..664fd19851 100644 --- a/app/inithttp.go +++ b/app/inithttp.go @@ -42,6 +42,13 @@ func (app *App) initHTTP(ctx context.Context) error { // add app config to request context func(next http.Handler) http.Handler { return config.Handler(next, app.ConfigStore) }, + func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + w.Header().Set("Referrer-Policy", "same-origin") + next.ServeHTTP(w, req) + }) + }, + // request cooldown tracking (for graceful shutdown) func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { diff --git a/go.mod b/go.mod index fb418fb0b3..92c9342570 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.49.0 contrib.go.opencensus.io/exporter/jaeger v0.2.0 contrib.go.opencensus.io/exporter/stackdriver v0.12.8 - github.com/99designs/gqlgen v0.8.3 + github.com/99designs/gqlgen v0.10.1 github.com/abiosoft/ishell v2.0.0+incompatible github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db // indirect github.com/agnivade/levenshtein v1.0.3 // indirect @@ -44,7 +44,7 @@ require ( github.com/pelletier/go-toml v1.6.0 github.com/pkg/errors v0.8.1 github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect - github.com/rubenv/sql-migrate v0.0.0-20191120154558-0d68dd7a4f9e + github.com/rubenv/sql-migrate v0.0.0-20191121092708-da1cb182f00e github.com/satori/go.uuid v1.2.0 github.com/shopspring/decimal v0.0.0-20191009025716-f1972eb1d1f5 // indirect github.com/sirupsen/logrus v1.4.2 @@ -61,13 +61,12 @@ require ( github.com/vbauerster/mpb/v4 v4.11.1 github.com/vektah/gqlparser v1.2.0 go.opencensus.io v0.22.2 - golang.org/x/crypto v0.0.0-20191119213627-4f8c1d86b1ba - golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914 - golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 + golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c + golang.org/x/net v0.0.0-20191125084936-ffdde1057850 + golang.org/x/oauth2 v0.0.0-20191122200657-5d9234df094c golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e // indirect - golang.org/x/tools v0.0.0-20191120155938-b3340bdf3676 + golang.org/x/tools v0.0.0-20191125182823-acc15743c3f6 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect - google.golang.org/appengine v1.6.5 // indirect google.golang.org/genproto v0.0.0-20191115221424-83cc0476cb11 // indirect google.golang.org/grpc v1.25.1 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect diff --git a/go.sum b/go.sum index d60e5e51d6..522bfe7e16 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUji contrib.go.opencensus.io/exporter/stackdriver v0.12.8 h1:iXI5hr7pUwMx0IwMphpKz5Q3If/G5JiWFVZ5MPPxP9E= contrib.go.opencensus.io/exporter/stackdriver v0.12.8/go.mod h1:XyyafDnFOsqoxHJgTFycKZMrRUrPThLh2iYTJF6uoO0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/99designs/gqlgen v0.8.3 h1:I6bMglXNKkn4KlvkSMzqZw53e1N2FF9Gud4NmsOxqiA= -github.com/99designs/gqlgen v0.8.3/go.mod h1:aLyJw9xUgdJxZ8EqNQxo2pGFhXXJ/hq8t7J4yn8TgI4= +github.com/99designs/gqlgen v0.10.1 h1:1BgB6XKGTHq7uH4G1/PYyKe2Kz7/vw3AlvMZlD3TEEY= +github.com/99designs/gqlgen v0.10.1/go.mod h1:IviubpnyI4gbBcj8IcxSSc/Q/+af5riwCmJmwF0uaPE= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -37,8 +37,6 @@ github.com/agnivade/levenshtein v1.0.3/go.mod h1:4SFRZbbXWLF4MU1T9Qg0pGgH3Pjs+t6 github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= -github.com/alecthomas/chroma v0.6.9 h1:afiCdwnNPo6fcyvoqqsXs78t7NbR9TuW4wDB7NJkcag= -github.com/alecthomas/chroma v0.6.9/go.mod h1:1U/PfCsTALWWYHDnsIQkxEBM0+6LLe0v8+RSVMOwxeY= github.com/alecthomas/chroma v0.7.0 h1:z+0HgTUmkpRDRz0SRSdMaqOLfJV4F+N1FPDZUZIDUzw= github.com/alecthomas/chroma v0.7.0/go.mod h1:1U/PfCsTALWWYHDnsIQkxEBM0+6LLe0v8+RSVMOwxeY= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= @@ -60,12 +58,14 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.38 h1:QfclT79PFWCyaPDq9+zTEWsOMDWFswTpP9i07YxqPf0= github.com/aws/aws-sdk-go v1.25.38/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/brianvoe/gofakeit v3.18.0+incompatible h1:wDOmHc9DLG4nRjUVVaxA+CEglKOW72Y5+4WNxUIkjM8= github.com/brianvoe/gofakeit v3.18.0+incompatible/go.mod h1:kfwdRA90vvNhPutZWfH7WPaDzUjz+CZFqG+rPkOjGOc= github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= @@ -105,6 +105,7 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -134,13 +135,20 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= +github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= @@ -202,6 +210,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= @@ -289,6 +299,7 @@ github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -298,8 +309,11 @@ github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= @@ -308,6 +322,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= @@ -320,6 +336,7 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -337,13 +354,16 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzr github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rubenv/sql-migrate v0.0.0-20191120154558-0d68dd7a4f9e h1:nvHW4cWRs4q9/WE4rL5BFQs7UrwehVldA0QyxUWI/KY= -github.com/rubenv/sql-migrate v0.0.0-20191120154558-0d68dd7a4f9e/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= +github.com/rubenv/sql-migrate v0.0.0-20191121092708-da1cb182f00e h1:vZzr5nI/hQHxNbZXX6jdFOUM63QGJExahnsYXt7Awug= +github.com/rubenv/sql-migrate v0.0.0-20191121092708-da1cb182f00e/go.mod h1:rtQlpHw+eR6UrqaS3kX1VYeaCxzCVdimDS7g5Ln4pPc= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -416,7 +436,8 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/vbauerster/mpb/v4 v4.11.1 h1:ZOYQSVHgmeanXsbyC44aDg76tBGCS/54Rk8VkL8dJGA= github.com/vbauerster/mpb/v4 v4.11.1/go.mod h1:vMLa1J/ZKC83G2lB/52XpqT+ZZtFG4aZOdKhmpRL1uM= -github.com/vektah/dataloaden v0.2.0/go.mod h1:vxM6NuRlgiR0M6wbVTJeKp9vQIs81ZMfCYO+4yq/jbE= +github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e h1:+w0Zm/9gaWpEAyDlU1eKOuk5twTjAjuevXqcJJw8hrg= +github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= github.com/vektah/gqlparser v1.1.2 h1:ZsyLGn7/7jDNI+y4SEhI4yAxRChlv15pUHMjijT+e68= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vektah/gqlparser v1.2.0 h1:ntkSCX7F5ZJKl+HIVnmLaO269MruasVpNiMOjX9kgo0= @@ -425,6 +446,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5 github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= @@ -440,15 +462,17 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191119213627-4f8c1d86b1ba h1:9bFeDpN3gTqNanMVqNcoR/pJQuP5uroC3t1D7eXozTE= -golang.org/x/crypto v0.0.0-20191119213627-4f8c1d86b1ba/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c h1:/nJuwDLoL/zrqY6gf57vxC+Pi+pZ8bfhpPkicO5H7W4= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -469,7 +493,6 @@ golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/net v0.0.0-20180404174746-b3c676e531a6/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -486,12 +509,14 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914 h1:MlY3mEfbnWGmUi4rtHOtNnnnN4UJRGSyLPx+DXA5Sq4= -golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191125084936-ffdde1057850 h1:Vq85/r8R9IdcUHmZ0/nQlUg1v15rzvQ2sHdnZAj/x7s= +golang.org/x/net v0.0.0-20191125084936-ffdde1057850/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191122200657-5d9234df094c h1:HjRaKPaiWks0f5tA6ELVF7ZfqSppfPwOEEAvsrKUTO4= +golang.org/x/oauth2 v0.0.0-20191122200657-5d9234df094c/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -501,6 +526,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEha golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -515,6 +541,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -543,6 +570,7 @@ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -551,10 +579,11 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f h1:ESK9Jb5JOE+y4u+ozMQeXfMHwEHm6zVbaDQkeaj6wI4= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191120155938-b3340bdf3676 h1:p29VJKJ0D5eTUob+00d5592P0z0y57bQzEWiULIab20= -golang.org/x/tools v0.0.0-20191120155938-b3340bdf3676/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125182823-acc15743c3f6 h1:Gf5uAD3vrwHdZZsPCuRG2v1g2pX8ClixhrwqxTJ9QQ0= +golang.org/x/tools v0.0.0-20191125182823-acc15743c3f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= @@ -606,6 +635,8 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/gorp.v1 v1.7.2 h1:j3DWlAyGVv8whO7AcIWznQ2Yj7yJkn34B8s63GViAAw= +gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.4.0 h1:0kXPskUMGAXXWJlP05ktEMOV0vmzFQUWw6d+aZJQU8A= @@ -616,6 +647,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/graphql2/generated.go b/graphql2/generated.go index f495360472..d9aa346c03 100644 --- a/graphql2/generated.go +++ b/graphql2/generated.go @@ -8,12 +8,13 @@ import ( "errors" "strconv" "sync" + "sync/atomic" "time" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" "github.com/target/goalert/alert" - "github.com/target/goalert/alert/log" + alertlog "github.com/target/goalert/alert/log" "github.com/target/goalert/assignment" "github.com/target/goalert/escalation" "github.com/target/goalert/heartbeat" @@ -420,8 +421,6 @@ type AlertResolver interface { RecentEvents(ctx context.Context, obj *alert.Alert, input *AlertRecentEventsOptions) (*AlertLogEntryConnection, error) } type AlertLogEntryResolver interface { - ID(ctx context.Context, obj *alertlog.Entry) (int, error) - Timestamp(ctx context.Context, obj *alertlog.Entry) (*time.Time, error) Message(ctx context.Context, obj *alertlog.Entry) (string, error) } type EscalationPolicyResolver interface { @@ -575,35 +574,35 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in _ = ec switch typeName + "." + field { - case "Alert.AlertID": + case "Alert.alertID": if e.complexity.Alert.AlertID == nil { break } return e.complexity.Alert.AlertID(childComplexity), true - case "Alert.CreatedAt": + case "Alert.createdAt": if e.complexity.Alert.CreatedAt == nil { break } return e.complexity.Alert.CreatedAt(childComplexity), true - case "Alert.Details": + case "Alert.details": if e.complexity.Alert.Details == nil { break } return e.complexity.Alert.Details(childComplexity), true - case "Alert.ID": + case "Alert.id": if e.complexity.Alert.ID == nil { break } return e.complexity.Alert.ID(childComplexity), true - case "Alert.RecentEvents": + case "Alert.recentEvents": if e.complexity.Alert.RecentEvents == nil { break } @@ -615,385 +614,385 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Alert.RecentEvents(childComplexity, args["input"].(*AlertRecentEventsOptions)), true - case "Alert.Service": + case "Alert.service": if e.complexity.Alert.Service == nil { break } return e.complexity.Alert.Service(childComplexity), true - case "Alert.ServiceID": + case "Alert.serviceID": if e.complexity.Alert.ServiceID == nil { break } return e.complexity.Alert.ServiceID(childComplexity), true - case "Alert.State": + case "Alert.state": if e.complexity.Alert.State == nil { break } return e.complexity.Alert.State(childComplexity), true - case "Alert.Status": + case "Alert.status": if e.complexity.Alert.Status == nil { break } return e.complexity.Alert.Status(childComplexity), true - case "Alert.Summary": + case "Alert.summary": if e.complexity.Alert.Summary == nil { break } return e.complexity.Alert.Summary(childComplexity), true - case "AlertConnection.Nodes": + case "AlertConnection.nodes": if e.complexity.AlertConnection.Nodes == nil { break } return e.complexity.AlertConnection.Nodes(childComplexity), true - case "AlertConnection.PageInfo": + case "AlertConnection.pageInfo": if e.complexity.AlertConnection.PageInfo == nil { break } return e.complexity.AlertConnection.PageInfo(childComplexity), true - case "AlertLogEntry.ID": + case "AlertLogEntry.id": if e.complexity.AlertLogEntry.ID == nil { break } return e.complexity.AlertLogEntry.ID(childComplexity), true - case "AlertLogEntry.Message": + case "AlertLogEntry.message": if e.complexity.AlertLogEntry.Message == nil { break } return e.complexity.AlertLogEntry.Message(childComplexity), true - case "AlertLogEntry.Timestamp": + case "AlertLogEntry.timestamp": if e.complexity.AlertLogEntry.Timestamp == nil { break } return e.complexity.AlertLogEntry.Timestamp(childComplexity), true - case "AlertLogEntryConnection.Nodes": + case "AlertLogEntryConnection.nodes": if e.complexity.AlertLogEntryConnection.Nodes == nil { break } return e.complexity.AlertLogEntryConnection.Nodes(childComplexity), true - case "AlertLogEntryConnection.PageInfo": + case "AlertLogEntryConnection.pageInfo": if e.complexity.AlertLogEntryConnection.PageInfo == nil { break } return e.complexity.AlertLogEntryConnection.PageInfo(childComplexity), true - case "AlertState.LastEscalation": + case "AlertState.lastEscalation": if e.complexity.AlertState.LastEscalation == nil { break } return e.complexity.AlertState.LastEscalation(childComplexity), true - case "AlertState.RepeatCount": + case "AlertState.repeatCount": if e.complexity.AlertState.RepeatCount == nil { break } return e.complexity.AlertState.RepeatCount(childComplexity), true - case "AlertState.StepNumber": + case "AlertState.stepNumber": if e.complexity.AlertState.StepNumber == nil { break } return e.complexity.AlertState.StepNumber(childComplexity), true - case "AuthSubject.ProviderID": + case "AuthSubject.providerID": if e.complexity.AuthSubject.ProviderID == nil { break } return e.complexity.AuthSubject.ProviderID(childComplexity), true - case "AuthSubject.SubjectID": + case "AuthSubject.subjectID": if e.complexity.AuthSubject.SubjectID == nil { break } return e.complexity.AuthSubject.SubjectID(childComplexity), true - case "AuthSubject.UserID": + case "AuthSubject.userID": if e.complexity.AuthSubject.UserID == nil { break } return e.complexity.AuthSubject.UserID(childComplexity), true - case "AuthSubjectConnection.Nodes": + case "AuthSubjectConnection.nodes": if e.complexity.AuthSubjectConnection.Nodes == nil { break } return e.complexity.AuthSubjectConnection.Nodes(childComplexity), true - case "AuthSubjectConnection.PageInfo": + case "AuthSubjectConnection.pageInfo": if e.complexity.AuthSubjectConnection.PageInfo == nil { break } return e.complexity.AuthSubjectConnection.PageInfo(childComplexity), true - case "ConfigValue.Description": + case "ConfigValue.description": if e.complexity.ConfigValue.Description == nil { break } return e.complexity.ConfigValue.Description(childComplexity), true - case "ConfigValue.ID": + case "ConfigValue.id": if e.complexity.ConfigValue.ID == nil { break } return e.complexity.ConfigValue.ID(childComplexity), true - case "ConfigValue.Password": + case "ConfigValue.password": if e.complexity.ConfigValue.Password == nil { break } return e.complexity.ConfigValue.Password(childComplexity), true - case "ConfigValue.Type": + case "ConfigValue.type": if e.complexity.ConfigValue.Type == nil { break } return e.complexity.ConfigValue.Type(childComplexity), true - case "ConfigValue.Value": + case "ConfigValue.value": if e.complexity.ConfigValue.Value == nil { break } return e.complexity.ConfigValue.Value(childComplexity), true - case "EscalationPolicy.AssignedTo": + case "EscalationPolicy.assignedTo": if e.complexity.EscalationPolicy.AssignedTo == nil { break } return e.complexity.EscalationPolicy.AssignedTo(childComplexity), true - case "EscalationPolicy.Description": + case "EscalationPolicy.description": if e.complexity.EscalationPolicy.Description == nil { break } return e.complexity.EscalationPolicy.Description(childComplexity), true - case "EscalationPolicy.ID": + case "EscalationPolicy.id": if e.complexity.EscalationPolicy.ID == nil { break } return e.complexity.EscalationPolicy.ID(childComplexity), true - case "EscalationPolicy.Name": + case "EscalationPolicy.name": if e.complexity.EscalationPolicy.Name == nil { break } return e.complexity.EscalationPolicy.Name(childComplexity), true - case "EscalationPolicy.Repeat": + case "EscalationPolicy.repeat": if e.complexity.EscalationPolicy.Repeat == nil { break } return e.complexity.EscalationPolicy.Repeat(childComplexity), true - case "EscalationPolicy.Steps": + case "EscalationPolicy.steps": if e.complexity.EscalationPolicy.Steps == nil { break } return e.complexity.EscalationPolicy.Steps(childComplexity), true - case "EscalationPolicyConnection.Nodes": + case "EscalationPolicyConnection.nodes": if e.complexity.EscalationPolicyConnection.Nodes == nil { break } return e.complexity.EscalationPolicyConnection.Nodes(childComplexity), true - case "EscalationPolicyConnection.PageInfo": + case "EscalationPolicyConnection.pageInfo": if e.complexity.EscalationPolicyConnection.PageInfo == nil { break } return e.complexity.EscalationPolicyConnection.PageInfo(childComplexity), true - case "EscalationPolicyStep.DelayMinutes": + case "EscalationPolicyStep.delayMinutes": if e.complexity.EscalationPolicyStep.DelayMinutes == nil { break } return e.complexity.EscalationPolicyStep.DelayMinutes(childComplexity), true - case "EscalationPolicyStep.EscalationPolicy": + case "EscalationPolicyStep.escalationPolicy": if e.complexity.EscalationPolicyStep.EscalationPolicy == nil { break } return e.complexity.EscalationPolicyStep.EscalationPolicy(childComplexity), true - case "EscalationPolicyStep.ID": + case "EscalationPolicyStep.id": if e.complexity.EscalationPolicyStep.ID == nil { break } return e.complexity.EscalationPolicyStep.ID(childComplexity), true - case "EscalationPolicyStep.StepNumber": + case "EscalationPolicyStep.stepNumber": if e.complexity.EscalationPolicyStep.StepNumber == nil { break } return e.complexity.EscalationPolicyStep.StepNumber(childComplexity), true - case "EscalationPolicyStep.Targets": + case "EscalationPolicyStep.targets": if e.complexity.EscalationPolicyStep.Targets == nil { break } return e.complexity.EscalationPolicyStep.Targets(childComplexity), true - case "HeartbeatMonitor.Href": + case "HeartbeatMonitor.href": if e.complexity.HeartbeatMonitor.Href == nil { break } return e.complexity.HeartbeatMonitor.Href(childComplexity), true - case "HeartbeatMonitor.ID": + case "HeartbeatMonitor.id": if e.complexity.HeartbeatMonitor.ID == nil { break } return e.complexity.HeartbeatMonitor.ID(childComplexity), true - case "HeartbeatMonitor.LastHeartbeat": + case "HeartbeatMonitor.lastHeartbeat": if e.complexity.HeartbeatMonitor.LastHeartbeat == nil { break } return e.complexity.HeartbeatMonitor.LastHeartbeat(childComplexity), true - case "HeartbeatMonitor.LastState": + case "HeartbeatMonitor.lastState": if e.complexity.HeartbeatMonitor.LastState == nil { break } return e.complexity.HeartbeatMonitor.LastState(childComplexity), true - case "HeartbeatMonitor.Name": + case "HeartbeatMonitor.name": if e.complexity.HeartbeatMonitor.Name == nil { break } return e.complexity.HeartbeatMonitor.Name(childComplexity), true - case "HeartbeatMonitor.ServiceID": + case "HeartbeatMonitor.serviceID": if e.complexity.HeartbeatMonitor.ServiceID == nil { break } return e.complexity.HeartbeatMonitor.ServiceID(childComplexity), true - case "HeartbeatMonitor.TimeoutMinutes": + case "HeartbeatMonitor.timeoutMinutes": if e.complexity.HeartbeatMonitor.TimeoutMinutes == nil { break } return e.complexity.HeartbeatMonitor.TimeoutMinutes(childComplexity), true - case "IntegrationKey.Href": + case "IntegrationKey.href": if e.complexity.IntegrationKey.Href == nil { break } return e.complexity.IntegrationKey.Href(childComplexity), true - case "IntegrationKey.ID": + case "IntegrationKey.id": if e.complexity.IntegrationKey.ID == nil { break } return e.complexity.IntegrationKey.ID(childComplexity), true - case "IntegrationKey.Name": + case "IntegrationKey.name": if e.complexity.IntegrationKey.Name == nil { break } return e.complexity.IntegrationKey.Name(childComplexity), true - case "IntegrationKey.ServiceID": + case "IntegrationKey.serviceID": if e.complexity.IntegrationKey.ServiceID == nil { break } return e.complexity.IntegrationKey.ServiceID(childComplexity), true - case "IntegrationKey.Type": + case "IntegrationKey.type": if e.complexity.IntegrationKey.Type == nil { break } return e.complexity.IntegrationKey.Type(childComplexity), true - case "Label.Key": + case "Label.key": if e.complexity.Label.Key == nil { break } return e.complexity.Label.Key(childComplexity), true - case "Label.Value": + case "Label.value": if e.complexity.Label.Value == nil { break } return e.complexity.Label.Value(childComplexity), true - case "LabelConnection.Nodes": + case "LabelConnection.nodes": if e.complexity.LabelConnection.Nodes == nil { break } return e.complexity.LabelConnection.Nodes(childComplexity), true - case "LabelConnection.PageInfo": + case "LabelConnection.pageInfo": if e.complexity.LabelConnection.PageInfo == nil { break } return e.complexity.LabelConnection.PageInfo(childComplexity), true - case "Mutation.AddAuthSubject": + case "Mutation.addAuthSubject": if e.complexity.Mutation.AddAuthSubject == nil { break } @@ -1005,7 +1004,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.AddAuthSubject(childComplexity, args["input"].(user.AuthSubject)), true - case "Mutation.CreateAlert": + case "Mutation.createAlert": if e.complexity.Mutation.CreateAlert == nil { break } @@ -1017,7 +1016,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateAlert(childComplexity, args["input"].(CreateAlertInput)), true - case "Mutation.CreateEscalationPolicy": + case "Mutation.createEscalationPolicy": if e.complexity.Mutation.CreateEscalationPolicy == nil { break } @@ -1029,7 +1028,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateEscalationPolicy(childComplexity, args["input"].(CreateEscalationPolicyInput)), true - case "Mutation.CreateEscalationPolicyStep": + case "Mutation.createEscalationPolicyStep": if e.complexity.Mutation.CreateEscalationPolicyStep == nil { break } @@ -1041,7 +1040,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateEscalationPolicyStep(childComplexity, args["input"].(CreateEscalationPolicyStepInput)), true - case "Mutation.CreateHeartbeatMonitor": + case "Mutation.createHeartbeatMonitor": if e.complexity.Mutation.CreateHeartbeatMonitor == nil { break } @@ -1053,7 +1052,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateHeartbeatMonitor(childComplexity, args["input"].(CreateHeartbeatMonitorInput)), true - case "Mutation.CreateIntegrationKey": + case "Mutation.createIntegrationKey": if e.complexity.Mutation.CreateIntegrationKey == nil { break } @@ -1065,7 +1064,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateIntegrationKey(childComplexity, args["input"].(CreateIntegrationKeyInput)), true - case "Mutation.CreateRotation": + case "Mutation.createRotation": if e.complexity.Mutation.CreateRotation == nil { break } @@ -1077,7 +1076,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateRotation(childComplexity, args["input"].(CreateRotationInput)), true - case "Mutation.CreateSchedule": + case "Mutation.createSchedule": if e.complexity.Mutation.CreateSchedule == nil { break } @@ -1089,7 +1088,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateSchedule(childComplexity, args["input"].(CreateScheduleInput)), true - case "Mutation.CreateService": + case "Mutation.createService": if e.complexity.Mutation.CreateService == nil { break } @@ -1101,7 +1100,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateService(childComplexity, args["input"].(CreateServiceInput)), true - case "Mutation.CreateUserContactMethod": + case "Mutation.createUserContactMethod": if e.complexity.Mutation.CreateUserContactMethod == nil { break } @@ -1113,7 +1112,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateUserContactMethod(childComplexity, args["input"].(CreateUserContactMethodInput)), true - case "Mutation.CreateUserNotificationRule": + case "Mutation.createUserNotificationRule": if e.complexity.Mutation.CreateUserNotificationRule == nil { break } @@ -1125,7 +1124,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateUserNotificationRule(childComplexity, args["input"].(CreateUserNotificationRuleInput)), true - case "Mutation.CreateUserOverride": + case "Mutation.createUserOverride": if e.complexity.Mutation.CreateUserOverride == nil { break } @@ -1137,7 +1136,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.CreateUserOverride(childComplexity, args["input"].(CreateUserOverrideInput)), true - case "Mutation.DeleteAll": + case "Mutation.deleteAll": if e.complexity.Mutation.DeleteAll == nil { break } @@ -1149,7 +1148,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.DeleteAll(childComplexity, args["input"].([]assignment.RawTarget)), true - case "Mutation.DeleteAuthSubject": + case "Mutation.deleteAuthSubject": if e.complexity.Mutation.DeleteAuthSubject == nil { break } @@ -1161,7 +1160,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.DeleteAuthSubject(childComplexity, args["input"].(user.AuthSubject)), true - case "Mutation.EscalateAlerts": + case "Mutation.escalateAlerts": if e.complexity.Mutation.EscalateAlerts == nil { break } @@ -1173,7 +1172,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.EscalateAlerts(childComplexity, args["input"].([]int)), true - case "Mutation.SendContactMethodVerification": + case "Mutation.sendContactMethodVerification": if e.complexity.Mutation.SendContactMethodVerification == nil { break } @@ -1185,7 +1184,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.SendContactMethodVerification(childComplexity, args["input"].(SendContactMethodVerificationInput)), true - case "Mutation.SetConfig": + case "Mutation.setConfig": if e.complexity.Mutation.SetConfig == nil { break } @@ -1197,7 +1196,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.SetConfig(childComplexity, args["input"].([]ConfigValueInput)), true - case "Mutation.SetFavorite": + case "Mutation.setFavorite": if e.complexity.Mutation.SetFavorite == nil { break } @@ -1209,7 +1208,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.SetFavorite(childComplexity, args["input"].(SetFavoriteInput)), true - case "Mutation.SetLabel": + case "Mutation.setLabel": if e.complexity.Mutation.SetLabel == nil { break } @@ -1221,7 +1220,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.SetLabel(childComplexity, args["input"].(SetLabelInput)), true - case "Mutation.TestContactMethod": + case "Mutation.testContactMethod": if e.complexity.Mutation.TestContactMethod == nil { break } @@ -1233,7 +1232,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.TestContactMethod(childComplexity, args["id"].(string)), true - case "Mutation.UpdateAlerts": + case "Mutation.updateAlerts": if e.complexity.Mutation.UpdateAlerts == nil { break } @@ -1245,7 +1244,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateAlerts(childComplexity, args["input"].(UpdateAlertsInput)), true - case "Mutation.UpdateEscalationPolicy": + case "Mutation.updateEscalationPolicy": if e.complexity.Mutation.UpdateEscalationPolicy == nil { break } @@ -1257,7 +1256,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateEscalationPolicy(childComplexity, args["input"].(UpdateEscalationPolicyInput)), true - case "Mutation.UpdateEscalationPolicyStep": + case "Mutation.updateEscalationPolicyStep": if e.complexity.Mutation.UpdateEscalationPolicyStep == nil { break } @@ -1269,7 +1268,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateEscalationPolicyStep(childComplexity, args["input"].(UpdateEscalationPolicyStepInput)), true - case "Mutation.UpdateHeartbeatMonitor": + case "Mutation.updateHeartbeatMonitor": if e.complexity.Mutation.UpdateHeartbeatMonitor == nil { break } @@ -1281,7 +1280,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateHeartbeatMonitor(childComplexity, args["input"].(UpdateHeartbeatMonitorInput)), true - case "Mutation.UpdateRotation": + case "Mutation.updateRotation": if e.complexity.Mutation.UpdateRotation == nil { break } @@ -1293,7 +1292,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateRotation(childComplexity, args["input"].(UpdateRotationInput)), true - case "Mutation.UpdateSchedule": + case "Mutation.updateSchedule": if e.complexity.Mutation.UpdateSchedule == nil { break } @@ -1305,7 +1304,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateSchedule(childComplexity, args["input"].(UpdateScheduleInput)), true - case "Mutation.UpdateScheduleTarget": + case "Mutation.updateScheduleTarget": if e.complexity.Mutation.UpdateScheduleTarget == nil { break } @@ -1317,7 +1316,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateScheduleTarget(childComplexity, args["input"].(ScheduleTargetInput)), true - case "Mutation.UpdateService": + case "Mutation.updateService": if e.complexity.Mutation.UpdateService == nil { break } @@ -1329,7 +1328,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateService(childComplexity, args["input"].(UpdateServiceInput)), true - case "Mutation.UpdateUser": + case "Mutation.updateUser": if e.complexity.Mutation.UpdateUser == nil { break } @@ -1341,7 +1340,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateUser(childComplexity, args["input"].(UpdateUserInput)), true - case "Mutation.UpdateUserContactMethod": + case "Mutation.updateUserContactMethod": if e.complexity.Mutation.UpdateUserContactMethod == nil { break } @@ -1353,7 +1352,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateUserContactMethod(childComplexity, args["input"].(UpdateUserContactMethodInput)), true - case "Mutation.UpdateUserOverride": + case "Mutation.updateUserOverride": if e.complexity.Mutation.UpdateUserOverride == nil { break } @@ -1365,7 +1364,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateUserOverride(childComplexity, args["input"].(UpdateUserOverrideInput)), true - case "Mutation.VerifyContactMethod": + case "Mutation.verifyContactMethod": if e.complexity.Mutation.VerifyContactMethod == nil { break } @@ -1377,56 +1376,56 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.VerifyContactMethod(childComplexity, args["input"].(VerifyContactMethodInput)), true - case "OnCallShift.End": + case "OnCallShift.end": if e.complexity.OnCallShift.End == nil { break } return e.complexity.OnCallShift.End(childComplexity), true - case "OnCallShift.Start": + case "OnCallShift.start": if e.complexity.OnCallShift.Start == nil { break } return e.complexity.OnCallShift.Start(childComplexity), true - case "OnCallShift.Truncated": + case "OnCallShift.truncated": if e.complexity.OnCallShift.Truncated == nil { break } return e.complexity.OnCallShift.Truncated(childComplexity), true - case "OnCallShift.User": + case "OnCallShift.user": if e.complexity.OnCallShift.User == nil { break } return e.complexity.OnCallShift.User(childComplexity), true - case "OnCallShift.UserID": + case "OnCallShift.userID": if e.complexity.OnCallShift.UserID == nil { break } return e.complexity.OnCallShift.UserID(childComplexity), true - case "PageInfo.EndCursor": + case "PageInfo.endCursor": if e.complexity.PageInfo.EndCursor == nil { break } return e.complexity.PageInfo.EndCursor(childComplexity), true - case "PageInfo.HasNextPage": + case "PageInfo.hasNextPage": if e.complexity.PageInfo.HasNextPage == nil { break } return e.complexity.PageInfo.HasNextPage(childComplexity), true - case "Query.Alert": + case "Query.alert": if e.complexity.Query.Alert == nil { break } @@ -1438,7 +1437,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Alert(childComplexity, args["id"].(int)), true - case "Query.Alerts": + case "Query.alerts": if e.complexity.Query.Alerts == nil { break } @@ -1450,7 +1449,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Alerts(childComplexity, args["input"].(*AlertSearchOptions)), true - case "Query.AuthSubjectsForProvider": + case "Query.authSubjectsForProvider": if e.complexity.Query.AuthSubjectsForProvider == nil { break } @@ -1462,7 +1461,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.AuthSubjectsForProvider(childComplexity, args["first"].(*int), args["after"].(*string), args["providerID"].(string)), true - case "Query.Config": + case "Query.config": if e.complexity.Query.Config == nil { break } @@ -1474,7 +1473,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Config(childComplexity, args["all"].(*bool)), true - case "Query.EscalationPolicies": + case "Query.escalationPolicies": if e.complexity.Query.EscalationPolicies == nil { break } @@ -1486,7 +1485,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.EscalationPolicies(childComplexity, args["input"].(*EscalationPolicySearchOptions)), true - case "Query.EscalationPolicy": + case "Query.escalationPolicy": if e.complexity.Query.EscalationPolicy == nil { break } @@ -1498,7 +1497,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.EscalationPolicy(childComplexity, args["id"].(string)), true - case "Query.HeartbeatMonitor": + case "Query.heartbeatMonitor": if e.complexity.Query.HeartbeatMonitor == nil { break } @@ -1510,7 +1509,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.HeartbeatMonitor(childComplexity, args["id"].(string)), true - case "Query.IntegrationKey": + case "Query.integrationKey": if e.complexity.Query.IntegrationKey == nil { break } @@ -1522,7 +1521,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.IntegrationKey(childComplexity, args["id"].(string)), true - case "Query.LabelKeys": + case "Query.labelKeys": if e.complexity.Query.LabelKeys == nil { break } @@ -1534,7 +1533,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.LabelKeys(childComplexity, args["input"].(*LabelKeySearchOptions)), true - case "Query.LabelValues": + case "Query.labelValues": if e.complexity.Query.LabelValues == nil { break } @@ -1546,7 +1545,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.LabelValues(childComplexity, args["input"].(*LabelValueSearchOptions)), true - case "Query.Labels": + case "Query.labels": if e.complexity.Query.Labels == nil { break } @@ -1558,7 +1557,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Labels(childComplexity, args["input"].(*LabelSearchOptions)), true - case "Query.Rotation": + case "Query.rotation": if e.complexity.Query.Rotation == nil { break } @@ -1570,7 +1569,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Rotation(childComplexity, args["id"].(string)), true - case "Query.Rotations": + case "Query.rotations": if e.complexity.Query.Rotations == nil { break } @@ -1582,7 +1581,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Rotations(childComplexity, args["input"].(*RotationSearchOptions)), true - case "Query.Schedule": + case "Query.schedule": if e.complexity.Query.Schedule == nil { break } @@ -1594,7 +1593,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Schedule(childComplexity, args["id"].(string)), true - case "Query.Schedules": + case "Query.schedules": if e.complexity.Query.Schedules == nil { break } @@ -1606,7 +1605,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Schedules(childComplexity, args["input"].(*ScheduleSearchOptions)), true - case "Query.Service": + case "Query.service": if e.complexity.Query.Service == nil { break } @@ -1618,7 +1617,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Service(childComplexity, args["id"].(string)), true - case "Query.Services": + case "Query.services": if e.complexity.Query.Services == nil { break } @@ -1630,7 +1629,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Services(childComplexity, args["input"].(*ServiceSearchOptions)), true - case "Query.SlackChannel": + case "Query.slackChannel": if e.complexity.Query.SlackChannel == nil { break } @@ -1642,7 +1641,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.SlackChannel(childComplexity, args["id"].(string)), true - case "Query.SlackChannels": + case "Query.slackChannels": if e.complexity.Query.SlackChannels == nil { break } @@ -1654,7 +1653,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.SlackChannels(childComplexity, args["input"].(*SlackChannelSearchOptions)), true - case "Query.TimeZones": + case "Query.timeZones": if e.complexity.Query.TimeZones == nil { break } @@ -1666,7 +1665,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.TimeZones(childComplexity, args["input"].(*TimeZoneSearchOptions)), true - case "Query.User": + case "Query.user": if e.complexity.Query.User == nil { break } @@ -1678,7 +1677,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.User(childComplexity, args["id"].(*string)), true - case "Query.UserContactMethod": + case "Query.userContactMethod": if e.complexity.Query.UserContactMethod == nil { break } @@ -1690,7 +1689,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.UserContactMethod(childComplexity, args["id"].(string)), true - case "Query.UserOverride": + case "Query.userOverride": if e.complexity.Query.UserOverride == nil { break } @@ -1702,7 +1701,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.UserOverride(childComplexity, args["id"].(string)), true - case "Query.UserOverrides": + case "Query.userOverrides": if e.complexity.Query.UserOverrides == nil { break } @@ -1714,7 +1713,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.UserOverrides(childComplexity, args["input"].(*UserOverrideSearchOptions)), true - case "Query.Users": + case "Query.users": if e.complexity.Query.Users == nil { break } @@ -1726,42 +1725,42 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Users(childComplexity, args["input"].(*UserSearchOptions), args["first"].(*int), args["after"].(*string), args["search"].(*string)), true - case "Rotation.ActiveUserIndex": + case "Rotation.activeUserIndex": if e.complexity.Rotation.ActiveUserIndex == nil { break } return e.complexity.Rotation.ActiveUserIndex(childComplexity), true - case "Rotation.Description": + case "Rotation.description": if e.complexity.Rotation.Description == nil { break } return e.complexity.Rotation.Description(childComplexity), true - case "Rotation.ID": + case "Rotation.id": if e.complexity.Rotation.ID == nil { break } return e.complexity.Rotation.ID(childComplexity), true - case "Rotation.IsFavorite": + case "Rotation.isFavorite": if e.complexity.Rotation.IsFavorite == nil { break } return e.complexity.Rotation.IsFavorite(childComplexity), true - case "Rotation.Name": + case "Rotation.name": if e.complexity.Rotation.Name == nil { break } return e.complexity.Rotation.Name(childComplexity), true - case "Rotation.NextHandoffTimes": + case "Rotation.nextHandoffTimes": if e.complexity.Rotation.NextHandoffTimes == nil { break } @@ -1773,98 +1772,98 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Rotation.NextHandoffTimes(childComplexity, args["num"].(*int)), true - case "Rotation.ShiftLength": + case "Rotation.shiftLength": if e.complexity.Rotation.ShiftLength == nil { break } return e.complexity.Rotation.ShiftLength(childComplexity), true - case "Rotation.Start": + case "Rotation.start": if e.complexity.Rotation.Start == nil { break } return e.complexity.Rotation.Start(childComplexity), true - case "Rotation.TimeZone": + case "Rotation.timeZone": if e.complexity.Rotation.TimeZone == nil { break } return e.complexity.Rotation.TimeZone(childComplexity), true - case "Rotation.Type": + case "Rotation.type": if e.complexity.Rotation.Type == nil { break } return e.complexity.Rotation.Type(childComplexity), true - case "Rotation.UserIDs": + case "Rotation.userIDs": if e.complexity.Rotation.UserIDs == nil { break } return e.complexity.Rotation.UserIDs(childComplexity), true - case "Rotation.Users": + case "Rotation.users": if e.complexity.Rotation.Users == nil { break } return e.complexity.Rotation.Users(childComplexity), true - case "RotationConnection.Nodes": + case "RotationConnection.nodes": if e.complexity.RotationConnection.Nodes == nil { break } return e.complexity.RotationConnection.Nodes(childComplexity), true - case "RotationConnection.PageInfo": + case "RotationConnection.pageInfo": if e.complexity.RotationConnection.PageInfo == nil { break } return e.complexity.RotationConnection.PageInfo(childComplexity), true - case "Schedule.AssignedTo": + case "Schedule.assignedTo": if e.complexity.Schedule.AssignedTo == nil { break } return e.complexity.Schedule.AssignedTo(childComplexity), true - case "Schedule.Description": + case "Schedule.description": if e.complexity.Schedule.Description == nil { break } return e.complexity.Schedule.Description(childComplexity), true - case "Schedule.ID": + case "Schedule.id": if e.complexity.Schedule.ID == nil { break } return e.complexity.Schedule.ID(childComplexity), true - case "Schedule.IsFavorite": + case "Schedule.isFavorite": if e.complexity.Schedule.IsFavorite == nil { break } return e.complexity.Schedule.IsFavorite(childComplexity), true - case "Schedule.Name": + case "Schedule.name": if e.complexity.Schedule.Name == nil { break } return e.complexity.Schedule.Name(childComplexity), true - case "Schedule.Shifts": + case "Schedule.shifts": if e.complexity.Schedule.Shifts == nil { break } @@ -1876,7 +1875,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Schedule.Shifts(childComplexity, args["start"].(time.Time), args["end"].(time.Time)), true - case "Schedule.Target": + case "Schedule.target": if e.complexity.Schedule.Target == nil { break } @@ -1888,497 +1887,497 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Schedule.Target(childComplexity, args["input"].(assignment.RawTarget)), true - case "Schedule.Targets": + case "Schedule.targets": if e.complexity.Schedule.Targets == nil { break } return e.complexity.Schedule.Targets(childComplexity), true - case "Schedule.TimeZone": + case "Schedule.timeZone": if e.complexity.Schedule.TimeZone == nil { break } return e.complexity.Schedule.TimeZone(childComplexity), true - case "ScheduleConnection.Nodes": + case "ScheduleConnection.nodes": if e.complexity.ScheduleConnection.Nodes == nil { break } return e.complexity.ScheduleConnection.Nodes(childComplexity), true - case "ScheduleConnection.PageInfo": + case "ScheduleConnection.pageInfo": if e.complexity.ScheduleConnection.PageInfo == nil { break } return e.complexity.ScheduleConnection.PageInfo(childComplexity), true - case "ScheduleRule.End": + case "ScheduleRule.end": if e.complexity.ScheduleRule.End == nil { break } return e.complexity.ScheduleRule.End(childComplexity), true - case "ScheduleRule.ID": + case "ScheduleRule.id": if e.complexity.ScheduleRule.ID == nil { break } return e.complexity.ScheduleRule.ID(childComplexity), true - case "ScheduleRule.ScheduleID": + case "ScheduleRule.scheduleID": if e.complexity.ScheduleRule.ScheduleID == nil { break } return e.complexity.ScheduleRule.ScheduleID(childComplexity), true - case "ScheduleRule.Start": + case "ScheduleRule.start": if e.complexity.ScheduleRule.Start == nil { break } return e.complexity.ScheduleRule.Start(childComplexity), true - case "ScheduleRule.Target": + case "ScheduleRule.target": if e.complexity.ScheduleRule.Target == nil { break } return e.complexity.ScheduleRule.Target(childComplexity), true - case "ScheduleRule.WeekdayFilter": + case "ScheduleRule.weekdayFilter": if e.complexity.ScheduleRule.WeekdayFilter == nil { break } return e.complexity.ScheduleRule.WeekdayFilter(childComplexity), true - case "ScheduleTarget.Rules": + case "ScheduleTarget.rules": if e.complexity.ScheduleTarget.Rules == nil { break } return e.complexity.ScheduleTarget.Rules(childComplexity), true - case "ScheduleTarget.ScheduleID": + case "ScheduleTarget.scheduleID": if e.complexity.ScheduleTarget.ScheduleID == nil { break } return e.complexity.ScheduleTarget.ScheduleID(childComplexity), true - case "ScheduleTarget.Target": + case "ScheduleTarget.target": if e.complexity.ScheduleTarget.Target == nil { break } return e.complexity.ScheduleTarget.Target(childComplexity), true - case "Service.Description": + case "Service.description": if e.complexity.Service.Description == nil { break } return e.complexity.Service.Description(childComplexity), true - case "Service.EscalationPolicy": + case "Service.escalationPolicy": if e.complexity.Service.EscalationPolicy == nil { break } return e.complexity.Service.EscalationPolicy(childComplexity), true - case "Service.EscalationPolicyID": + case "Service.escalationPolicyID": if e.complexity.Service.EscalationPolicyID == nil { break } return e.complexity.Service.EscalationPolicyID(childComplexity), true - case "Service.HeartbeatMonitors": + case "Service.heartbeatMonitors": if e.complexity.Service.HeartbeatMonitors == nil { break } return e.complexity.Service.HeartbeatMonitors(childComplexity), true - case "Service.ID": + case "Service.id": if e.complexity.Service.ID == nil { break } return e.complexity.Service.ID(childComplexity), true - case "Service.IntegrationKeys": + case "Service.integrationKeys": if e.complexity.Service.IntegrationKeys == nil { break } return e.complexity.Service.IntegrationKeys(childComplexity), true - case "Service.IsFavorite": + case "Service.isFavorite": if e.complexity.Service.IsFavorite == nil { break } return e.complexity.Service.IsFavorite(childComplexity), true - case "Service.Labels": + case "Service.labels": if e.complexity.Service.Labels == nil { break } return e.complexity.Service.Labels(childComplexity), true - case "Service.Name": + case "Service.name": if e.complexity.Service.Name == nil { break } return e.complexity.Service.Name(childComplexity), true - case "Service.OnCallUsers": + case "Service.onCallUsers": if e.complexity.Service.OnCallUsers == nil { break } return e.complexity.Service.OnCallUsers(childComplexity), true - case "ServiceConnection.Nodes": + case "ServiceConnection.nodes": if e.complexity.ServiceConnection.Nodes == nil { break } return e.complexity.ServiceConnection.Nodes(childComplexity), true - case "ServiceConnection.PageInfo": + case "ServiceConnection.pageInfo": if e.complexity.ServiceConnection.PageInfo == nil { break } return e.complexity.ServiceConnection.PageInfo(childComplexity), true - case "ServiceOnCallUser.StepNumber": + case "ServiceOnCallUser.stepNumber": if e.complexity.ServiceOnCallUser.StepNumber == nil { break } return e.complexity.ServiceOnCallUser.StepNumber(childComplexity), true - case "ServiceOnCallUser.UserID": + case "ServiceOnCallUser.userID": if e.complexity.ServiceOnCallUser.UserID == nil { break } return e.complexity.ServiceOnCallUser.UserID(childComplexity), true - case "ServiceOnCallUser.UserName": + case "ServiceOnCallUser.userName": if e.complexity.ServiceOnCallUser.UserName == nil { break } return e.complexity.ServiceOnCallUser.UserName(childComplexity), true - case "SlackChannel.ID": + case "SlackChannel.id": if e.complexity.SlackChannel.ID == nil { break } return e.complexity.SlackChannel.ID(childComplexity), true - case "SlackChannel.Name": + case "SlackChannel.name": if e.complexity.SlackChannel.Name == nil { break } return e.complexity.SlackChannel.Name(childComplexity), true - case "SlackChannelConnection.Nodes": + case "SlackChannelConnection.nodes": if e.complexity.SlackChannelConnection.Nodes == nil { break } return e.complexity.SlackChannelConnection.Nodes(childComplexity), true - case "SlackChannelConnection.PageInfo": + case "SlackChannelConnection.pageInfo": if e.complexity.SlackChannelConnection.PageInfo == nil { break } return e.complexity.SlackChannelConnection.PageInfo(childComplexity), true - case "StringConnection.Nodes": + case "StringConnection.nodes": if e.complexity.StringConnection.Nodes == nil { break } return e.complexity.StringConnection.Nodes(childComplexity), true - case "StringConnection.PageInfo": + case "StringConnection.pageInfo": if e.complexity.StringConnection.PageInfo == nil { break } return e.complexity.StringConnection.PageInfo(childComplexity), true - case "Target.ID": + case "Target.id": if e.complexity.Target.ID == nil { break } return e.complexity.Target.ID(childComplexity), true - case "Target.Name": + case "Target.name": if e.complexity.Target.Name == nil { break } return e.complexity.Target.Name(childComplexity), true - case "Target.Type": + case "Target.type": if e.complexity.Target.Type == nil { break } return e.complexity.Target.Type(childComplexity), true - case "TimeZone.ID": + case "TimeZone.id": if e.complexity.TimeZone.ID == nil { break } return e.complexity.TimeZone.ID(childComplexity), true - case "TimeZoneConnection.Nodes": + case "TimeZoneConnection.nodes": if e.complexity.TimeZoneConnection.Nodes == nil { break } return e.complexity.TimeZoneConnection.Nodes(childComplexity), true - case "TimeZoneConnection.PageInfo": + case "TimeZoneConnection.pageInfo": if e.complexity.TimeZoneConnection.PageInfo == nil { break } return e.complexity.TimeZoneConnection.PageInfo(childComplexity), true - case "User.AlertStatusCMID": + case "User.statusUpdateContactMethodID": if e.complexity.User.AlertStatusCMID == nil { break } return e.complexity.User.AlertStatusCMID(childComplexity), true - case "User.AuthSubjects": + case "User.authSubjects": if e.complexity.User.AuthSubjects == nil { break } return e.complexity.User.AuthSubjects(childComplexity), true - case "User.ContactMethods": + case "User.contactMethods": if e.complexity.User.ContactMethods == nil { break } return e.complexity.User.ContactMethods(childComplexity), true - case "User.Email": + case "User.email": if e.complexity.User.Email == nil { break } return e.complexity.User.Email(childComplexity), true - case "User.ID": + case "User.id": if e.complexity.User.ID == nil { break } return e.complexity.User.ID(childComplexity), true - case "User.Name": + case "User.name": if e.complexity.User.Name == nil { break } return e.complexity.User.Name(childComplexity), true - case "User.NotificationRules": + case "User.notificationRules": if e.complexity.User.NotificationRules == nil { break } return e.complexity.User.NotificationRules(childComplexity), true - case "User.OnCallSteps": + case "User.onCallSteps": if e.complexity.User.OnCallSteps == nil { break } return e.complexity.User.OnCallSteps(childComplexity), true - case "User.Role": + case "User.role": if e.complexity.User.Role == nil { break } return e.complexity.User.Role(childComplexity), true - case "UserConnection.Nodes": + case "UserConnection.nodes": if e.complexity.UserConnection.Nodes == nil { break } return e.complexity.UserConnection.Nodes(childComplexity), true - case "UserConnection.PageInfo": + case "UserConnection.pageInfo": if e.complexity.UserConnection.PageInfo == nil { break } return e.complexity.UserConnection.PageInfo(childComplexity), true - case "UserContactMethod.Disabled": + case "UserContactMethod.disabled": if e.complexity.UserContactMethod.Disabled == nil { break } return e.complexity.UserContactMethod.Disabled(childComplexity), true - case "UserContactMethod.FormattedValue": + case "UserContactMethod.formattedValue": if e.complexity.UserContactMethod.FormattedValue == nil { break } return e.complexity.UserContactMethod.FormattedValue(childComplexity), true - case "UserContactMethod.ID": + case "UserContactMethod.id": if e.complexity.UserContactMethod.ID == nil { break } return e.complexity.UserContactMethod.ID(childComplexity), true - case "UserContactMethod.Name": + case "UserContactMethod.name": if e.complexity.UserContactMethod.Name == nil { break } return e.complexity.UserContactMethod.Name(childComplexity), true - case "UserContactMethod.Type": + case "UserContactMethod.type": if e.complexity.UserContactMethod.Type == nil { break } return e.complexity.UserContactMethod.Type(childComplexity), true - case "UserContactMethod.Value": + case "UserContactMethod.value": if e.complexity.UserContactMethod.Value == nil { break } return e.complexity.UserContactMethod.Value(childComplexity), true - case "UserNotificationRule.ContactMethod": + case "UserNotificationRule.contactMethod": if e.complexity.UserNotificationRule.ContactMethod == nil { break } return e.complexity.UserNotificationRule.ContactMethod(childComplexity), true - case "UserNotificationRule.ContactMethodID": + case "UserNotificationRule.contactMethodID": if e.complexity.UserNotificationRule.ContactMethodID == nil { break } return e.complexity.UserNotificationRule.ContactMethodID(childComplexity), true - case "UserNotificationRule.DelayMinutes": + case "UserNotificationRule.delayMinutes": if e.complexity.UserNotificationRule.DelayMinutes == nil { break } return e.complexity.UserNotificationRule.DelayMinutes(childComplexity), true - case "UserNotificationRule.ID": + case "UserNotificationRule.id": if e.complexity.UserNotificationRule.ID == nil { break } return e.complexity.UserNotificationRule.ID(childComplexity), true - case "UserOverride.AddUser": + case "UserOverride.addUser": if e.complexity.UserOverride.AddUser == nil { break } return e.complexity.UserOverride.AddUser(childComplexity), true - case "UserOverride.AddUserID": + case "UserOverride.addUserID": if e.complexity.UserOverride.AddUserID == nil { break } return e.complexity.UserOverride.AddUserID(childComplexity), true - case "UserOverride.End": + case "UserOverride.end": if e.complexity.UserOverride.End == nil { break } return e.complexity.UserOverride.End(childComplexity), true - case "UserOverride.ID": + case "UserOverride.id": if e.complexity.UserOverride.ID == nil { break } return e.complexity.UserOverride.ID(childComplexity), true - case "UserOverride.RemoveUser": + case "UserOverride.removeUser": if e.complexity.UserOverride.RemoveUser == nil { break } return e.complexity.UserOverride.RemoveUser(childComplexity), true - case "UserOverride.RemoveUserID": + case "UserOverride.removeUserID": if e.complexity.UserOverride.RemoveUserID == nil { break } return e.complexity.UserOverride.RemoveUserID(childComplexity), true - case "UserOverride.Start": + case "UserOverride.start": if e.complexity.UserOverride.Start == nil { break } return e.complexity.UserOverride.Start(childComplexity), true - case "UserOverride.Target": + case "UserOverride.target": if e.complexity.UserOverride.Target == nil { break } return e.complexity.UserOverride.Target(childComplexity), true - case "UserOverrideConnection.Nodes": + case "UserOverrideConnection.nodes": if e.complexity.UserOverrideConnection.Nodes == nil { break } return e.complexity.UserOverrideConnection.Nodes(childComplexity), true - case "UserOverrideConnection.PageInfo": + case "UserOverrideConnection.pageInfo": if e.complexity.UserOverrideConnection.PageInfo == nil { break } @@ -2432,21 +2431,6 @@ type executionContext struct { *executableSchema } -func (ec *executionContext) FieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) (ret interface{}) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - res, err := ec.ResolverMiddleware(ctx, next) - if err != nil { - ec.Error(ctx, err) - return nil - } - return res -} - func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { if ec.DisableIntrospection { return nil, errors.New("introspection disabled") @@ -4292,11 +4276,21 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // endregion ***************************** args.gotpl ***************************** +// region ************************** directives.gotpl ************************** + +// endregion ************************** directives.gotpl ************************** + // region **************************** field.gotpl ***************************** -func (ec *executionContext) _Alert_id(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_id(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4305,10 +4299,14 @@ func (ec *executionContext) _Alert_id(ctx context.Context, field graphql.Collect } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4321,9 +4319,15 @@ func (ec *executionContext) _Alert_id(ctx context.Context, field graphql.Collect return ec.marshalNID2int(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_alertID(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_alertID(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4332,10 +4336,14 @@ func (ec *executionContext) _Alert_alertID(ctx context.Context, field graphql.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Alert().AlertID(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4348,9 +4356,15 @@ func (ec *executionContext) _Alert_alertID(ctx context.Context, field graphql.Co return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_status(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_status(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4359,10 +4373,14 @@ func (ec *executionContext) _Alert_status(ctx context.Context, field graphql.Col } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Alert().Status(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4375,9 +4393,15 @@ func (ec *executionContext) _Alert_status(ctx context.Context, field graphql.Col return ec.marshalNAlertStatus2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐAlertStatus(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_summary(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_summary(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4386,10 +4410,14 @@ func (ec *executionContext) _Alert_summary(ctx context.Context, field graphql.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Summary, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4402,9 +4430,15 @@ func (ec *executionContext) _Alert_summary(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_details(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_details(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4413,10 +4447,14 @@ func (ec *executionContext) _Alert_details(ctx context.Context, field graphql.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Details, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4429,9 +4467,15 @@ func (ec *executionContext) _Alert_details(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_createdAt(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_createdAt(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4440,10 +4484,14 @@ func (ec *executionContext) _Alert_createdAt(ctx context.Context, field graphql. } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.CreatedAt, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4456,9 +4504,15 @@ func (ec *executionContext) _Alert_createdAt(ctx context.Context, field graphql. return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_serviceID(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_serviceID(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4467,10 +4521,14 @@ func (ec *executionContext) _Alert_serviceID(ctx context.Context, field graphql. } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ServiceID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4483,9 +4541,15 @@ func (ec *executionContext) _Alert_serviceID(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_service(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_service(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4494,10 +4558,14 @@ func (ec *executionContext) _Alert_service(ctx context.Context, field graphql.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Alert().Service(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -4507,9 +4575,15 @@ func (ec *executionContext) _Alert_service(ctx context.Context, field graphql.Co return ec.marshalOService2ᚖgithub.comᚋtargetᚋgoalertᚋserviceᚐService(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_state(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_state(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4518,10 +4592,14 @@ func (ec *executionContext) _Alert_state(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Alert().State(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -4531,9 +4609,15 @@ func (ec *executionContext) _Alert_state(ctx context.Context, field graphql.Coll return ec.marshalOAlertState2ᚖgithub.comᚋtargetᚋgoalertᚋalertᚐState(ctx, field.Selections, res) } -func (ec *executionContext) _Alert_recentEvents(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) graphql.Marshaler { +func (ec *executionContext) _Alert_recentEvents(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Alert", Field: field, @@ -4549,10 +4633,14 @@ func (ec *executionContext) _Alert_recentEvents(ctx context.Context, field graph } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Alert().RecentEvents(rctx, obj, args["input"].(*AlertRecentEventsOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4565,9 +4653,15 @@ func (ec *executionContext) _Alert_recentEvents(ctx context.Context, field graph return ec.marshalNAlertLogEntryConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐAlertLogEntryConnection(ctx, field.Selections, res) } -func (ec *executionContext) _AlertConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *AlertConnection) graphql.Marshaler { +func (ec *executionContext) _AlertConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *AlertConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertConnection", Field: field, @@ -4576,10 +4670,14 @@ func (ec *executionContext) _AlertConnection_nodes(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4592,9 +4690,15 @@ func (ec *executionContext) _AlertConnection_nodes(ctx context.Context, field gr return ec.marshalNAlert2ᚕgithub.comᚋtargetᚋgoalertᚋalertᚐAlert(ctx, field.Selections, res) } -func (ec *executionContext) _AlertConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *AlertConnection) graphql.Marshaler { +func (ec *executionContext) _AlertConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *AlertConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertConnection", Field: field, @@ -4603,25 +4707,35 @@ func (ec *executionContext) _AlertConnection_pageInfo(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _AlertLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *alertlog.Entry) graphql.Marshaler { +func (ec *executionContext) _AlertLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *alertlog.Entry) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertLogEntry", Field: field, @@ -4630,10 +4744,14 @@ func (ec *executionContext) _AlertLogEntry_id(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AlertLogEntry().ID(rctx, obj) + return obj.ID(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4646,9 +4764,15 @@ func (ec *executionContext) _AlertLogEntry_id(ctx context.Context, field graphql return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _AlertLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *alertlog.Entry) graphql.Marshaler { +func (ec *executionContext) _AlertLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *alertlog.Entry) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertLogEntry", Field: field, @@ -4657,25 +4781,35 @@ func (ec *executionContext) _AlertLogEntry_timestamp(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AlertLogEntry().Timestamp(rctx, obj) + return obj.Timestamp(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(*time.Time) + res := resTmp.(time.Time) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNISOTimestamp2ᚖtimeᚐTime(ctx, field.Selections, res) + return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _AlertLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *alertlog.Entry) graphql.Marshaler { +func (ec *executionContext) _AlertLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *alertlog.Entry) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertLogEntry", Field: field, @@ -4684,10 +4818,14 @@ func (ec *executionContext) _AlertLogEntry_message(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.AlertLogEntry().Message(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4700,9 +4838,15 @@ func (ec *executionContext) _AlertLogEntry_message(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _AlertLogEntryConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *AlertLogEntryConnection) graphql.Marshaler { +func (ec *executionContext) _AlertLogEntryConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *AlertLogEntryConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertLogEntryConnection", Field: field, @@ -4711,10 +4855,14 @@ func (ec *executionContext) _AlertLogEntryConnection_nodes(ctx context.Context, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4727,9 +4875,15 @@ func (ec *executionContext) _AlertLogEntryConnection_nodes(ctx context.Context, return ec.marshalNAlertLogEntry2ᚕgithub.comᚋtargetᚋgoalertᚋalertᚋlogᚐEntry(ctx, field.Selections, res) } -func (ec *executionContext) _AlertLogEntryConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *AlertLogEntryConnection) graphql.Marshaler { +func (ec *executionContext) _AlertLogEntryConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *AlertLogEntryConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertLogEntryConnection", Field: field, @@ -4738,25 +4892,35 @@ func (ec *executionContext) _AlertLogEntryConnection_pageInfo(ctx context.Contex } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _AlertState_lastEscalation(ctx context.Context, field graphql.CollectedField, obj *alert.State) graphql.Marshaler { +func (ec *executionContext) _AlertState_lastEscalation(ctx context.Context, field graphql.CollectedField, obj *alert.State) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertState", Field: field, @@ -4765,10 +4929,14 @@ func (ec *executionContext) _AlertState_lastEscalation(ctx context.Context, fiel } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.LastEscalation, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4781,9 +4949,15 @@ func (ec *executionContext) _AlertState_lastEscalation(ctx context.Context, fiel return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _AlertState_stepNumber(ctx context.Context, field graphql.CollectedField, obj *alert.State) graphql.Marshaler { +func (ec *executionContext) _AlertState_stepNumber(ctx context.Context, field graphql.CollectedField, obj *alert.State) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertState", Field: field, @@ -4792,10 +4966,14 @@ func (ec *executionContext) _AlertState_stepNumber(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.StepNumber, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4808,9 +4986,15 @@ func (ec *executionContext) _AlertState_stepNumber(ctx context.Context, field gr return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _AlertState_repeatCount(ctx context.Context, field graphql.CollectedField, obj *alert.State) graphql.Marshaler { +func (ec *executionContext) _AlertState_repeatCount(ctx context.Context, field graphql.CollectedField, obj *alert.State) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AlertState", Field: field, @@ -4819,10 +5003,14 @@ func (ec *executionContext) _AlertState_repeatCount(ctx context.Context, field g } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.RepeatCount, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4835,9 +5023,15 @@ func (ec *executionContext) _AlertState_repeatCount(ctx context.Context, field g return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _AuthSubject_providerID(ctx context.Context, field graphql.CollectedField, obj *user.AuthSubject) graphql.Marshaler { +func (ec *executionContext) _AuthSubject_providerID(ctx context.Context, field graphql.CollectedField, obj *user.AuthSubject) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AuthSubject", Field: field, @@ -4846,10 +5040,14 @@ func (ec *executionContext) _AuthSubject_providerID(ctx context.Context, field g } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ProviderID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4862,9 +5060,15 @@ func (ec *executionContext) _AuthSubject_providerID(ctx context.Context, field g return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _AuthSubject_subjectID(ctx context.Context, field graphql.CollectedField, obj *user.AuthSubject) graphql.Marshaler { +func (ec *executionContext) _AuthSubject_subjectID(ctx context.Context, field graphql.CollectedField, obj *user.AuthSubject) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AuthSubject", Field: field, @@ -4873,10 +5077,14 @@ func (ec *executionContext) _AuthSubject_subjectID(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubjectID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4889,9 +5097,15 @@ func (ec *executionContext) _AuthSubject_subjectID(ctx context.Context, field gr return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _AuthSubject_userID(ctx context.Context, field graphql.CollectedField, obj *user.AuthSubject) graphql.Marshaler { +func (ec *executionContext) _AuthSubject_userID(ctx context.Context, field graphql.CollectedField, obj *user.AuthSubject) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AuthSubject", Field: field, @@ -4900,10 +5114,14 @@ func (ec *executionContext) _AuthSubject_userID(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.UserID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4916,9 +5134,15 @@ func (ec *executionContext) _AuthSubject_userID(ctx context.Context, field graph return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _AuthSubjectConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *AuthSubjectConnection) graphql.Marshaler { +func (ec *executionContext) _AuthSubjectConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *AuthSubjectConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AuthSubjectConnection", Field: field, @@ -4927,10 +5151,14 @@ func (ec *executionContext) _AuthSubjectConnection_nodes(ctx context.Context, fi } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4943,9 +5171,15 @@ func (ec *executionContext) _AuthSubjectConnection_nodes(ctx context.Context, fi return ec.marshalNAuthSubject2ᚕgithub.comᚋtargetᚋgoalertᚋuserᚐAuthSubject(ctx, field.Selections, res) } -func (ec *executionContext) _AuthSubjectConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *AuthSubjectConnection) graphql.Marshaler { +func (ec *executionContext) _AuthSubjectConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *AuthSubjectConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "AuthSubjectConnection", Field: field, @@ -4954,25 +5188,35 @@ func (ec *executionContext) _AuthSubjectConnection_pageInfo(ctx context.Context, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _ConfigValue_id(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) graphql.Marshaler { +func (ec *executionContext) _ConfigValue_id(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ConfigValue", Field: field, @@ -4981,10 +5225,14 @@ func (ec *executionContext) _ConfigValue_id(ctx context.Context, field graphql.C } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -4997,9 +5245,15 @@ func (ec *executionContext) _ConfigValue_id(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _ConfigValue_description(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) graphql.Marshaler { +func (ec *executionContext) _ConfigValue_description(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ConfigValue", Field: field, @@ -5008,12 +5262,16 @@ func (ec *executionContext) _ConfigValue_description(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) - if resTmp == nil { - if !ec.HasError(rctx) { + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -5024,9 +5282,15 @@ func (ec *executionContext) _ConfigValue_description(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _ConfigValue_value(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) graphql.Marshaler { +func (ec *executionContext) _ConfigValue_value(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ConfigValue", Field: field, @@ -5035,10 +5299,14 @@ func (ec *executionContext) _ConfigValue_value(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5051,9 +5319,15 @@ func (ec *executionContext) _ConfigValue_value(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _ConfigValue_type(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) graphql.Marshaler { +func (ec *executionContext) _ConfigValue_type(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ConfigValue", Field: field, @@ -5062,10 +5336,14 @@ func (ec *executionContext) _ConfigValue_type(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5078,9 +5356,15 @@ func (ec *executionContext) _ConfigValue_type(ctx context.Context, field graphql return ec.marshalNConfigType2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConfigType(ctx, field.Selections, res) } -func (ec *executionContext) _ConfigValue_password(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) graphql.Marshaler { +func (ec *executionContext) _ConfigValue_password(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ConfigValue", Field: field, @@ -5089,10 +5373,14 @@ func (ec *executionContext) _ConfigValue_password(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Password, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5105,9 +5393,15 @@ func (ec *executionContext) _ConfigValue_password(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicy_id(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicy_id(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicy", Field: field, @@ -5116,10 +5410,14 @@ func (ec *executionContext) _EscalationPolicy_id(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5132,9 +5430,15 @@ func (ec *executionContext) _EscalationPolicy_id(ctx context.Context, field grap return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicy_name(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicy_name(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicy", Field: field, @@ -5143,10 +5447,14 @@ func (ec *executionContext) _EscalationPolicy_name(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5159,9 +5467,15 @@ func (ec *executionContext) _EscalationPolicy_name(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicy_description(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicy_description(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicy", Field: field, @@ -5170,10 +5484,14 @@ func (ec *executionContext) _EscalationPolicy_description(ctx context.Context, f } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5186,9 +5504,15 @@ func (ec *executionContext) _EscalationPolicy_description(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicy_repeat(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicy_repeat(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicy", Field: field, @@ -5197,10 +5521,14 @@ func (ec *executionContext) _EscalationPolicy_repeat(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Repeat, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5213,9 +5541,15 @@ func (ec *executionContext) _EscalationPolicy_repeat(ctx context.Context, field return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicy_assignedTo(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicy_assignedTo(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicy", Field: field, @@ -5224,10 +5558,14 @@ func (ec *executionContext) _EscalationPolicy_assignedTo(ctx context.Context, fi } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.EscalationPolicy().AssignedTo(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5240,9 +5578,15 @@ func (ec *executionContext) _EscalationPolicy_assignedTo(ctx context.Context, fi return ec.marshalNTarget2ᚕgithub.comᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicy_steps(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicy_steps(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicy", Field: field, @@ -5251,10 +5595,14 @@ func (ec *executionContext) _EscalationPolicy_steps(ctx context.Context, field g } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.EscalationPolicy().Steps(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5267,9 +5615,15 @@ func (ec *executionContext) _EscalationPolicy_steps(ctx context.Context, field g return ec.marshalNEscalationPolicyStep2ᚕgithub.comᚋtargetᚋgoalertᚋescalationᚐStep(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicyConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *EscalationPolicyConnection) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicyConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *EscalationPolicyConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicyConnection", Field: field, @@ -5278,10 +5632,14 @@ func (ec *executionContext) _EscalationPolicyConnection_nodes(ctx context.Contex } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5294,9 +5652,15 @@ func (ec *executionContext) _EscalationPolicyConnection_nodes(ctx context.Contex return ec.marshalNEscalationPolicy2ᚕgithub.comᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicyConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *EscalationPolicyConnection) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicyConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *EscalationPolicyConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicyConnection", Field: field, @@ -5305,25 +5669,35 @@ func (ec *executionContext) _EscalationPolicyConnection_pageInfo(ctx context.Con } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicyStep_id(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicyStep_id(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicyStep", Field: field, @@ -5332,10 +5706,14 @@ func (ec *executionContext) _EscalationPolicyStep_id(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5348,9 +5726,15 @@ func (ec *executionContext) _EscalationPolicyStep_id(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicyStep_stepNumber(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicyStep_stepNumber(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicyStep", Field: field, @@ -5359,10 +5743,14 @@ func (ec *executionContext) _EscalationPolicyStep_stepNumber(ctx context.Context } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.StepNumber, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5375,9 +5763,15 @@ func (ec *executionContext) _EscalationPolicyStep_stepNumber(ctx context.Context return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicyStep_delayMinutes(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicyStep_delayMinutes(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicyStep", Field: field, @@ -5386,10 +5780,14 @@ func (ec *executionContext) _EscalationPolicyStep_delayMinutes(ctx context.Conte } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DelayMinutes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5402,9 +5800,15 @@ func (ec *executionContext) _EscalationPolicyStep_delayMinutes(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicyStep_targets(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicyStep_targets(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicyStep", Field: field, @@ -5413,10 +5817,14 @@ func (ec *executionContext) _EscalationPolicyStep_targets(ctx context.Context, f } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.EscalationPolicyStep().Targets(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5429,9 +5837,15 @@ func (ec *executionContext) _EscalationPolicyStep_targets(ctx context.Context, f return ec.marshalNTarget2ᚕgithub.comᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) _EscalationPolicyStep_escalationPolicy(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) graphql.Marshaler { +func (ec *executionContext) _EscalationPolicyStep_escalationPolicy(ctx context.Context, field graphql.CollectedField, obj *escalation.Step) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "EscalationPolicyStep", Field: field, @@ -5440,10 +5854,14 @@ func (ec *executionContext) _EscalationPolicyStep_escalationPolicy(ctx context.C } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.EscalationPolicyStep().EscalationPolicy(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -5453,9 +5871,15 @@ func (ec *executionContext) _EscalationPolicyStep_escalationPolicy(ctx context.C return ec.marshalOEscalationPolicy2ᚖgithub.comᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, field.Selections, res) } -func (ec *executionContext) _HeartbeatMonitor_id(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) graphql.Marshaler { +func (ec *executionContext) _HeartbeatMonitor_id(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "HeartbeatMonitor", Field: field, @@ -5464,10 +5888,14 @@ func (ec *executionContext) _HeartbeatMonitor_id(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5480,9 +5908,15 @@ func (ec *executionContext) _HeartbeatMonitor_id(ctx context.Context, field grap return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _HeartbeatMonitor_serviceID(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) graphql.Marshaler { +func (ec *executionContext) _HeartbeatMonitor_serviceID(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "HeartbeatMonitor", Field: field, @@ -5491,10 +5925,14 @@ func (ec *executionContext) _HeartbeatMonitor_serviceID(ctx context.Context, fie } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ServiceID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5507,9 +5945,15 @@ func (ec *executionContext) _HeartbeatMonitor_serviceID(ctx context.Context, fie return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _HeartbeatMonitor_name(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) graphql.Marshaler { +func (ec *executionContext) _HeartbeatMonitor_name(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "HeartbeatMonitor", Field: field, @@ -5518,10 +5962,14 @@ func (ec *executionContext) _HeartbeatMonitor_name(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5534,9 +5982,15 @@ func (ec *executionContext) _HeartbeatMonitor_name(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _HeartbeatMonitor_timeoutMinutes(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) graphql.Marshaler { +func (ec *executionContext) _HeartbeatMonitor_timeoutMinutes(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "HeartbeatMonitor", Field: field, @@ -5545,10 +5999,14 @@ func (ec *executionContext) _HeartbeatMonitor_timeoutMinutes(ctx context.Context } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.HeartbeatMonitor().TimeoutMinutes(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5561,9 +6019,15 @@ func (ec *executionContext) _HeartbeatMonitor_timeoutMinutes(ctx context.Context return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _HeartbeatMonitor_lastState(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) graphql.Marshaler { +func (ec *executionContext) _HeartbeatMonitor_lastState(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "HeartbeatMonitor", Field: field, @@ -5572,10 +6036,14 @@ func (ec *executionContext) _HeartbeatMonitor_lastState(ctx context.Context, fie } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.LastState(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5588,9 +6056,15 @@ func (ec *executionContext) _HeartbeatMonitor_lastState(ctx context.Context, fie return ec.marshalNHeartbeatMonitorState2githubᚗcomᚋtargetᚋgoalertᚋheartbeatᚐState(ctx, field.Selections, res) } -func (ec *executionContext) _HeartbeatMonitor_lastHeartbeat(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) graphql.Marshaler { +func (ec *executionContext) _HeartbeatMonitor_lastHeartbeat(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "HeartbeatMonitor", Field: field, @@ -5599,10 +6073,14 @@ func (ec *executionContext) _HeartbeatMonitor_lastHeartbeat(ctx context.Context, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.LastHeartbeat(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -5612,9 +6090,15 @@ func (ec *executionContext) _HeartbeatMonitor_lastHeartbeat(ctx context.Context, return ec.marshalOISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _HeartbeatMonitor_href(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) graphql.Marshaler { +func (ec *executionContext) _HeartbeatMonitor_href(ctx context.Context, field graphql.CollectedField, obj *heartbeat.Monitor) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "HeartbeatMonitor", Field: field, @@ -5623,10 +6107,14 @@ func (ec *executionContext) _HeartbeatMonitor_href(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.HeartbeatMonitor().Href(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5639,9 +6127,15 @@ func (ec *executionContext) _HeartbeatMonitor_href(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _IntegrationKey_id(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) graphql.Marshaler { +func (ec *executionContext) _IntegrationKey_id(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "IntegrationKey", Field: field, @@ -5650,10 +6144,14 @@ func (ec *executionContext) _IntegrationKey_id(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5666,9 +6164,15 @@ func (ec *executionContext) _IntegrationKey_id(ctx context.Context, field graphq return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _IntegrationKey_serviceID(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) graphql.Marshaler { +func (ec *executionContext) _IntegrationKey_serviceID(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "IntegrationKey", Field: field, @@ -5677,10 +6181,14 @@ func (ec *executionContext) _IntegrationKey_serviceID(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ServiceID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5693,9 +6201,15 @@ func (ec *executionContext) _IntegrationKey_serviceID(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _IntegrationKey_type(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) graphql.Marshaler { +func (ec *executionContext) _IntegrationKey_type(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "IntegrationKey", Field: field, @@ -5704,10 +6218,14 @@ func (ec *executionContext) _IntegrationKey_type(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.IntegrationKey().Type(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5720,9 +6238,15 @@ func (ec *executionContext) _IntegrationKey_type(ctx context.Context, field grap return ec.marshalNIntegrationKeyType2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐIntegrationKeyType(ctx, field.Selections, res) } -func (ec *executionContext) _IntegrationKey_name(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) graphql.Marshaler { +func (ec *executionContext) _IntegrationKey_name(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "IntegrationKey", Field: field, @@ -5731,10 +6255,14 @@ func (ec *executionContext) _IntegrationKey_name(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5747,9 +6275,15 @@ func (ec *executionContext) _IntegrationKey_name(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _IntegrationKey_href(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) graphql.Marshaler { +func (ec *executionContext) _IntegrationKey_href(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "IntegrationKey", Field: field, @@ -5758,12 +6292,16 @@ func (ec *executionContext) _IntegrationKey_href(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.IntegrationKey().Href(rctx, obj) }) - if resTmp == nil { - if !ec.HasError(rctx) { + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -5774,9 +6312,15 @@ func (ec *executionContext) _IntegrationKey_href(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Label_key(ctx context.Context, field graphql.CollectedField, obj *label.Label) graphql.Marshaler { +func (ec *executionContext) _Label_key(ctx context.Context, field graphql.CollectedField, obj *label.Label) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Label", Field: field, @@ -5785,10 +6329,14 @@ func (ec *executionContext) _Label_key(ctx context.Context, field graphql.Collec } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5801,9 +6349,15 @@ func (ec *executionContext) _Label_key(ctx context.Context, field graphql.Collec return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Label_value(ctx context.Context, field graphql.CollectedField, obj *label.Label) graphql.Marshaler { +func (ec *executionContext) _Label_value(ctx context.Context, field graphql.CollectedField, obj *label.Label) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Label", Field: field, @@ -5812,10 +6366,14 @@ func (ec *executionContext) _Label_value(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5828,9 +6386,15 @@ func (ec *executionContext) _Label_value(ctx context.Context, field graphql.Coll return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *LabelConnection) graphql.Marshaler { +func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *LabelConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "LabelConnection", Field: field, @@ -5839,10 +6403,14 @@ func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5855,9 +6423,15 @@ func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field gr return ec.marshalNLabel2ᚕgithub.comᚋtargetᚋgoalertᚋlabelᚐLabel(ctx, field.Selections, res) } -func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *LabelConnection) graphql.Marshaler { +func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *LabelConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "LabelConnection", Field: field, @@ -5866,25 +6440,35 @@ func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_addAuthSubject(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_addAuthSubject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -5900,10 +6484,14 @@ func (ec *executionContext) _Mutation_addAuthSubject(ctx context.Context, field } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().AddAuthSubject(rctx, args["input"].(user.AuthSubject)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5916,9 +6504,15 @@ func (ec *executionContext) _Mutation_addAuthSubject(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_deleteAuthSubject(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_deleteAuthSubject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -5934,10 +6528,14 @@ func (ec *executionContext) _Mutation_deleteAuthSubject(ctx context.Context, fie } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().DeleteAuthSubject(rctx, args["input"].(user.AuthSubject)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5950,9 +6548,15 @@ func (ec *executionContext) _Mutation_deleteAuthSubject(ctx context.Context, fie return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -5968,10 +6572,14 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateUser(rctx, args["input"].(UpdateUserInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -5984,9 +6592,15 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_testContactMethod(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_testContactMethod(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6002,10 +6616,14 @@ func (ec *executionContext) _Mutation_testContactMethod(ctx context.Context, fie } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().TestContactMethod(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6018,9 +6636,15 @@ func (ec *executionContext) _Mutation_testContactMethod(ctx context.Context, fie return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateAlerts(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateAlerts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6036,10 +6660,14 @@ func (ec *executionContext) _Mutation_updateAlerts(ctx context.Context, field gr } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateAlerts(rctx, args["input"].(UpdateAlertsInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6049,9 +6677,15 @@ func (ec *executionContext) _Mutation_updateAlerts(ctx context.Context, field gr return ec.marshalOAlert2ᚕgithub.comᚋtargetᚋgoalertᚋalertᚐAlert(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateRotation(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateRotation(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6067,10 +6701,14 @@ func (ec *executionContext) _Mutation_updateRotation(ctx context.Context, field } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateRotation(rctx, args["input"].(UpdateRotationInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6083,9 +6721,15 @@ func (ec *executionContext) _Mutation_updateRotation(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_escalateAlerts(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_escalateAlerts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6101,10 +6745,14 @@ func (ec *executionContext) _Mutation_escalateAlerts(ctx context.Context, field } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().EscalateAlerts(rctx, args["input"].([]int)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6114,9 +6762,15 @@ func (ec *executionContext) _Mutation_escalateAlerts(ctx context.Context, field return ec.marshalOAlert2ᚕgithub.comᚋtargetᚋgoalertᚋalertᚐAlert(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_setFavorite(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_setFavorite(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6132,10 +6786,14 @@ func (ec *executionContext) _Mutation_setFavorite(ctx context.Context, field gra } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().SetFavorite(rctx, args["input"].(SetFavoriteInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6148,9 +6806,15 @@ func (ec *executionContext) _Mutation_setFavorite(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateService(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6166,10 +6830,14 @@ func (ec *executionContext) _Mutation_updateService(ctx context.Context, field g } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateService(rctx, args["input"].(UpdateServiceInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6182,9 +6850,15 @@ func (ec *executionContext) _Mutation_updateService(ctx context.Context, field g return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateEscalationPolicy(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateEscalationPolicy(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6200,10 +6874,14 @@ func (ec *executionContext) _Mutation_updateEscalationPolicy(ctx context.Context } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateEscalationPolicy(rctx, args["input"].(UpdateEscalationPolicyInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6216,9 +6894,15 @@ func (ec *executionContext) _Mutation_updateEscalationPolicy(ctx context.Context return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateEscalationPolicyStep(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateEscalationPolicyStep(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6234,10 +6918,14 @@ func (ec *executionContext) _Mutation_updateEscalationPolicyStep(ctx context.Con } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateEscalationPolicyStep(rctx, args["input"].(UpdateEscalationPolicyStepInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6250,9 +6938,15 @@ func (ec *executionContext) _Mutation_updateEscalationPolicyStep(ctx context.Con return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_deleteAll(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_deleteAll(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6268,10 +6962,14 @@ func (ec *executionContext) _Mutation_deleteAll(ctx context.Context, field graph } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().DeleteAll(rctx, args["input"].([]assignment.RawTarget)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6284,9 +6982,15 @@ func (ec *executionContext) _Mutation_deleteAll(ctx context.Context, field graph return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createAlert(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createAlert(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6302,10 +7006,14 @@ func (ec *executionContext) _Mutation_createAlert(ctx context.Context, field gra } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateAlert(rctx, args["input"].(CreateAlertInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6315,9 +7023,15 @@ func (ec *executionContext) _Mutation_createAlert(ctx context.Context, field gra return ec.marshalOAlert2ᚖgithub.comᚋtargetᚋgoalertᚋalertᚐAlert(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createService(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createService(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6333,10 +7047,14 @@ func (ec *executionContext) _Mutation_createService(ctx context.Context, field g } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateService(rctx, args["input"].(CreateServiceInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6346,9 +7064,15 @@ func (ec *executionContext) _Mutation_createService(ctx context.Context, field g return ec.marshalOService2ᚖgithub.comᚋtargetᚋgoalertᚋserviceᚐService(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createEscalationPolicy(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createEscalationPolicy(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6364,10 +7088,14 @@ func (ec *executionContext) _Mutation_createEscalationPolicy(ctx context.Context } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateEscalationPolicy(rctx, args["input"].(CreateEscalationPolicyInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6377,9 +7105,15 @@ func (ec *executionContext) _Mutation_createEscalationPolicy(ctx context.Context return ec.marshalOEscalationPolicy2ᚖgithub.comᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createEscalationPolicyStep(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createEscalationPolicyStep(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6395,10 +7129,14 @@ func (ec *executionContext) _Mutation_createEscalationPolicyStep(ctx context.Con } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateEscalationPolicyStep(rctx, args["input"].(CreateEscalationPolicyStepInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6408,9 +7146,15 @@ func (ec *executionContext) _Mutation_createEscalationPolicyStep(ctx context.Con return ec.marshalOEscalationPolicyStep2ᚖgithub.comᚋtargetᚋgoalertᚋescalationᚐStep(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createRotation(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createRotation(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6426,10 +7170,14 @@ func (ec *executionContext) _Mutation_createRotation(ctx context.Context, field } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateRotation(rctx, args["input"].(CreateRotationInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6439,9 +7187,15 @@ func (ec *executionContext) _Mutation_createRotation(ctx context.Context, field return ec.marshalORotation2ᚖgithub.comᚋtargetᚋgoalertᚋscheduleᚋrotationᚐRotation(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createIntegrationKey(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createIntegrationKey(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6457,10 +7211,14 @@ func (ec *executionContext) _Mutation_createIntegrationKey(ctx context.Context, } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateIntegrationKey(rctx, args["input"].(CreateIntegrationKeyInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6470,9 +7228,15 @@ func (ec *executionContext) _Mutation_createIntegrationKey(ctx context.Context, return ec.marshalOIntegrationKey2ᚖgithub.comᚋtargetᚋgoalertᚋintegrationkeyᚐIntegrationKey(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createHeartbeatMonitor(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createHeartbeatMonitor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6488,10 +7252,14 @@ func (ec *executionContext) _Mutation_createHeartbeatMonitor(ctx context.Context } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateHeartbeatMonitor(rctx, args["input"].(CreateHeartbeatMonitorInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6501,9 +7269,15 @@ func (ec *executionContext) _Mutation_createHeartbeatMonitor(ctx context.Context return ec.marshalOHeartbeatMonitor2ᚖgithub.comᚋtargetᚋgoalertᚋheartbeatᚐMonitor(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_setLabel(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_setLabel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6519,10 +7293,14 @@ func (ec *executionContext) _Mutation_setLabel(ctx context.Context, field graphq } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().SetLabel(rctx, args["input"].(SetLabelInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6535,9 +7313,15 @@ func (ec *executionContext) _Mutation_setLabel(ctx context.Context, field graphq return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createSchedule(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createSchedule(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6553,10 +7337,14 @@ func (ec *executionContext) _Mutation_createSchedule(ctx context.Context, field } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateSchedule(rctx, args["input"].(CreateScheduleInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6566,9 +7354,15 @@ func (ec *executionContext) _Mutation_createSchedule(ctx context.Context, field return ec.marshalOSchedule2ᚖgithub.comᚋtargetᚋgoalertᚋscheduleᚐSchedule(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateScheduleTarget(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateScheduleTarget(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6584,10 +7378,14 @@ func (ec *executionContext) _Mutation_updateScheduleTarget(ctx context.Context, } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateScheduleTarget(rctx, args["input"].(ScheduleTargetInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6600,9 +7398,15 @@ func (ec *executionContext) _Mutation_updateScheduleTarget(ctx context.Context, return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createUserOverride(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createUserOverride(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6618,10 +7422,14 @@ func (ec *executionContext) _Mutation_createUserOverride(ctx context.Context, fi } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateUserOverride(rctx, args["input"].(CreateUserOverrideInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6631,9 +7439,15 @@ func (ec *executionContext) _Mutation_createUserOverride(ctx context.Context, fi return ec.marshalOUserOverride2ᚖgithub.comᚋtargetᚋgoalertᚋoverrideᚐUserOverride(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createUserContactMethod(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createUserContactMethod(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6649,12 +7463,16 @@ func (ec *executionContext) _Mutation_createUserContactMethod(ctx context.Contex } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateUserContactMethod(rctx, args["input"].(CreateUserContactMethodInput)) }) - if resTmp == nil { - return graphql.Null + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null } res := resTmp.(*contactmethod.ContactMethod) rctx.Result = res @@ -6662,9 +7480,15 @@ func (ec *executionContext) _Mutation_createUserContactMethod(ctx context.Contex return ec.marshalOUserContactMethod2ᚖgithub.comᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐContactMethod(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_createUserNotificationRule(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_createUserNotificationRule(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6680,10 +7504,14 @@ func (ec *executionContext) _Mutation_createUserNotificationRule(ctx context.Con } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateUserNotificationRule(rctx, args["input"].(CreateUserNotificationRuleInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6693,9 +7521,15 @@ func (ec *executionContext) _Mutation_createUserNotificationRule(ctx context.Con return ec.marshalOUserNotificationRule2ᚖgithub.comᚋtargetᚋgoalertᚋuserᚋnotificationruleᚐNotificationRule(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateUserContactMethod(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateUserContactMethod(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6711,10 +7545,14 @@ func (ec *executionContext) _Mutation_updateUserContactMethod(ctx context.Contex } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateUserContactMethod(rctx, args["input"].(UpdateUserContactMethodInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6727,9 +7565,15 @@ func (ec *executionContext) _Mutation_updateUserContactMethod(ctx context.Contex return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_sendContactMethodVerification(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_sendContactMethodVerification(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6745,10 +7589,14 @@ func (ec *executionContext) _Mutation_sendContactMethodVerification(ctx context. } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().SendContactMethodVerification(rctx, args["input"].(SendContactMethodVerificationInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6761,9 +7609,15 @@ func (ec *executionContext) _Mutation_sendContactMethodVerification(ctx context. return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_verifyContactMethod(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_verifyContactMethod(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6779,10 +7633,14 @@ func (ec *executionContext) _Mutation_verifyContactMethod(ctx context.Context, f } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().VerifyContactMethod(rctx, args["input"].(VerifyContactMethodInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6795,9 +7653,15 @@ func (ec *executionContext) _Mutation_verifyContactMethod(ctx context.Context, f return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateSchedule(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateSchedule(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6813,10 +7677,14 @@ func (ec *executionContext) _Mutation_updateSchedule(ctx context.Context, field } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateSchedule(rctx, args["input"].(UpdateScheduleInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6829,9 +7697,15 @@ func (ec *executionContext) _Mutation_updateSchedule(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateUserOverride(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateUserOverride(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6847,10 +7721,14 @@ func (ec *executionContext) _Mutation_updateUserOverride(ctx context.Context, fi } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateUserOverride(rctx, args["input"].(UpdateUserOverrideInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6863,9 +7741,15 @@ func (ec *executionContext) _Mutation_updateUserOverride(ctx context.Context, fi return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_updateHeartbeatMonitor(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_updateHeartbeatMonitor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6881,10 +7765,14 @@ func (ec *executionContext) _Mutation_updateHeartbeatMonitor(ctx context.Context } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateHeartbeatMonitor(rctx, args["input"].(UpdateHeartbeatMonitorInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6897,9 +7785,15 @@ func (ec *executionContext) _Mutation_updateHeartbeatMonitor(ctx context.Context return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_setConfig(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Mutation_setConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Mutation", Field: field, @@ -6915,10 +7809,14 @@ func (ec *executionContext) _Mutation_setConfig(ctx context.Context, field graph } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().SetConfig(rctx, args["input"].([]ConfigValueInput)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6931,9 +7829,15 @@ func (ec *executionContext) _Mutation_setConfig(ctx context.Context, field graph return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _OnCallShift_userID(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) graphql.Marshaler { +func (ec *executionContext) _OnCallShift_userID(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "OnCallShift", Field: field, @@ -6942,10 +7846,14 @@ func (ec *executionContext) _OnCallShift_userID(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.UserID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -6958,9 +7866,15 @@ func (ec *executionContext) _OnCallShift_userID(ctx context.Context, field graph return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _OnCallShift_user(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) graphql.Marshaler { +func (ec *executionContext) _OnCallShift_user(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "OnCallShift", Field: field, @@ -6969,10 +7883,14 @@ func (ec *executionContext) _OnCallShift_user(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.OnCallShift().User(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -6982,9 +7900,15 @@ func (ec *executionContext) _OnCallShift_user(ctx context.Context, field graphql return ec.marshalOUser2ᚖgithub.comᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) _OnCallShift_start(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) graphql.Marshaler { +func (ec *executionContext) _OnCallShift_start(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "OnCallShift", Field: field, @@ -6993,10 +7917,14 @@ func (ec *executionContext) _OnCallShift_start(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Start, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7009,9 +7937,15 @@ func (ec *executionContext) _OnCallShift_start(ctx context.Context, field graphq return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _OnCallShift_end(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) graphql.Marshaler { +func (ec *executionContext) _OnCallShift_end(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "OnCallShift", Field: field, @@ -7020,10 +7954,14 @@ func (ec *executionContext) _OnCallShift_end(ctx context.Context, field graphql. } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.End, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7036,9 +7974,15 @@ func (ec *executionContext) _OnCallShift_end(ctx context.Context, field graphql. return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _OnCallShift_truncated(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) graphql.Marshaler { +func (ec *executionContext) _OnCallShift_truncated(ctx context.Context, field graphql.CollectedField, obj *oncall.Shift) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "OnCallShift", Field: field, @@ -7047,10 +7991,14 @@ func (ec *executionContext) _OnCallShift_truncated(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Truncated, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7063,9 +8011,15 @@ func (ec *executionContext) _OnCallShift_truncated(ctx context.Context, field gr return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *PageInfo) graphql.Marshaler { +func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *PageInfo) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "PageInfo", Field: field, @@ -7074,10 +8028,14 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EndCursor, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7087,9 +8045,15 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *PageInfo) graphql.Marshaler { +func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *PageInfo) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "PageInfo", Field: field, @@ -7098,10 +8062,14 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.HasNextPage, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7114,9 +8082,15 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7132,10 +8106,14 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().User(rctx, args["id"].(*string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7145,9 +8123,15 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle return ec.marshalOUser2ᚖgithub.comᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) _Query_users(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_users(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7163,10 +8147,14 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Users(rctx, args["input"].(*UserSearchOptions), args["first"].(*int), args["after"].(*string), args["search"].(*string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7179,9 +8167,15 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll return ec.marshalNUserConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐUserConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_alert(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_alert(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7197,10 +8191,14 @@ func (ec *executionContext) _Query_alert(ctx context.Context, field graphql.Coll } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Alert(rctx, args["id"].(int)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7210,9 +8208,15 @@ func (ec *executionContext) _Query_alert(ctx context.Context, field graphql.Coll return ec.marshalOAlert2ᚖgithub.comᚋtargetᚋgoalertᚋalertᚐAlert(ctx, field.Selections, res) } -func (ec *executionContext) _Query_alerts(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_alerts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7228,10 +8232,14 @@ func (ec *executionContext) _Query_alerts(ctx context.Context, field graphql.Col } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Alerts(rctx, args["input"].(*AlertSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7244,9 +8252,15 @@ func (ec *executionContext) _Query_alerts(ctx context.Context, field graphql.Col return ec.marshalNAlertConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐAlertConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_service(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_service(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7262,10 +8276,14 @@ func (ec *executionContext) _Query_service(ctx context.Context, field graphql.Co } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Service(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7275,9 +8293,15 @@ func (ec *executionContext) _Query_service(ctx context.Context, field graphql.Co return ec.marshalOService2ᚖgithub.comᚋtargetᚋgoalertᚋserviceᚐService(ctx, field.Selections, res) } -func (ec *executionContext) _Query_integrationKey(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_integrationKey(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7293,10 +8317,14 @@ func (ec *executionContext) _Query_integrationKey(ctx context.Context, field gra } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().IntegrationKey(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7306,9 +8334,15 @@ func (ec *executionContext) _Query_integrationKey(ctx context.Context, field gra return ec.marshalOIntegrationKey2ᚖgithub.comᚋtargetᚋgoalertᚋintegrationkeyᚐIntegrationKey(ctx, field.Selections, res) } -func (ec *executionContext) _Query_heartbeatMonitor(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_heartbeatMonitor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7324,10 +8358,14 @@ func (ec *executionContext) _Query_heartbeatMonitor(ctx context.Context, field g } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().HeartbeatMonitor(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7337,9 +8375,15 @@ func (ec *executionContext) _Query_heartbeatMonitor(ctx context.Context, field g return ec.marshalOHeartbeatMonitor2ᚖgithub.comᚋtargetᚋgoalertᚋheartbeatᚐMonitor(ctx, field.Selections, res) } -func (ec *executionContext) _Query_services(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_services(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7355,10 +8399,14 @@ func (ec *executionContext) _Query_services(ctx context.Context, field graphql.C } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Services(rctx, args["input"].(*ServiceSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7371,9 +8419,15 @@ func (ec *executionContext) _Query_services(ctx context.Context, field graphql.C return ec.marshalNServiceConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐServiceConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_rotation(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_rotation(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7389,10 +8443,14 @@ func (ec *executionContext) _Query_rotation(ctx context.Context, field graphql.C } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Rotation(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7402,9 +8460,15 @@ func (ec *executionContext) _Query_rotation(ctx context.Context, field graphql.C return ec.marshalORotation2ᚖgithub.comᚋtargetᚋgoalertᚋscheduleᚋrotationᚐRotation(ctx, field.Selections, res) } -func (ec *executionContext) _Query_rotations(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_rotations(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7420,10 +8484,14 @@ func (ec *executionContext) _Query_rotations(ctx context.Context, field graphql. } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Rotations(rctx, args["input"].(*RotationSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7436,9 +8504,15 @@ func (ec *executionContext) _Query_rotations(ctx context.Context, field graphql. return ec.marshalNRotationConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐRotationConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_schedule(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_schedule(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7454,10 +8528,14 @@ func (ec *executionContext) _Query_schedule(ctx context.Context, field graphql.C } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Schedule(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7467,9 +8545,15 @@ func (ec *executionContext) _Query_schedule(ctx context.Context, field graphql.C return ec.marshalOSchedule2ᚖgithub.comᚋtargetᚋgoalertᚋscheduleᚐSchedule(ctx, field.Selections, res) } -func (ec *executionContext) _Query_schedules(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_schedules(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7485,10 +8569,14 @@ func (ec *executionContext) _Query_schedules(ctx context.Context, field graphql. } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Schedules(rctx, args["input"].(*ScheduleSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7501,9 +8589,15 @@ func (ec *executionContext) _Query_schedules(ctx context.Context, field graphql. return ec.marshalNScheduleConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐScheduleConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_escalationPolicy(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_escalationPolicy(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7519,12 +8613,16 @@ func (ec *executionContext) _Query_escalationPolicy(ctx context.Context, field g } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().EscalationPolicy(rctx, args["id"].(string)) }) - if resTmp == nil { - return graphql.Null + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null } res := resTmp.(*escalation.Policy) rctx.Result = res @@ -7532,9 +8630,15 @@ func (ec *executionContext) _Query_escalationPolicy(ctx context.Context, field g return ec.marshalOEscalationPolicy2ᚖgithub.comᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, field.Selections, res) } -func (ec *executionContext) _Query_escalationPolicies(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_escalationPolicies(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7550,10 +8654,14 @@ func (ec *executionContext) _Query_escalationPolicies(ctx context.Context, field } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().EscalationPolicies(rctx, args["input"].(*EscalationPolicySearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7566,9 +8674,15 @@ func (ec *executionContext) _Query_escalationPolicies(ctx context.Context, field return ec.marshalNEscalationPolicyConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐEscalationPolicyConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_authSubjectsForProvider(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_authSubjectsForProvider(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7584,10 +8698,14 @@ func (ec *executionContext) _Query_authSubjectsForProvider(ctx context.Context, } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().AuthSubjectsForProvider(rctx, args["first"].(*int), args["after"].(*string), args["providerID"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7600,9 +8718,15 @@ func (ec *executionContext) _Query_authSubjectsForProvider(ctx context.Context, return ec.marshalNAuthSubjectConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐAuthSubjectConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_timeZones(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_timeZones(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7618,10 +8742,14 @@ func (ec *executionContext) _Query_timeZones(ctx context.Context, field graphql. } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().TimeZones(rctx, args["input"].(*TimeZoneSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7634,9 +8762,15 @@ func (ec *executionContext) _Query_timeZones(ctx context.Context, field graphql. return ec.marshalNTimeZoneConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐTimeZoneConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_labels(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_labels(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7652,10 +8786,14 @@ func (ec *executionContext) _Query_labels(ctx context.Context, field graphql.Col } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Labels(rctx, args["input"].(*LabelSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7668,9 +8806,15 @@ func (ec *executionContext) _Query_labels(ctx context.Context, field graphql.Col return ec.marshalNLabelConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐLabelConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_labelKeys(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_labelKeys(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7686,10 +8830,14 @@ func (ec *executionContext) _Query_labelKeys(ctx context.Context, field graphql. } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().LabelKeys(rctx, args["input"].(*LabelKeySearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7702,9 +8850,15 @@ func (ec *executionContext) _Query_labelKeys(ctx context.Context, field graphql. return ec.marshalNStringConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐStringConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_labelValues(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_labelValues(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7720,10 +8874,14 @@ func (ec *executionContext) _Query_labelValues(ctx context.Context, field graphq } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().LabelValues(rctx, args["input"].(*LabelValueSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7736,9 +8894,15 @@ func (ec *executionContext) _Query_labelValues(ctx context.Context, field graphq return ec.marshalNStringConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐStringConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_userOverrides(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_userOverrides(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7754,10 +8918,14 @@ func (ec *executionContext) _Query_userOverrides(ctx context.Context, field grap } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().UserOverrides(rctx, args["input"].(*UserOverrideSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7770,9 +8938,15 @@ func (ec *executionContext) _Query_userOverrides(ctx context.Context, field grap return ec.marshalNUserOverrideConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐUserOverrideConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_userOverride(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_userOverride(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7788,10 +8962,14 @@ func (ec *executionContext) _Query_userOverride(ctx context.Context, field graph } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().UserOverride(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7801,9 +8979,15 @@ func (ec *executionContext) _Query_userOverride(ctx context.Context, field graph return ec.marshalOUserOverride2ᚖgithub.comᚋtargetᚋgoalertᚋoverrideᚐUserOverride(ctx, field.Selections, res) } -func (ec *executionContext) _Query_config(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_config(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7819,10 +9003,14 @@ func (ec *executionContext) _Query_config(ctx context.Context, field graphql.Col } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Config(rctx, args["all"].(*bool)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7835,9 +9023,15 @@ func (ec *executionContext) _Query_config(ctx context.Context, field graphql.Col return ec.marshalNConfigValue2ᚕgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐConfigValue(ctx, field.Selections, res) } -func (ec *executionContext) _Query_userContactMethod(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_userContactMethod(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7853,10 +9047,14 @@ func (ec *executionContext) _Query_userContactMethod(ctx context.Context, field } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().UserContactMethod(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7866,9 +9064,15 @@ func (ec *executionContext) _Query_userContactMethod(ctx context.Context, field return ec.marshalOUserContactMethod2ᚖgithub.comᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐContactMethod(ctx, field.Selections, res) } -func (ec *executionContext) _Query_slackChannels(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_slackChannels(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7884,10 +9088,14 @@ func (ec *executionContext) _Query_slackChannels(ctx context.Context, field grap } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().SlackChannels(rctx, args["input"].(*SlackChannelSearchOptions)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -7900,9 +9108,15 @@ func (ec *executionContext) _Query_slackChannels(ctx context.Context, field grap return ec.marshalNSlackChannelConnection2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐSlackChannelConnection(ctx, field.Selections, res) } -func (ec *executionContext) _Query_slackChannel(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query_slackChannel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7918,10 +9132,14 @@ func (ec *executionContext) _Query_slackChannel(ctx context.Context, field graph } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().SlackChannel(rctx, args["id"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7931,9 +9149,15 @@ func (ec *executionContext) _Query_slackChannel(ctx context.Context, field graph return ec.marshalOSlackChannel2ᚖgithub.comᚋtargetᚋgoalertᚋnotificationᚋslackᚐChannel(ctx, field.Selections, res) } -func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7949,10 +9173,14 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7962,9 +9190,15 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.marshalO__Type2ᚖgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Query", Field: field, @@ -7973,10 +9207,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -7986,9 +9224,15 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_id(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_id(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -7997,10 +9241,14 @@ func (ec *executionContext) _Rotation_id(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8013,9 +9261,15 @@ func (ec *executionContext) _Rotation_id(ctx context.Context, field graphql.Coll return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_name(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_name(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8024,10 +9278,14 @@ func (ec *executionContext) _Rotation_name(ctx context.Context, field graphql.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8040,9 +9298,15 @@ func (ec *executionContext) _Rotation_name(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_description(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_description(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8051,10 +9315,14 @@ func (ec *executionContext) _Rotation_description(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8067,9 +9335,15 @@ func (ec *executionContext) _Rotation_description(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_isFavorite(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_isFavorite(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8078,10 +9352,14 @@ func (ec *executionContext) _Rotation_isFavorite(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Rotation().IsFavorite(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8094,9 +9372,15 @@ func (ec *executionContext) _Rotation_isFavorite(ctx context.Context, field grap return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_start(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_start(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8105,10 +9389,14 @@ func (ec *executionContext) _Rotation_start(ctx context.Context, field graphql.C } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Start, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8121,9 +9409,15 @@ func (ec *executionContext) _Rotation_start(ctx context.Context, field graphql.C return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_timeZone(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_timeZone(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8132,10 +9426,14 @@ func (ec *executionContext) _Rotation_timeZone(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Rotation().TimeZone(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8148,9 +9446,15 @@ func (ec *executionContext) _Rotation_timeZone(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_type(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_type(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8159,10 +9463,14 @@ func (ec *executionContext) _Rotation_type(ctx context.Context, field graphql.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8175,9 +9483,15 @@ func (ec *executionContext) _Rotation_type(ctx context.Context, field graphql.Co return ec.marshalNRotationType2githubᚗcomᚋtargetᚋgoalertᚋscheduleᚋrotationᚐType(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_shiftLength(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_shiftLength(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8186,10 +9500,14 @@ func (ec *executionContext) _Rotation_shiftLength(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ShiftLength, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8202,9 +9520,15 @@ func (ec *executionContext) _Rotation_shiftLength(ctx context.Context, field gra return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_activeUserIndex(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_activeUserIndex(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8213,10 +9537,14 @@ func (ec *executionContext) _Rotation_activeUserIndex(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Rotation().ActiveUserIndex(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8229,9 +9557,15 @@ func (ec *executionContext) _Rotation_activeUserIndex(ctx context.Context, field return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_userIDs(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_userIDs(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8240,10 +9574,14 @@ func (ec *executionContext) _Rotation_userIDs(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Rotation().UserIDs(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8256,9 +9594,15 @@ func (ec *executionContext) _Rotation_userIDs(ctx context.Context, field graphql return ec.marshalNID2ᚕstring(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_users(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_users(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8267,10 +9611,14 @@ func (ec *executionContext) _Rotation_users(ctx context.Context, field graphql.C } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Rotation().Users(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8283,9 +9631,15 @@ func (ec *executionContext) _Rotation_users(ctx context.Context, field graphql.C return ec.marshalNUser2ᚕgithub.comᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) _Rotation_nextHandoffTimes(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) graphql.Marshaler { +func (ec *executionContext) _Rotation_nextHandoffTimes(ctx context.Context, field graphql.CollectedField, obj *rotation.Rotation) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Rotation", Field: field, @@ -8301,10 +9655,14 @@ func (ec *executionContext) _Rotation_nextHandoffTimes(ctx context.Context, fiel } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Rotation().NextHandoffTimes(rctx, obj, args["num"].(*int)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8317,9 +9675,15 @@ func (ec *executionContext) _Rotation_nextHandoffTimes(ctx context.Context, fiel return ec.marshalNISOTimestamp2ᚕtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _RotationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *RotationConnection) graphql.Marshaler { +func (ec *executionContext) _RotationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *RotationConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "RotationConnection", Field: field, @@ -8328,10 +9692,14 @@ func (ec *executionContext) _RotationConnection_nodes(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8344,9 +9712,15 @@ func (ec *executionContext) _RotationConnection_nodes(ctx context.Context, field return ec.marshalNRotation2ᚕgithub.comᚋtargetᚋgoalertᚋscheduleᚋrotationᚐRotation(ctx, field.Selections, res) } -func (ec *executionContext) _RotationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *RotationConnection) graphql.Marshaler { +func (ec *executionContext) _RotationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *RotationConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "RotationConnection", Field: field, @@ -8355,25 +9729,35 @@ func (ec *executionContext) _RotationConnection_pageInfo(ctx context.Context, fi } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) - if resTmp == nil { - if !ec.HasError(rctx) { + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_id(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_id(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8382,10 +9766,14 @@ func (ec *executionContext) _Schedule_id(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8398,9 +9786,15 @@ func (ec *executionContext) _Schedule_id(ctx context.Context, field graphql.Coll return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_name(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_name(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8409,10 +9803,14 @@ func (ec *executionContext) _Schedule_name(ctx context.Context, field graphql.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8425,9 +9823,15 @@ func (ec *executionContext) _Schedule_name(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_description(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_description(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8436,10 +9840,14 @@ func (ec *executionContext) _Schedule_description(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8452,9 +9860,15 @@ func (ec *executionContext) _Schedule_description(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_timeZone(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_timeZone(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8463,10 +9877,14 @@ func (ec *executionContext) _Schedule_timeZone(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Schedule().TimeZone(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8479,9 +9897,15 @@ func (ec *executionContext) _Schedule_timeZone(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_assignedTo(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_assignedTo(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8490,10 +9914,14 @@ func (ec *executionContext) _Schedule_assignedTo(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Schedule().AssignedTo(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8506,9 +9934,15 @@ func (ec *executionContext) _Schedule_assignedTo(ctx context.Context, field grap return ec.marshalNTarget2ᚕgithub.comᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_shifts(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_shifts(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8524,10 +9958,14 @@ func (ec *executionContext) _Schedule_shifts(ctx context.Context, field graphql. } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Schedule().Shifts(rctx, obj, args["start"].(time.Time), args["end"].(time.Time)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8540,9 +9978,15 @@ func (ec *executionContext) _Schedule_shifts(ctx context.Context, field graphql. return ec.marshalNOnCallShift2ᚕgithub.comᚋtargetᚋgoalertᚋoncallᚐShift(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_targets(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_targets(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8551,10 +9995,14 @@ func (ec *executionContext) _Schedule_targets(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Schedule().Targets(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8567,9 +10015,15 @@ func (ec *executionContext) _Schedule_targets(ctx context.Context, field graphql return ec.marshalNScheduleTarget2ᚕgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐScheduleTarget(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_target(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_target(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8585,10 +10039,14 @@ func (ec *executionContext) _Schedule_target(ctx context.Context, field graphql. } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Schedule().Target(rctx, obj, args["input"].(assignment.RawTarget)) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -8598,9 +10056,15 @@ func (ec *executionContext) _Schedule_target(ctx context.Context, field graphql. return ec.marshalOScheduleTarget2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐScheduleTarget(ctx, field.Selections, res) } -func (ec *executionContext) _Schedule_isFavorite(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) graphql.Marshaler { +func (ec *executionContext) _Schedule_isFavorite(ctx context.Context, field graphql.CollectedField, obj *schedule.Schedule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Schedule", Field: field, @@ -8609,10 +10073,14 @@ func (ec *executionContext) _Schedule_isFavorite(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Schedule().IsFavorite(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8625,9 +10093,15 @@ func (ec *executionContext) _Schedule_isFavorite(ctx context.Context, field grap return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *ScheduleConnection) graphql.Marshaler { +func (ec *executionContext) _ScheduleConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *ScheduleConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleConnection", Field: field, @@ -8636,10 +10110,14 @@ func (ec *executionContext) _ScheduleConnection_nodes(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8652,9 +10130,15 @@ func (ec *executionContext) _ScheduleConnection_nodes(ctx context.Context, field return ec.marshalNSchedule2ᚕgithub.comᚋtargetᚋgoalertᚋscheduleᚐSchedule(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ScheduleConnection) graphql.Marshaler { +func (ec *executionContext) _ScheduleConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ScheduleConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleConnection", Field: field, @@ -8663,25 +10147,35 @@ func (ec *executionContext) _ScheduleConnection_pageInfo(ctx context.Context, fi } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleRule_id(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) graphql.Marshaler { +func (ec *executionContext) _ScheduleRule_id(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleRule", Field: field, @@ -8690,10 +10184,14 @@ func (ec *executionContext) _ScheduleRule_id(ctx context.Context, field graphql. } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8706,9 +10204,15 @@ func (ec *executionContext) _ScheduleRule_id(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleRule_scheduleID(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) graphql.Marshaler { +func (ec *executionContext) _ScheduleRule_scheduleID(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleRule", Field: field, @@ -8717,10 +10221,14 @@ func (ec *executionContext) _ScheduleRule_scheduleID(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ScheduleID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8733,9 +10241,15 @@ func (ec *executionContext) _ScheduleRule_scheduleID(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleRule_start(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) graphql.Marshaler { +func (ec *executionContext) _ScheduleRule_start(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleRule", Field: field, @@ -8744,10 +10258,14 @@ func (ec *executionContext) _ScheduleRule_start(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Start, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8760,9 +10278,15 @@ func (ec *executionContext) _ScheduleRule_start(ctx context.Context, field graph return ec.marshalNClockTime2githubᚗcomᚋtargetᚋgoalertᚋscheduleᚋruleᚐClock(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleRule_end(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) graphql.Marshaler { +func (ec *executionContext) _ScheduleRule_end(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleRule", Field: field, @@ -8771,10 +10295,14 @@ func (ec *executionContext) _ScheduleRule_end(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.End, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8787,9 +10315,15 @@ func (ec *executionContext) _ScheduleRule_end(ctx context.Context, field graphql return ec.marshalNClockTime2githubᚗcomᚋtargetᚋgoalertᚋscheduleᚋruleᚐClock(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleRule_weekdayFilter(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) graphql.Marshaler { +func (ec *executionContext) _ScheduleRule_weekdayFilter(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleRule", Field: field, @@ -8798,10 +10332,14 @@ func (ec *executionContext) _ScheduleRule_weekdayFilter(ctx context.Context, fie } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.ScheduleRule().WeekdayFilter(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8814,9 +10352,15 @@ func (ec *executionContext) _ScheduleRule_weekdayFilter(ctx context.Context, fie return ec.marshalNBoolean2ᚕbool(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleRule_target(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) graphql.Marshaler { +func (ec *executionContext) _ScheduleRule_target(ctx context.Context, field graphql.CollectedField, obj *rule.Rule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleRule", Field: field, @@ -8825,10 +10369,14 @@ func (ec *executionContext) _ScheduleRule_target(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.ScheduleRule().Target(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8841,9 +10389,15 @@ func (ec *executionContext) _ScheduleRule_target(ctx context.Context, field grap return ec.marshalNTarget2ᚖgithub.comᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleTarget_scheduleID(ctx context.Context, field graphql.CollectedField, obj *ScheduleTarget) graphql.Marshaler { +func (ec *executionContext) _ScheduleTarget_scheduleID(ctx context.Context, field graphql.CollectedField, obj *ScheduleTarget) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleTarget", Field: field, @@ -8852,10 +10406,14 @@ func (ec *executionContext) _ScheduleTarget_scheduleID(ctx context.Context, fiel } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ScheduleID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8868,9 +10426,15 @@ func (ec *executionContext) _ScheduleTarget_scheduleID(ctx context.Context, fiel return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleTarget_target(ctx context.Context, field graphql.CollectedField, obj *ScheduleTarget) graphql.Marshaler { +func (ec *executionContext) _ScheduleTarget_target(ctx context.Context, field graphql.CollectedField, obj *ScheduleTarget) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleTarget", Field: field, @@ -8879,25 +10443,35 @@ func (ec *executionContext) _ScheduleTarget_target(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Target, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(assignment.RawTarget) + res := resTmp.(*assignment.RawTarget) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNTarget2githubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) + return ec.marshalNTarget2ᚖgithub.comᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) _ScheduleTarget_rules(ctx context.Context, field graphql.CollectedField, obj *ScheduleTarget) graphql.Marshaler { +func (ec *executionContext) _ScheduleTarget_rules(ctx context.Context, field graphql.CollectedField, obj *ScheduleTarget) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ScheduleTarget", Field: field, @@ -8906,10 +10480,14 @@ func (ec *executionContext) _ScheduleTarget_rules(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Rules, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8922,9 +10500,15 @@ func (ec *executionContext) _ScheduleTarget_rules(ctx context.Context, field gra return ec.marshalNScheduleRule2ᚕgithub.comᚋtargetᚋgoalertᚋscheduleᚋruleᚐRule(ctx, field.Selections, res) } -func (ec *executionContext) _Service_id(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_id(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -8933,10 +10517,14 @@ func (ec *executionContext) _Service_id(ctx context.Context, field graphql.Colle } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8949,9 +10537,15 @@ func (ec *executionContext) _Service_id(ctx context.Context, field graphql.Colle return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _Service_name(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_name(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -8960,10 +10554,14 @@ func (ec *executionContext) _Service_name(ctx context.Context, field graphql.Col } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -8976,9 +10574,15 @@ func (ec *executionContext) _Service_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Service_description(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_description(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -8987,10 +10591,14 @@ func (ec *executionContext) _Service_description(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9003,9 +10611,15 @@ func (ec *executionContext) _Service_description(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Service_escalationPolicyID(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_escalationPolicyID(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -9014,10 +10628,14 @@ func (ec *executionContext) _Service_escalationPolicyID(ctx context.Context, fie } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EscalationPolicyID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9030,9 +10648,15 @@ func (ec *executionContext) _Service_escalationPolicyID(ctx context.Context, fie return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _Service_escalationPolicy(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_escalationPolicy(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -9041,10 +10665,14 @@ func (ec *executionContext) _Service_escalationPolicy(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Service().EscalationPolicy(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -9054,9 +10682,15 @@ func (ec *executionContext) _Service_escalationPolicy(ctx context.Context, field return ec.marshalOEscalationPolicy2ᚖgithub.comᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, field.Selections, res) } -func (ec *executionContext) _Service_isFavorite(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_isFavorite(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -9065,10 +10699,14 @@ func (ec *executionContext) _Service_isFavorite(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Service().IsFavorite(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9081,9 +10719,15 @@ func (ec *executionContext) _Service_isFavorite(ctx context.Context, field graph return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Service_onCallUsers(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_onCallUsers(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -9092,10 +10736,14 @@ func (ec *executionContext) _Service_onCallUsers(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Service().OnCallUsers(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9108,9 +10756,15 @@ func (ec *executionContext) _Service_onCallUsers(ctx context.Context, field grap return ec.marshalNServiceOnCallUser2ᚕgithub.comᚋtargetᚋgoalertᚋoncallᚐServiceOnCallUser(ctx, field.Selections, res) } -func (ec *executionContext) _Service_integrationKeys(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_integrationKeys(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -9119,10 +10773,14 @@ func (ec *executionContext) _Service_integrationKeys(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Service().IntegrationKeys(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9135,9 +10793,15 @@ func (ec *executionContext) _Service_integrationKeys(ctx context.Context, field return ec.marshalNIntegrationKey2ᚕgithub.comᚋtargetᚋgoalertᚋintegrationkeyᚐIntegrationKey(ctx, field.Selections, res) } -func (ec *executionContext) _Service_labels(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_labels(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -9146,10 +10810,14 @@ func (ec *executionContext) _Service_labels(ctx context.Context, field graphql.C } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Service().Labels(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9162,9 +10830,15 @@ func (ec *executionContext) _Service_labels(ctx context.Context, field graphql.C return ec.marshalNLabel2ᚕgithub.comᚋtargetᚋgoalertᚋlabelᚐLabel(ctx, field.Selections, res) } -func (ec *executionContext) _Service_heartbeatMonitors(ctx context.Context, field graphql.CollectedField, obj *service.Service) graphql.Marshaler { +func (ec *executionContext) _Service_heartbeatMonitors(ctx context.Context, field graphql.CollectedField, obj *service.Service) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Service", Field: field, @@ -9173,10 +10847,14 @@ func (ec *executionContext) _Service_heartbeatMonitors(ctx context.Context, fiel } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Service().HeartbeatMonitors(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9189,9 +10867,15 @@ func (ec *executionContext) _Service_heartbeatMonitors(ctx context.Context, fiel return ec.marshalNHeartbeatMonitor2ᚕgithub.comᚋtargetᚋgoalertᚋheartbeatᚐMonitor(ctx, field.Selections, res) } -func (ec *executionContext) _ServiceConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *ServiceConnection) graphql.Marshaler { +func (ec *executionContext) _ServiceConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *ServiceConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ServiceConnection", Field: field, @@ -9200,10 +10884,14 @@ func (ec *executionContext) _ServiceConnection_nodes(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9216,9 +10904,15 @@ func (ec *executionContext) _ServiceConnection_nodes(ctx context.Context, field return ec.marshalNService2ᚕgithub.comᚋtargetᚋgoalertᚋserviceᚐService(ctx, field.Selections, res) } -func (ec *executionContext) _ServiceConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ServiceConnection) graphql.Marshaler { +func (ec *executionContext) _ServiceConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ServiceConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ServiceConnection", Field: field, @@ -9227,25 +10921,35 @@ func (ec *executionContext) _ServiceConnection_pageInfo(ctx context.Context, fie } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _ServiceOnCallUser_userID(ctx context.Context, field graphql.CollectedField, obj *oncall.ServiceOnCallUser) graphql.Marshaler { +func (ec *executionContext) _ServiceOnCallUser_userID(ctx context.Context, field graphql.CollectedField, obj *oncall.ServiceOnCallUser) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ServiceOnCallUser", Field: field, @@ -9254,10 +10958,14 @@ func (ec *executionContext) _ServiceOnCallUser_userID(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.UserID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9270,9 +10978,15 @@ func (ec *executionContext) _ServiceOnCallUser_userID(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _ServiceOnCallUser_userName(ctx context.Context, field graphql.CollectedField, obj *oncall.ServiceOnCallUser) graphql.Marshaler { +func (ec *executionContext) _ServiceOnCallUser_userName(ctx context.Context, field graphql.CollectedField, obj *oncall.ServiceOnCallUser) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ServiceOnCallUser", Field: field, @@ -9281,10 +10995,14 @@ func (ec *executionContext) _ServiceOnCallUser_userName(ctx context.Context, fie } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.UserName, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9297,9 +11015,15 @@ func (ec *executionContext) _ServiceOnCallUser_userName(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _ServiceOnCallUser_stepNumber(ctx context.Context, field graphql.CollectedField, obj *oncall.ServiceOnCallUser) graphql.Marshaler { +func (ec *executionContext) _ServiceOnCallUser_stepNumber(ctx context.Context, field graphql.CollectedField, obj *oncall.ServiceOnCallUser) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "ServiceOnCallUser", Field: field, @@ -9308,10 +11032,14 @@ func (ec *executionContext) _ServiceOnCallUser_stepNumber(ctx context.Context, f } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.StepNumber, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9324,9 +11052,15 @@ func (ec *executionContext) _ServiceOnCallUser_stepNumber(ctx context.Context, f return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _SlackChannel_id(ctx context.Context, field graphql.CollectedField, obj *slack.Channel) graphql.Marshaler { +func (ec *executionContext) _SlackChannel_id(ctx context.Context, field graphql.CollectedField, obj *slack.Channel) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "SlackChannel", Field: field, @@ -9335,10 +11069,14 @@ func (ec *executionContext) _SlackChannel_id(ctx context.Context, field graphql. } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9351,9 +11089,15 @@ func (ec *executionContext) _SlackChannel_id(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _SlackChannel_name(ctx context.Context, field graphql.CollectedField, obj *slack.Channel) graphql.Marshaler { +func (ec *executionContext) _SlackChannel_name(ctx context.Context, field graphql.CollectedField, obj *slack.Channel) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "SlackChannel", Field: field, @@ -9362,10 +11106,14 @@ func (ec *executionContext) _SlackChannel_name(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9378,9 +11126,15 @@ func (ec *executionContext) _SlackChannel_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _SlackChannelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *SlackChannelConnection) graphql.Marshaler { +func (ec *executionContext) _SlackChannelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *SlackChannelConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "SlackChannelConnection", Field: field, @@ -9389,10 +11143,14 @@ func (ec *executionContext) _SlackChannelConnection_nodes(ctx context.Context, f } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9405,9 +11163,15 @@ func (ec *executionContext) _SlackChannelConnection_nodes(ctx context.Context, f return ec.marshalNSlackChannel2ᚕgithub.comᚋtargetᚋgoalertᚋnotificationᚋslackᚐChannel(ctx, field.Selections, res) } -func (ec *executionContext) _SlackChannelConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *SlackChannelConnection) graphql.Marshaler { +func (ec *executionContext) _SlackChannelConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *SlackChannelConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "SlackChannelConnection", Field: field, @@ -9416,25 +11180,35 @@ func (ec *executionContext) _SlackChannelConnection_pageInfo(ctx context.Context } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _StringConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *StringConnection) graphql.Marshaler { +func (ec *executionContext) _StringConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *StringConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "StringConnection", Field: field, @@ -9443,10 +11217,14 @@ func (ec *executionContext) _StringConnection_nodes(ctx context.Context, field g } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9459,9 +11237,15 @@ func (ec *executionContext) _StringConnection_nodes(ctx context.Context, field g return ec.marshalNString2ᚕstring(ctx, field.Selections, res) } -func (ec *executionContext) _StringConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *StringConnection) graphql.Marshaler { +func (ec *executionContext) _StringConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *StringConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "StringConnection", Field: field, @@ -9470,25 +11254,35 @@ func (ec *executionContext) _StringConnection_pageInfo(ctx context.Context, fiel } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _Target_id(ctx context.Context, field graphql.CollectedField, obj *assignment.RawTarget) graphql.Marshaler { +func (ec *executionContext) _Target_id(ctx context.Context, field graphql.CollectedField, obj *assignment.RawTarget) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Target", Field: field, @@ -9497,10 +11291,14 @@ func (ec *executionContext) _Target_id(ctx context.Context, field graphql.Collec } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9513,9 +11311,15 @@ func (ec *executionContext) _Target_id(ctx context.Context, field graphql.Collec return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _Target_type(ctx context.Context, field graphql.CollectedField, obj *assignment.RawTarget) graphql.Marshaler { +func (ec *executionContext) _Target_type(ctx context.Context, field graphql.CollectedField, obj *assignment.RawTarget) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Target", Field: field, @@ -9524,10 +11328,14 @@ func (ec *executionContext) _Target_type(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9540,9 +11348,15 @@ func (ec *executionContext) _Target_type(ctx context.Context, field graphql.Coll return ec.marshalNTargetType2githubᚗcomᚋtargetᚋgoalertᚋassignmentᚐTargetType(ctx, field.Selections, res) } -func (ec *executionContext) _Target_name(ctx context.Context, field graphql.CollectedField, obj *assignment.RawTarget) graphql.Marshaler { +func (ec *executionContext) _Target_name(ctx context.Context, field graphql.CollectedField, obj *assignment.RawTarget) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "Target", Field: field, @@ -9551,10 +11365,14 @@ func (ec *executionContext) _Target_name(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Target().Name(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -9564,9 +11382,15 @@ func (ec *executionContext) _Target_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) _TimeZone_id(ctx context.Context, field graphql.CollectedField, obj *TimeZone) graphql.Marshaler { +func (ec *executionContext) _TimeZone_id(ctx context.Context, field graphql.CollectedField, obj *TimeZone) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "TimeZone", Field: field, @@ -9575,10 +11399,14 @@ func (ec *executionContext) _TimeZone_id(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9591,9 +11419,15 @@ func (ec *executionContext) _TimeZone_id(ctx context.Context, field graphql.Coll return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _TimeZoneConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *TimeZoneConnection) graphql.Marshaler { +func (ec *executionContext) _TimeZoneConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *TimeZoneConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "TimeZoneConnection", Field: field, @@ -9602,10 +11436,14 @@ func (ec *executionContext) _TimeZoneConnection_nodes(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9618,9 +11456,15 @@ func (ec *executionContext) _TimeZoneConnection_nodes(ctx context.Context, field return ec.marshalNTimeZone2ᚕgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐTimeZone(ctx, field.Selections, res) } -func (ec *executionContext) _TimeZoneConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *TimeZoneConnection) graphql.Marshaler { +func (ec *executionContext) _TimeZoneConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *TimeZoneConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "TimeZoneConnection", Field: field, @@ -9629,25 +11473,35 @@ func (ec *executionContext) _TimeZoneConnection_pageInfo(ctx context.Context, fi } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9656,10 +11510,14 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9672,9 +11530,15 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _User_role(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_role(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9683,10 +11547,14 @@ func (ec *executionContext) _User_role(ctx context.Context, field graphql.Collec } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().Role(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9699,9 +11567,15 @@ func (ec *executionContext) _User_role(ctx context.Context, field graphql.Collec return ec.marshalNUserRole2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐUserRole(ctx, field.Selections, res) } -func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9710,10 +11584,14 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9726,9 +11604,15 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _User_email(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_email(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9737,10 +11621,14 @@ func (ec *executionContext) _User_email(ctx context.Context, field graphql.Colle } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Email, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9753,9 +11641,15 @@ func (ec *executionContext) _User_email(ctx context.Context, field graphql.Colle return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _User_contactMethods(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_contactMethods(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9764,10 +11658,14 @@ func (ec *executionContext) _User_contactMethods(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().ContactMethods(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9780,9 +11678,15 @@ func (ec *executionContext) _User_contactMethods(ctx context.Context, field grap return ec.marshalNUserContactMethod2ᚕgithub.comᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐContactMethod(ctx, field.Selections, res) } -func (ec *executionContext) _User_notificationRules(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_notificationRules(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9791,10 +11695,14 @@ func (ec *executionContext) _User_notificationRules(ctx context.Context, field g } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().NotificationRules(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9807,9 +11715,15 @@ func (ec *executionContext) _User_notificationRules(ctx context.Context, field g return ec.marshalNUserNotificationRule2ᚕgithub.comᚋtargetᚋgoalertᚋuserᚋnotificationruleᚐNotificationRule(ctx, field.Selections, res) } -func (ec *executionContext) _User_statusUpdateContactMethodID(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_statusUpdateContactMethodID(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9818,10 +11732,14 @@ func (ec *executionContext) _User_statusUpdateContactMethodID(ctx context.Contex } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.AlertStatusCMID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9834,9 +11752,15 @@ func (ec *executionContext) _User_statusUpdateContactMethodID(ctx context.Contex return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _User_authSubjects(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_authSubjects(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9845,10 +11769,14 @@ func (ec *executionContext) _User_authSubjects(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().AuthSubjects(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9861,9 +11789,15 @@ func (ec *executionContext) _User_authSubjects(ctx context.Context, field graphq return ec.marshalNAuthSubject2ᚕgithub.comᚋtargetᚋgoalertᚋuserᚐAuthSubject(ctx, field.Selections, res) } -func (ec *executionContext) _User_onCallSteps(ctx context.Context, field graphql.CollectedField, obj *user.User) graphql.Marshaler { +func (ec *executionContext) _User_onCallSteps(ctx context.Context, field graphql.CollectedField, obj *user.User) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "User", Field: field, @@ -9872,10 +11806,14 @@ func (ec *executionContext) _User_onCallSteps(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().OnCallSteps(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9888,9 +11826,15 @@ func (ec *executionContext) _User_onCallSteps(ctx context.Context, field graphql return ec.marshalNEscalationPolicyStep2ᚕgithub.comᚋtargetᚋgoalertᚋescalationᚐStep(ctx, field.Selections, res) } -func (ec *executionContext) _UserConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *UserConnection) graphql.Marshaler { +func (ec *executionContext) _UserConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *UserConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserConnection", Field: field, @@ -9899,10 +11843,14 @@ func (ec *executionContext) _UserConnection_nodes(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9915,9 +11863,15 @@ func (ec *executionContext) _UserConnection_nodes(ctx context.Context, field gra return ec.marshalNUser2ᚕgithub.comᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) _UserConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *UserConnection) graphql.Marshaler { +func (ec *executionContext) _UserConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *UserConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserConnection", Field: field, @@ -9926,25 +11880,35 @@ func (ec *executionContext) _UserConnection_pageInfo(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) _UserContactMethod_id(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) graphql.Marshaler { +func (ec *executionContext) _UserContactMethod_id(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserContactMethod", Field: field, @@ -9953,10 +11917,14 @@ func (ec *executionContext) _UserContactMethod_id(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -9969,9 +11937,15 @@ func (ec *executionContext) _UserContactMethod_id(ctx context.Context, field gra return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserContactMethod_type(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) graphql.Marshaler { +func (ec *executionContext) _UserContactMethod_type(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserContactMethod", Field: field, @@ -9980,10 +11954,14 @@ func (ec *executionContext) _UserContactMethod_type(ctx context.Context, field g } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -9993,9 +11971,15 @@ func (ec *executionContext) _UserContactMethod_type(ctx context.Context, field g return ec.marshalOContactMethodType2githubᚗcomᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐType(ctx, field.Selections, res) } -func (ec *executionContext) _UserContactMethod_name(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) graphql.Marshaler { +func (ec *executionContext) _UserContactMethod_name(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserContactMethod", Field: field, @@ -10004,10 +11988,14 @@ func (ec *executionContext) _UserContactMethod_name(ctx context.Context, field g } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10020,9 +12008,15 @@ func (ec *executionContext) _UserContactMethod_name(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserContactMethod_value(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) graphql.Marshaler { +func (ec *executionContext) _UserContactMethod_value(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserContactMethod", Field: field, @@ -10031,10 +12025,14 @@ func (ec *executionContext) _UserContactMethod_value(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10047,9 +12045,15 @@ func (ec *executionContext) _UserContactMethod_value(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserContactMethod_formattedValue(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) graphql.Marshaler { +func (ec *executionContext) _UserContactMethod_formattedValue(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserContactMethod", Field: field, @@ -10058,10 +12062,14 @@ func (ec *executionContext) _UserContactMethod_formattedValue(ctx context.Contex } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.UserContactMethod().FormattedValue(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10074,9 +12082,15 @@ func (ec *executionContext) _UserContactMethod_formattedValue(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserContactMethod_disabled(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) graphql.Marshaler { +func (ec *executionContext) _UserContactMethod_disabled(ctx context.Context, field graphql.CollectedField, obj *contactmethod.ContactMethod) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserContactMethod", Field: field, @@ -10085,10 +12099,14 @@ func (ec *executionContext) _UserContactMethod_disabled(ctx context.Context, fie } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Disabled, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10101,9 +12119,15 @@ func (ec *executionContext) _UserContactMethod_disabled(ctx context.Context, fie return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _UserNotificationRule_id(ctx context.Context, field graphql.CollectedField, obj *notificationrule.NotificationRule) graphql.Marshaler { +func (ec *executionContext) _UserNotificationRule_id(ctx context.Context, field graphql.CollectedField, obj *notificationrule.NotificationRule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserNotificationRule", Field: field, @@ -10112,10 +12136,14 @@ func (ec *executionContext) _UserNotificationRule_id(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10128,9 +12156,15 @@ func (ec *executionContext) _UserNotificationRule_id(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserNotificationRule_delayMinutes(ctx context.Context, field graphql.CollectedField, obj *notificationrule.NotificationRule) graphql.Marshaler { +func (ec *executionContext) _UserNotificationRule_delayMinutes(ctx context.Context, field graphql.CollectedField, obj *notificationrule.NotificationRule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserNotificationRule", Field: field, @@ -10139,10 +12173,14 @@ func (ec *executionContext) _UserNotificationRule_delayMinutes(ctx context.Conte } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DelayMinutes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10155,9 +12193,15 @@ func (ec *executionContext) _UserNotificationRule_delayMinutes(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) _UserNotificationRule_contactMethodID(ctx context.Context, field graphql.CollectedField, obj *notificationrule.NotificationRule) graphql.Marshaler { +func (ec *executionContext) _UserNotificationRule_contactMethodID(ctx context.Context, field graphql.CollectedField, obj *notificationrule.NotificationRule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserNotificationRule", Field: field, @@ -10166,10 +12210,14 @@ func (ec *executionContext) _UserNotificationRule_contactMethodID(ctx context.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ContactMethodID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10182,9 +12230,15 @@ func (ec *executionContext) _UserNotificationRule_contactMethodID(ctx context.Co return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserNotificationRule_contactMethod(ctx context.Context, field graphql.CollectedField, obj *notificationrule.NotificationRule) graphql.Marshaler { +func (ec *executionContext) _UserNotificationRule_contactMethod(ctx context.Context, field graphql.CollectedField, obj *notificationrule.NotificationRule) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserNotificationRule", Field: field, @@ -10193,10 +12247,14 @@ func (ec *executionContext) _UserNotificationRule_contactMethod(ctx context.Cont } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.UserNotificationRule().ContactMethod(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10206,9 +12264,15 @@ func (ec *executionContext) _UserNotificationRule_contactMethod(ctx context.Cont return ec.marshalOUserContactMethod2ᚖgithub.comᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐContactMethod(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverride_id(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) graphql.Marshaler { +func (ec *executionContext) _UserOverride_id(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverride", Field: field, @@ -10217,10 +12281,14 @@ func (ec *executionContext) _UserOverride_id(ctx context.Context, field graphql. } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10233,9 +12301,15 @@ func (ec *executionContext) _UserOverride_id(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverride_start(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) graphql.Marshaler { +func (ec *executionContext) _UserOverride_start(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverride", Field: field, @@ -10244,10 +12318,14 @@ func (ec *executionContext) _UserOverride_start(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Start, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10260,9 +12338,15 @@ func (ec *executionContext) _UserOverride_start(ctx context.Context, field graph return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverride_end(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) graphql.Marshaler { +func (ec *executionContext) _UserOverride_end(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverride", Field: field, @@ -10271,10 +12355,14 @@ func (ec *executionContext) _UserOverride_end(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.End, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10287,9 +12375,15 @@ func (ec *executionContext) _UserOverride_end(ctx context.Context, field graphql return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverride_addUserID(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) graphql.Marshaler { +func (ec *executionContext) _UserOverride_addUserID(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverride", Field: field, @@ -10298,10 +12392,14 @@ func (ec *executionContext) _UserOverride_addUserID(ctx context.Context, field g } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.AddUserID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10314,9 +12412,15 @@ func (ec *executionContext) _UserOverride_addUserID(ctx context.Context, field g return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverride_removeUserID(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) graphql.Marshaler { +func (ec *executionContext) _UserOverride_removeUserID(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverride", Field: field, @@ -10325,10 +12429,14 @@ func (ec *executionContext) _UserOverride_removeUserID(ctx context.Context, fiel } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.RemoveUserID, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10341,9 +12449,15 @@ func (ec *executionContext) _UserOverride_removeUserID(ctx context.Context, fiel return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverride_addUser(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) graphql.Marshaler { +func (ec *executionContext) _UserOverride_addUser(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverride", Field: field, @@ -10352,10 +12466,14 @@ func (ec *executionContext) _UserOverride_addUser(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.UserOverride().AddUser(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10365,9 +12483,15 @@ func (ec *executionContext) _UserOverride_addUser(ctx context.Context, field gra return ec.marshalOUser2ᚖgithub.comᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverride_removeUser(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) graphql.Marshaler { +func (ec *executionContext) _UserOverride_removeUser(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverride", Field: field, @@ -10376,10 +12500,14 @@ func (ec *executionContext) _UserOverride_removeUser(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.UserOverride().RemoveUser(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10389,9 +12517,15 @@ func (ec *executionContext) _UserOverride_removeUser(ctx context.Context, field return ec.marshalOUser2ᚖgithub.comᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverride_target(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) graphql.Marshaler { +func (ec *executionContext) _UserOverride_target(ctx context.Context, field graphql.CollectedField, obj *override.UserOverride) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverride", Field: field, @@ -10400,10 +12534,14 @@ func (ec *executionContext) _UserOverride_target(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.UserOverride().Target(rctx, obj) }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10416,9 +12554,15 @@ func (ec *executionContext) _UserOverride_target(ctx context.Context, field grap return ec.marshalNTarget2ᚖgithub.comᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverrideConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *UserOverrideConnection) graphql.Marshaler { +func (ec *executionContext) _UserOverrideConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *UserOverrideConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverrideConnection", Field: field, @@ -10427,10 +12571,14 @@ func (ec *executionContext) _UserOverrideConnection_nodes(ctx context.Context, f } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nodes, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10443,9 +12591,15 @@ func (ec *executionContext) _UserOverrideConnection_nodes(ctx context.Context, f return ec.marshalNUserOverride2ᚕgithub.comᚋtargetᚋgoalertᚋoverrideᚐUserOverride(ctx, field.Selections, res) } -func (ec *executionContext) _UserOverrideConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *UserOverrideConnection) graphql.Marshaler { +func (ec *executionContext) _UserOverrideConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *UserOverrideConnection) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "UserOverrideConnection", Field: field, @@ -10454,25 +12608,35 @@ func (ec *executionContext) _UserOverrideConnection_pageInfo(ctx context.Context } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") } return graphql.Null } - res := resTmp.(PageInfo) + res := resTmp.(*PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return ec.marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Directive", Field: field, @@ -10481,10 +12645,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10497,9 +12665,15 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Directive", Field: field, @@ -10508,10 +12682,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10521,9 +12699,15 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { +func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Directive", Field: field, @@ -10532,10 +12716,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10548,9 +12736,15 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Directive", Field: field, @@ -10559,10 +12753,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10575,9 +12773,15 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__EnumValue", Field: field, @@ -10586,10 +12790,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10602,9 +12810,15 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__EnumValue", Field: field, @@ -10613,10 +12827,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10626,9 +12844,15 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__EnumValue", Field: field, @@ -10637,10 +12861,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10653,9 +12881,15 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__EnumValue", Field: field, @@ -10664,10 +12898,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10677,9 +12915,15 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { +func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Field", Field: field, @@ -10688,10 +12932,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10704,9 +12952,15 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Field", Field: field, @@ -10715,10 +12969,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10728,9 +12986,15 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { +func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Field", Field: field, @@ -10739,10 +13003,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10755,9 +13023,15 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Field", Field: field, @@ -10766,10 +13040,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10782,9 +13060,15 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { +func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Field", Field: field, @@ -10793,10 +13077,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10809,9 +13097,15 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Field", Field: field, @@ -10820,10 +13114,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10833,9 +13131,15 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { +func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__InputValue", Field: field, @@ -10844,10 +13148,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10860,9 +13168,15 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__InputValue", Field: field, @@ -10871,10 +13185,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10884,9 +13202,15 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { +func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__InputValue", Field: field, @@ -10895,10 +13219,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10911,9 +13239,15 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__InputValue", Field: field, @@ -10922,10 +13256,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -10935,9 +13273,15 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Schema", Field: field, @@ -10946,10 +13290,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10962,9 +13310,15 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Schema", Field: field, @@ -10973,10 +13327,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -10989,9 +13347,15 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Schema", Field: field, @@ -11000,10 +13364,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11013,9 +13381,15 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Schema", Field: field, @@ -11024,10 +13398,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11037,9 +13415,15 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Schema", Field: field, @@ -11048,10 +13432,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -11064,9 +13452,15 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11075,10 +13469,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { if !ec.HasError(rctx) { ec.Errorf(ctx, "must not be null") @@ -11091,9 +13489,15 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11102,10 +13506,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11115,9 +13523,15 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11126,10 +13540,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11139,9 +13557,15 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11157,10 +13581,14 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11170,9 +13598,15 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return ec.marshalO__Field2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11181,10 +13615,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11194,9 +13632,15 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11205,10 +13649,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11218,9 +13666,15 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11236,10 +13690,14 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq } rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11249,9 +13707,15 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return ec.marshalO__EnumValue2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11260,10 +13724,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11273,9 +13741,15 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithub.comᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + ec.Tracer.EndFieldExecution(ctx) + }() rctx := &graphql.ResolverContext{ Object: "__Type", Field: field, @@ -11284,10 +13758,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } if resTmp == nil { return graphql.Null } @@ -11301,9 +13779,9 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co // region **************************** input.gotpl ***************************** -func (ec *executionContext) unmarshalInputAlertRecentEventsOptions(ctx context.Context, v interface{}) (AlertRecentEventsOptions, error) { +func (ec *executionContext) unmarshalInputAlertRecentEventsOptions(ctx context.Context, obj interface{}) (AlertRecentEventsOptions, error) { var it AlertRecentEventsOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11325,9 +13803,9 @@ func (ec *executionContext) unmarshalInputAlertRecentEventsOptions(ctx context.C return it, nil } -func (ec *executionContext) unmarshalInputAlertSearchOptions(ctx context.Context, v interface{}) (AlertSearchOptions, error) { +func (ec *executionContext) unmarshalInputAlertSearchOptions(ctx context.Context, obj interface{}) (AlertSearchOptions, error) { var it AlertSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -11383,9 +13861,9 @@ func (ec *executionContext) unmarshalInputAlertSearchOptions(ctx context.Context return it, nil } -func (ec *executionContext) unmarshalInputAuthSubjectInput(ctx context.Context, v interface{}) (user.AuthSubject, error) { +func (ec *executionContext) unmarshalInputAuthSubjectInput(ctx context.Context, obj interface{}) (user.AuthSubject, error) { var it user.AuthSubject - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11413,9 +13891,9 @@ func (ec *executionContext) unmarshalInputAuthSubjectInput(ctx context.Context, return it, nil } -func (ec *executionContext) unmarshalInputConfigValueInput(ctx context.Context, v interface{}) (ConfigValueInput, error) { +func (ec *executionContext) unmarshalInputConfigValueInput(ctx context.Context, obj interface{}) (ConfigValueInput, error) { var it ConfigValueInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11437,9 +13915,9 @@ func (ec *executionContext) unmarshalInputConfigValueInput(ctx context.Context, return it, nil } -func (ec *executionContext) unmarshalInputCreateAlertInput(ctx context.Context, v interface{}) (CreateAlertInput, error) { +func (ec *executionContext) unmarshalInputCreateAlertInput(ctx context.Context, obj interface{}) (CreateAlertInput, error) { var it CreateAlertInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11467,9 +13945,9 @@ func (ec *executionContext) unmarshalInputCreateAlertInput(ctx context.Context, return it, nil } -func (ec *executionContext) unmarshalInputCreateEscalationPolicyInput(ctx context.Context, v interface{}) (CreateEscalationPolicyInput, error) { +func (ec *executionContext) unmarshalInputCreateEscalationPolicyInput(ctx context.Context, obj interface{}) (CreateEscalationPolicyInput, error) { var it CreateEscalationPolicyInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["repeat"]; !present { asMap["repeat"] = 3 @@ -11507,9 +13985,9 @@ func (ec *executionContext) unmarshalInputCreateEscalationPolicyInput(ctx contex return it, nil } -func (ec *executionContext) unmarshalInputCreateEscalationPolicyStepInput(ctx context.Context, v interface{}) (CreateEscalationPolicyStepInput, error) { +func (ec *executionContext) unmarshalInputCreateEscalationPolicyStepInput(ctx context.Context, obj interface{}) (CreateEscalationPolicyStepInput, error) { var it CreateEscalationPolicyStepInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11549,9 +14027,9 @@ func (ec *executionContext) unmarshalInputCreateEscalationPolicyStepInput(ctx co return it, nil } -func (ec *executionContext) unmarshalInputCreateHeartbeatMonitorInput(ctx context.Context, v interface{}) (CreateHeartbeatMonitorInput, error) { +func (ec *executionContext) unmarshalInputCreateHeartbeatMonitorInput(ctx context.Context, obj interface{}) (CreateHeartbeatMonitorInput, error) { var it CreateHeartbeatMonitorInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11579,9 +14057,9 @@ func (ec *executionContext) unmarshalInputCreateHeartbeatMonitorInput(ctx contex return it, nil } -func (ec *executionContext) unmarshalInputCreateIntegrationKeyInput(ctx context.Context, v interface{}) (CreateIntegrationKeyInput, error) { +func (ec *executionContext) unmarshalInputCreateIntegrationKeyInput(ctx context.Context, obj interface{}) (CreateIntegrationKeyInput, error) { var it CreateIntegrationKeyInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11609,9 +14087,9 @@ func (ec *executionContext) unmarshalInputCreateIntegrationKeyInput(ctx context. return it, nil } -func (ec *executionContext) unmarshalInputCreateRotationInput(ctx context.Context, v interface{}) (CreateRotationInput, error) { +func (ec *executionContext) unmarshalInputCreateRotationInput(ctx context.Context, obj interface{}) (CreateRotationInput, error) { var it CreateRotationInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["shiftLength"]; !present { asMap["shiftLength"] = 1 @@ -11673,9 +14151,9 @@ func (ec *executionContext) unmarshalInputCreateRotationInput(ctx context.Contex return it, nil } -func (ec *executionContext) unmarshalInputCreateScheduleInput(ctx context.Context, v interface{}) (CreateScheduleInput, error) { +func (ec *executionContext) unmarshalInputCreateScheduleInput(ctx context.Context, obj interface{}) (CreateScheduleInput, error) { var it CreateScheduleInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11715,9 +14193,9 @@ func (ec *executionContext) unmarshalInputCreateScheduleInput(ctx context.Contex return it, nil } -func (ec *executionContext) unmarshalInputCreateServiceInput(ctx context.Context, v interface{}) (CreateServiceInput, error) { +func (ec *executionContext) unmarshalInputCreateServiceInput(ctx context.Context, obj interface{}) (CreateServiceInput, error) { var it CreateServiceInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11775,9 +14253,9 @@ func (ec *executionContext) unmarshalInputCreateServiceInput(ctx context.Context return it, nil } -func (ec *executionContext) unmarshalInputCreateUserContactMethodInput(ctx context.Context, v interface{}) (CreateUserContactMethodInput, error) { +func (ec *executionContext) unmarshalInputCreateUserContactMethodInput(ctx context.Context, obj interface{}) (CreateUserContactMethodInput, error) { var it CreateUserContactMethodInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11817,9 +14295,9 @@ func (ec *executionContext) unmarshalInputCreateUserContactMethodInput(ctx conte return it, nil } -func (ec *executionContext) unmarshalInputCreateUserNotificationRuleInput(ctx context.Context, v interface{}) (CreateUserNotificationRuleInput, error) { +func (ec *executionContext) unmarshalInputCreateUserNotificationRuleInput(ctx context.Context, obj interface{}) (CreateUserNotificationRuleInput, error) { var it CreateUserNotificationRuleInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11847,9 +14325,9 @@ func (ec *executionContext) unmarshalInputCreateUserNotificationRuleInput(ctx co return it, nil } -func (ec *executionContext) unmarshalInputCreateUserOverrideInput(ctx context.Context, v interface{}) (CreateUserOverrideInput, error) { +func (ec *executionContext) unmarshalInputCreateUserOverrideInput(ctx context.Context, obj interface{}) (CreateUserOverrideInput, error) { var it CreateUserOverrideInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -11889,9 +14367,9 @@ func (ec *executionContext) unmarshalInputCreateUserOverrideInput(ctx context.Co return it, nil } -func (ec *executionContext) unmarshalInputEscalationPolicySearchOptions(ctx context.Context, v interface{}) (EscalationPolicySearchOptions, error) { +func (ec *executionContext) unmarshalInputEscalationPolicySearchOptions(ctx context.Context, obj interface{}) (EscalationPolicySearchOptions, error) { var it EscalationPolicySearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -11929,9 +14407,9 @@ func (ec *executionContext) unmarshalInputEscalationPolicySearchOptions(ctx cont return it, nil } -func (ec *executionContext) unmarshalInputLabelKeySearchOptions(ctx context.Context, v interface{}) (LabelKeySearchOptions, error) { +func (ec *executionContext) unmarshalInputLabelKeySearchOptions(ctx context.Context, obj interface{}) (LabelKeySearchOptions, error) { var it LabelKeySearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -11969,9 +14447,9 @@ func (ec *executionContext) unmarshalInputLabelKeySearchOptions(ctx context.Cont return it, nil } -func (ec *executionContext) unmarshalInputLabelSearchOptions(ctx context.Context, v interface{}) (LabelSearchOptions, error) { +func (ec *executionContext) unmarshalInputLabelSearchOptions(ctx context.Context, obj interface{}) (LabelSearchOptions, error) { var it LabelSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12015,9 +14493,9 @@ func (ec *executionContext) unmarshalInputLabelSearchOptions(ctx context.Context return it, nil } -func (ec *executionContext) unmarshalInputLabelValueSearchOptions(ctx context.Context, v interface{}) (LabelValueSearchOptions, error) { +func (ec *executionContext) unmarshalInputLabelValueSearchOptions(ctx context.Context, obj interface{}) (LabelValueSearchOptions, error) { var it LabelValueSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12061,9 +14539,9 @@ func (ec *executionContext) unmarshalInputLabelValueSearchOptions(ctx context.Co return it, nil } -func (ec *executionContext) unmarshalInputRotationSearchOptions(ctx context.Context, v interface{}) (RotationSearchOptions, error) { +func (ec *executionContext) unmarshalInputRotationSearchOptions(ctx context.Context, obj interface{}) (RotationSearchOptions, error) { var it RotationSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12113,9 +14591,9 @@ func (ec *executionContext) unmarshalInputRotationSearchOptions(ctx context.Cont return it, nil } -func (ec *executionContext) unmarshalInputScheduleRuleInput(ctx context.Context, v interface{}) (ScheduleRuleInput, error) { +func (ec *executionContext) unmarshalInputScheduleRuleInput(ctx context.Context, obj interface{}) (ScheduleRuleInput, error) { var it ScheduleRuleInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12149,9 +14627,9 @@ func (ec *executionContext) unmarshalInputScheduleRuleInput(ctx context.Context, return it, nil } -func (ec *executionContext) unmarshalInputScheduleSearchOptions(ctx context.Context, v interface{}) (ScheduleSearchOptions, error) { +func (ec *executionContext) unmarshalInputScheduleSearchOptions(ctx context.Context, obj interface{}) (ScheduleSearchOptions, error) { var it ScheduleSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12201,9 +14679,9 @@ func (ec *executionContext) unmarshalInputScheduleSearchOptions(ctx context.Cont return it, nil } -func (ec *executionContext) unmarshalInputScheduleTargetInput(ctx context.Context, v interface{}) (ScheduleTargetInput, error) { +func (ec *executionContext) unmarshalInputScheduleTargetInput(ctx context.Context, obj interface{}) (ScheduleTargetInput, error) { var it ScheduleTargetInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12237,9 +14715,9 @@ func (ec *executionContext) unmarshalInputScheduleTargetInput(ctx context.Contex return it, nil } -func (ec *executionContext) unmarshalInputSendContactMethodVerificationInput(ctx context.Context, v interface{}) (SendContactMethodVerificationInput, error) { +func (ec *executionContext) unmarshalInputSendContactMethodVerificationInput(ctx context.Context, obj interface{}) (SendContactMethodVerificationInput, error) { var it SendContactMethodVerificationInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12255,9 +14733,9 @@ func (ec *executionContext) unmarshalInputSendContactMethodVerificationInput(ctx return it, nil } -func (ec *executionContext) unmarshalInputServiceSearchOptions(ctx context.Context, v interface{}) (ServiceSearchOptions, error) { +func (ec *executionContext) unmarshalInputServiceSearchOptions(ctx context.Context, obj interface{}) (ServiceSearchOptions, error) { var it ServiceSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12307,15 +14785,15 @@ func (ec *executionContext) unmarshalInputServiceSearchOptions(ctx context.Conte return it, nil } -func (ec *executionContext) unmarshalInputSetFavoriteInput(ctx context.Context, v interface{}) (SetFavoriteInput, error) { +func (ec *executionContext) unmarshalInputSetFavoriteInput(ctx context.Context, obj interface{}) (SetFavoriteInput, error) { var it SetFavoriteInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { case "target": var err error - it.Target, err = ec.unmarshalNTargetInput2githubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, v) + it.Target, err = ec.unmarshalNTargetInput2ᚖgithub.comᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, v) if err != nil { return it, err } @@ -12331,9 +14809,9 @@ func (ec *executionContext) unmarshalInputSetFavoriteInput(ctx context.Context, return it, nil } -func (ec *executionContext) unmarshalInputSetLabelInput(ctx context.Context, v interface{}) (SetLabelInput, error) { +func (ec *executionContext) unmarshalInputSetLabelInput(ctx context.Context, obj interface{}) (SetLabelInput, error) { var it SetLabelInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12361,9 +14839,9 @@ func (ec *executionContext) unmarshalInputSetLabelInput(ctx context.Context, v i return it, nil } -func (ec *executionContext) unmarshalInputSlackChannelSearchOptions(ctx context.Context, v interface{}) (SlackChannelSearchOptions, error) { +func (ec *executionContext) unmarshalInputSlackChannelSearchOptions(ctx context.Context, obj interface{}) (SlackChannelSearchOptions, error) { var it SlackChannelSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12401,9 +14879,9 @@ func (ec *executionContext) unmarshalInputSlackChannelSearchOptions(ctx context. return it, nil } -func (ec *executionContext) unmarshalInputTargetInput(ctx context.Context, v interface{}) (assignment.RawTarget, error) { +func (ec *executionContext) unmarshalInputTargetInput(ctx context.Context, obj interface{}) (assignment.RawTarget, error) { var it assignment.RawTarget - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12425,9 +14903,9 @@ func (ec *executionContext) unmarshalInputTargetInput(ctx context.Context, v int return it, nil } -func (ec *executionContext) unmarshalInputTimeZoneSearchOptions(ctx context.Context, v interface{}) (TimeZoneSearchOptions, error) { +func (ec *executionContext) unmarshalInputTimeZoneSearchOptions(ctx context.Context, obj interface{}) (TimeZoneSearchOptions, error) { var it TimeZoneSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12465,9 +14943,9 @@ func (ec *executionContext) unmarshalInputTimeZoneSearchOptions(ctx context.Cont return it, nil } -func (ec *executionContext) unmarshalInputUpdateAlertsInput(ctx context.Context, v interface{}) (UpdateAlertsInput, error) { +func (ec *executionContext) unmarshalInputUpdateAlertsInput(ctx context.Context, obj interface{}) (UpdateAlertsInput, error) { var it UpdateAlertsInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12489,9 +14967,9 @@ func (ec *executionContext) unmarshalInputUpdateAlertsInput(ctx context.Context, return it, nil } -func (ec *executionContext) unmarshalInputUpdateEscalationPolicyInput(ctx context.Context, v interface{}) (UpdateEscalationPolicyInput, error) { +func (ec *executionContext) unmarshalInputUpdateEscalationPolicyInput(ctx context.Context, obj interface{}) (UpdateEscalationPolicyInput, error) { var it UpdateEscalationPolicyInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12531,9 +15009,9 @@ func (ec *executionContext) unmarshalInputUpdateEscalationPolicyInput(ctx contex return it, nil } -func (ec *executionContext) unmarshalInputUpdateEscalationPolicyStepInput(ctx context.Context, v interface{}) (UpdateEscalationPolicyStepInput, error) { +func (ec *executionContext) unmarshalInputUpdateEscalationPolicyStepInput(ctx context.Context, obj interface{}) (UpdateEscalationPolicyStepInput, error) { var it UpdateEscalationPolicyStepInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12561,9 +15039,9 @@ func (ec *executionContext) unmarshalInputUpdateEscalationPolicyStepInput(ctx co return it, nil } -func (ec *executionContext) unmarshalInputUpdateHeartbeatMonitorInput(ctx context.Context, v interface{}) (UpdateHeartbeatMonitorInput, error) { +func (ec *executionContext) unmarshalInputUpdateHeartbeatMonitorInput(ctx context.Context, obj interface{}) (UpdateHeartbeatMonitorInput, error) { var it UpdateHeartbeatMonitorInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12591,9 +15069,9 @@ func (ec *executionContext) unmarshalInputUpdateHeartbeatMonitorInput(ctx contex return it, nil } -func (ec *executionContext) unmarshalInputUpdateRotationInput(ctx context.Context, v interface{}) (UpdateRotationInput, error) { +func (ec *executionContext) unmarshalInputUpdateRotationInput(ctx context.Context, obj interface{}) (UpdateRotationInput, error) { var it UpdateRotationInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12657,9 +15135,9 @@ func (ec *executionContext) unmarshalInputUpdateRotationInput(ctx context.Contex return it, nil } -func (ec *executionContext) unmarshalInputUpdateScheduleInput(ctx context.Context, v interface{}) (UpdateScheduleInput, error) { +func (ec *executionContext) unmarshalInputUpdateScheduleInput(ctx context.Context, obj interface{}) (UpdateScheduleInput, error) { var it UpdateScheduleInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12693,9 +15171,9 @@ func (ec *executionContext) unmarshalInputUpdateScheduleInput(ctx context.Contex return it, nil } -func (ec *executionContext) unmarshalInputUpdateServiceInput(ctx context.Context, v interface{}) (UpdateServiceInput, error) { +func (ec *executionContext) unmarshalInputUpdateServiceInput(ctx context.Context, obj interface{}) (UpdateServiceInput, error) { var it UpdateServiceInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12729,9 +15207,9 @@ func (ec *executionContext) unmarshalInputUpdateServiceInput(ctx context.Context return it, nil } -func (ec *executionContext) unmarshalInputUpdateUserContactMethodInput(ctx context.Context, v interface{}) (UpdateUserContactMethodInput, error) { +func (ec *executionContext) unmarshalInputUpdateUserContactMethodInput(ctx context.Context, obj interface{}) (UpdateUserContactMethodInput, error) { var it UpdateUserContactMethodInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12759,9 +15237,9 @@ func (ec *executionContext) unmarshalInputUpdateUserContactMethodInput(ctx conte return it, nil } -func (ec *executionContext) unmarshalInputUpdateUserInput(ctx context.Context, v interface{}) (UpdateUserInput, error) { +func (ec *executionContext) unmarshalInputUpdateUserInput(ctx context.Context, obj interface{}) (UpdateUserInput, error) { var it UpdateUserInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12801,9 +15279,9 @@ func (ec *executionContext) unmarshalInputUpdateUserInput(ctx context.Context, v return it, nil } -func (ec *executionContext) unmarshalInputUpdateUserOverrideInput(ctx context.Context, v interface{}) (UpdateUserOverrideInput, error) { +func (ec *executionContext) unmarshalInputUpdateUserOverrideInput(ctx context.Context, obj interface{}) (UpdateUserOverrideInput, error) { var it UpdateUserOverrideInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12843,9 +15321,9 @@ func (ec *executionContext) unmarshalInputUpdateUserOverrideInput(ctx context.Co return it, nil } -func (ec *executionContext) unmarshalInputUserOverrideSearchOptions(ctx context.Context, v interface{}) (UserOverrideSearchOptions, error) { +func (ec *executionContext) unmarshalInputUserOverrideSearchOptions(ctx context.Context, obj interface{}) (UserOverrideSearchOptions, error) { var it UserOverrideSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12913,9 +15391,9 @@ func (ec *executionContext) unmarshalInputUserOverrideSearchOptions(ctx context. return it, nil } -func (ec *executionContext) unmarshalInputUserSearchOptions(ctx context.Context, v interface{}) (UserSearchOptions, error) { +func (ec *executionContext) unmarshalInputUserSearchOptions(ctx context.Context, obj interface{}) (UserSearchOptions, error) { var it UserSearchOptions - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) if _, present := asMap["first"]; !present { asMap["first"] = 15 @@ -12953,9 +15431,9 @@ func (ec *executionContext) unmarshalInputUserSearchOptions(ctx context.Context, return it, nil } -func (ec *executionContext) unmarshalInputVerifyContactMethodInput(ctx context.Context, v interface{}) (VerifyContactMethodInput, error) { +func (ec *executionContext) unmarshalInputVerifyContactMethodInput(ctx context.Context, obj interface{}) (VerifyContactMethodInput, error) { var it VerifyContactMethodInput - var asMap = v.(map[string]interface{}) + var asMap = obj.(map[string]interface{}) for k, v := range asMap { switch k { @@ -12988,10 +15466,10 @@ func (ec *executionContext) unmarshalInputVerifyContactMethodInput(ctx context.C var alertImplementors = []string{"Alert"} func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, obj *alert.Alert) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, alertImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, alertImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -12999,7 +15477,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob case "id": out.Values[i] = ec._Alert_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "alertID": field := field @@ -13011,7 +15489,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob }() res = ec._Alert_alertID(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -13025,29 +15503,29 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob }() res = ec._Alert_status(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) case "summary": out.Values[i] = ec._Alert_summary(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "details": out.Values[i] = ec._Alert_details(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "createdAt": out.Values[i] = ec._Alert_createdAt(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "serviceID": out.Values[i] = ec._Alert_serviceID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "service": field := field @@ -13081,7 +15559,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob }() res = ec._Alert_recentEvents(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -13090,7 +15568,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13099,10 +15577,10 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob var alertConnectionImplementors = []string{"AlertConnection"} func (ec *executionContext) _AlertConnection(ctx context.Context, sel ast.SelectionSet, obj *AlertConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, alertConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, alertConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13110,19 +15588,19 @@ func (ec *executionContext) _AlertConnection(ctx context.Context, sel ast.Select case "nodes": out.Values[i] = ec._AlertConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._AlertConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13131,42 +15609,24 @@ func (ec *executionContext) _AlertConnection(ctx context.Context, sel ast.Select var alertLogEntryImplementors = []string{"AlertLogEntry"} func (ec *executionContext) _AlertLogEntry(ctx context.Context, sel ast.SelectionSet, obj *alertlog.Entry) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, alertLogEntryImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, alertLogEntryImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("AlertLogEntry") case "id": - field := field - out.Concurrently(i, func() (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._AlertLogEntry_id(ctx, field, obj) - if res == graphql.Null { - invalid = true - } - return res - }) + out.Values[i] = ec._AlertLogEntry_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } case "timestamp": - field := field - out.Concurrently(i, func() (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._AlertLogEntry_timestamp(ctx, field, obj) - if res == graphql.Null { - invalid = true - } - return res - }) + out.Values[i] = ec._AlertLogEntry_timestamp(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } case "message": field := field out.Concurrently(i, func() (res graphql.Marshaler) { @@ -13177,7 +15637,7 @@ func (ec *executionContext) _AlertLogEntry(ctx context.Context, sel ast.Selectio }() res = ec._AlertLogEntry_message(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -13186,7 +15646,7 @@ func (ec *executionContext) _AlertLogEntry(ctx context.Context, sel ast.Selectio } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13195,10 +15655,10 @@ func (ec *executionContext) _AlertLogEntry(ctx context.Context, sel ast.Selectio var alertLogEntryConnectionImplementors = []string{"AlertLogEntryConnection"} func (ec *executionContext) _AlertLogEntryConnection(ctx context.Context, sel ast.SelectionSet, obj *AlertLogEntryConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, alertLogEntryConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, alertLogEntryConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13206,19 +15666,19 @@ func (ec *executionContext) _AlertLogEntryConnection(ctx context.Context, sel as case "nodes": out.Values[i] = ec._AlertLogEntryConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._AlertLogEntryConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13227,10 +15687,10 @@ func (ec *executionContext) _AlertLogEntryConnection(ctx context.Context, sel as var alertStateImplementors = []string{"AlertState"} func (ec *executionContext) _AlertState(ctx context.Context, sel ast.SelectionSet, obj *alert.State) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, alertStateImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, alertStateImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13238,24 +15698,24 @@ func (ec *executionContext) _AlertState(ctx context.Context, sel ast.SelectionSe case "lastEscalation": out.Values[i] = ec._AlertState_lastEscalation(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "stepNumber": out.Values[i] = ec._AlertState_stepNumber(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "repeatCount": out.Values[i] = ec._AlertState_repeatCount(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13264,10 +15724,10 @@ func (ec *executionContext) _AlertState(ctx context.Context, sel ast.SelectionSe var authSubjectImplementors = []string{"AuthSubject"} func (ec *executionContext) _AuthSubject(ctx context.Context, sel ast.SelectionSet, obj *user.AuthSubject) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, authSubjectImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, authSubjectImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13275,24 +15735,24 @@ func (ec *executionContext) _AuthSubject(ctx context.Context, sel ast.SelectionS case "providerID": out.Values[i] = ec._AuthSubject_providerID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "subjectID": out.Values[i] = ec._AuthSubject_subjectID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "userID": out.Values[i] = ec._AuthSubject_userID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13301,10 +15761,10 @@ func (ec *executionContext) _AuthSubject(ctx context.Context, sel ast.SelectionS var authSubjectConnectionImplementors = []string{"AuthSubjectConnection"} func (ec *executionContext) _AuthSubjectConnection(ctx context.Context, sel ast.SelectionSet, obj *AuthSubjectConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, authSubjectConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, authSubjectConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13312,19 +15772,19 @@ func (ec *executionContext) _AuthSubjectConnection(ctx context.Context, sel ast. case "nodes": out.Values[i] = ec._AuthSubjectConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._AuthSubjectConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13333,10 +15793,10 @@ func (ec *executionContext) _AuthSubjectConnection(ctx context.Context, sel ast. var configValueImplementors = []string{"ConfigValue"} func (ec *executionContext) _ConfigValue(ctx context.Context, sel ast.SelectionSet, obj *ConfigValue) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, configValueImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, configValueImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13344,34 +15804,34 @@ func (ec *executionContext) _ConfigValue(ctx context.Context, sel ast.SelectionS case "id": out.Values[i] = ec._ConfigValue_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "description": out.Values[i] = ec._ConfigValue_description(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "value": out.Values[i] = ec._ConfigValue_value(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "type": out.Values[i] = ec._ConfigValue_type(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "password": out.Values[i] = ec._ConfigValue_password(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13380,10 +15840,10 @@ func (ec *executionContext) _ConfigValue(ctx context.Context, sel ast.SelectionS var escalationPolicyImplementors = []string{"EscalationPolicy"} func (ec *executionContext) _EscalationPolicy(ctx context.Context, sel ast.SelectionSet, obj *escalation.Policy) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, escalationPolicyImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, escalationPolicyImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13391,22 +15851,22 @@ func (ec *executionContext) _EscalationPolicy(ctx context.Context, sel ast.Selec case "id": out.Values[i] = ec._EscalationPolicy_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "name": out.Values[i] = ec._EscalationPolicy_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "description": out.Values[i] = ec._EscalationPolicy_description(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "repeat": out.Values[i] = ec._EscalationPolicy_repeat(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "assignedTo": field := field @@ -13418,7 +15878,7 @@ func (ec *executionContext) _EscalationPolicy(ctx context.Context, sel ast.Selec }() res = ec._EscalationPolicy_assignedTo(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -13432,7 +15892,7 @@ func (ec *executionContext) _EscalationPolicy(ctx context.Context, sel ast.Selec }() res = ec._EscalationPolicy_steps(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -13441,7 +15901,7 @@ func (ec *executionContext) _EscalationPolicy(ctx context.Context, sel ast.Selec } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13450,10 +15910,10 @@ func (ec *executionContext) _EscalationPolicy(ctx context.Context, sel ast.Selec var escalationPolicyConnectionImplementors = []string{"EscalationPolicyConnection"} func (ec *executionContext) _EscalationPolicyConnection(ctx context.Context, sel ast.SelectionSet, obj *EscalationPolicyConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, escalationPolicyConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, escalationPolicyConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13461,19 +15921,19 @@ func (ec *executionContext) _EscalationPolicyConnection(ctx context.Context, sel case "nodes": out.Values[i] = ec._EscalationPolicyConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._EscalationPolicyConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13482,10 +15942,10 @@ func (ec *executionContext) _EscalationPolicyConnection(ctx context.Context, sel var escalationPolicyStepImplementors = []string{"EscalationPolicyStep"} func (ec *executionContext) _EscalationPolicyStep(ctx context.Context, sel ast.SelectionSet, obj *escalation.Step) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, escalationPolicyStepImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, escalationPolicyStepImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13493,17 +15953,17 @@ func (ec *executionContext) _EscalationPolicyStep(ctx context.Context, sel ast.S case "id": out.Values[i] = ec._EscalationPolicyStep_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "stepNumber": out.Values[i] = ec._EscalationPolicyStep_stepNumber(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "delayMinutes": out.Values[i] = ec._EscalationPolicyStep_delayMinutes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "targets": field := field @@ -13515,7 +15975,7 @@ func (ec *executionContext) _EscalationPolicyStep(ctx context.Context, sel ast.S }() res = ec._EscalationPolicyStep_targets(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -13535,7 +15995,7 @@ func (ec *executionContext) _EscalationPolicyStep(ctx context.Context, sel ast.S } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13544,10 +16004,10 @@ func (ec *executionContext) _EscalationPolicyStep(ctx context.Context, sel ast.S var heartbeatMonitorImplementors = []string{"HeartbeatMonitor"} func (ec *executionContext) _HeartbeatMonitor(ctx context.Context, sel ast.SelectionSet, obj *heartbeat.Monitor) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, heartbeatMonitorImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, heartbeatMonitorImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13555,17 +16015,17 @@ func (ec *executionContext) _HeartbeatMonitor(ctx context.Context, sel ast.Selec case "id": out.Values[i] = ec._HeartbeatMonitor_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "serviceID": out.Values[i] = ec._HeartbeatMonitor_serviceID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "name": out.Values[i] = ec._HeartbeatMonitor_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "timeoutMinutes": field := field @@ -13577,14 +16037,14 @@ func (ec *executionContext) _HeartbeatMonitor(ctx context.Context, sel ast.Selec }() res = ec._HeartbeatMonitor_timeoutMinutes(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) case "lastState": out.Values[i] = ec._HeartbeatMonitor_lastState(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "lastHeartbeat": out.Values[i] = ec._HeartbeatMonitor_lastHeartbeat(ctx, field, obj) @@ -13598,7 +16058,7 @@ func (ec *executionContext) _HeartbeatMonitor(ctx context.Context, sel ast.Selec }() res = ec._HeartbeatMonitor_href(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -13607,7 +16067,7 @@ func (ec *executionContext) _HeartbeatMonitor(ctx context.Context, sel ast.Selec } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13616,10 +16076,10 @@ func (ec *executionContext) _HeartbeatMonitor(ctx context.Context, sel ast.Selec var integrationKeyImplementors = []string{"IntegrationKey"} func (ec *executionContext) _IntegrationKey(ctx context.Context, sel ast.SelectionSet, obj *integrationkey.IntegrationKey) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, integrationKeyImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, integrationKeyImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13627,12 +16087,12 @@ func (ec *executionContext) _IntegrationKey(ctx context.Context, sel ast.Selecti case "id": out.Values[i] = ec._IntegrationKey_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "serviceID": out.Values[i] = ec._IntegrationKey_serviceID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "type": field := field @@ -13644,14 +16104,14 @@ func (ec *executionContext) _IntegrationKey(ctx context.Context, sel ast.Selecti }() res = ec._IntegrationKey_type(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) case "name": out.Values[i] = ec._IntegrationKey_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "href": field := field @@ -13663,7 +16123,7 @@ func (ec *executionContext) _IntegrationKey(ctx context.Context, sel ast.Selecti }() res = ec._IntegrationKey_href(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -13672,7 +16132,7 @@ func (ec *executionContext) _IntegrationKey(ctx context.Context, sel ast.Selecti } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13681,10 +16141,10 @@ func (ec *executionContext) _IntegrationKey(ctx context.Context, sel ast.Selecti var labelImplementors = []string{"Label"} func (ec *executionContext) _Label(ctx context.Context, sel ast.SelectionSet, obj *label.Label) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, labelImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, labelImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13692,19 +16152,19 @@ func (ec *executionContext) _Label(ctx context.Context, sel ast.SelectionSet, ob case "key": out.Values[i] = ec._Label_key(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "value": out.Values[i] = ec._Label_value(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13713,10 +16173,10 @@ func (ec *executionContext) _Label(ctx context.Context, sel ast.SelectionSet, ob var labelConnectionImplementors = []string{"LabelConnection"} func (ec *executionContext) _LabelConnection(ctx context.Context, sel ast.SelectionSet, obj *LabelConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, labelConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, labelConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13724,19 +16184,19 @@ func (ec *executionContext) _LabelConnection(ctx context.Context, sel ast.Select case "nodes": out.Values[i] = ec._LabelConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._LabelConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13745,14 +16205,14 @@ func (ec *executionContext) _LabelConnection(ctx context.Context, sel ast.Select var mutationImplementors = []string{"Mutation"} func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, mutationImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, mutationImplementors) ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ Object: "Mutation", }) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13760,56 +16220,56 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) case "addAuthSubject": out.Values[i] = ec._Mutation_addAuthSubject(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "deleteAuthSubject": out.Values[i] = ec._Mutation_deleteAuthSubject(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "updateUser": out.Values[i] = ec._Mutation_updateUser(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "testContactMethod": out.Values[i] = ec._Mutation_testContactMethod(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "updateAlerts": out.Values[i] = ec._Mutation_updateAlerts(ctx, field) case "updateRotation": out.Values[i] = ec._Mutation_updateRotation(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "escalateAlerts": out.Values[i] = ec._Mutation_escalateAlerts(ctx, field) case "setFavorite": out.Values[i] = ec._Mutation_setFavorite(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "updateService": out.Values[i] = ec._Mutation_updateService(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "updateEscalationPolicy": out.Values[i] = ec._Mutation_updateEscalationPolicy(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "updateEscalationPolicyStep": out.Values[i] = ec._Mutation_updateEscalationPolicyStep(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "deleteAll": out.Values[i] = ec._Mutation_deleteAll(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "createAlert": out.Values[i] = ec._Mutation_createAlert(ctx, field) @@ -13828,14 +16288,14 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) case "setLabel": out.Values[i] = ec._Mutation_setLabel(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "createSchedule": out.Values[i] = ec._Mutation_createSchedule(ctx, field) case "updateScheduleTarget": out.Values[i] = ec._Mutation_updateScheduleTarget(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "createUserOverride": out.Values[i] = ec._Mutation_createUserOverride(ctx, field) @@ -13846,44 +16306,44 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) case "updateUserContactMethod": out.Values[i] = ec._Mutation_updateUserContactMethod(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "sendContactMethodVerification": out.Values[i] = ec._Mutation_sendContactMethodVerification(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "verifyContactMethod": out.Values[i] = ec._Mutation_verifyContactMethod(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "updateSchedule": out.Values[i] = ec._Mutation_updateSchedule(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "updateUserOverride": out.Values[i] = ec._Mutation_updateUserOverride(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "updateHeartbeatMonitor": out.Values[i] = ec._Mutation_updateHeartbeatMonitor(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "setConfig": out.Values[i] = ec._Mutation_setConfig(ctx, field) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13892,10 +16352,10 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) var onCallShiftImplementors = []string{"OnCallShift"} func (ec *executionContext) _OnCallShift(ctx context.Context, sel ast.SelectionSet, obj *oncall.Shift) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, onCallShiftImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, onCallShiftImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13903,7 +16363,7 @@ func (ec *executionContext) _OnCallShift(ctx context.Context, sel ast.SelectionS case "userID": out.Values[i] = ec._OnCallShift_userID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "user": field := field @@ -13919,24 +16379,24 @@ func (ec *executionContext) _OnCallShift(ctx context.Context, sel ast.SelectionS case "start": out.Values[i] = ec._OnCallShift_start(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "end": out.Values[i] = ec._OnCallShift_end(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "truncated": out.Values[i] = ec._OnCallShift_truncated(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13945,10 +16405,10 @@ func (ec *executionContext) _OnCallShift(ctx context.Context, sel ast.SelectionS var pageInfoImplementors = []string{"PageInfo"} func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *PageInfo) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, pageInfoImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, pageInfoImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -13958,14 +16418,14 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, case "hasNextPage": out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -13974,14 +16434,14 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, queryImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, queryImplementors) ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ Object: "Query", }) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14007,7 +16467,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_users(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14032,7 +16492,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_alerts(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14079,7 +16539,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_services(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14104,7 +16564,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_rotations(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14129,7 +16589,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_schedules(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14154,7 +16614,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_escalationPolicies(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14168,7 +16628,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_authSubjectsForProvider(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14182,7 +16642,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_timeZones(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14196,7 +16656,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_labels(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14210,7 +16670,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_labelKeys(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14224,7 +16684,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_labelValues(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14238,7 +16698,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_userOverrides(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14263,7 +16723,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_config(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14288,7 +16748,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_slackChannels(ctx, field) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14312,7 +16772,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14321,10 +16781,10 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr var rotationImplementors = []string{"Rotation"} func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, obj *rotation.Rotation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, rotationImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, rotationImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14332,17 +16792,17 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, case "id": out.Values[i] = ec._Rotation_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "name": out.Values[i] = ec._Rotation_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "description": out.Values[i] = ec._Rotation_description(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "isFavorite": field := field @@ -14354,14 +16814,14 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, }() res = ec._Rotation_isFavorite(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) case "start": out.Values[i] = ec._Rotation_start(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "timeZone": field := field @@ -14373,19 +16833,19 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, }() res = ec._Rotation_timeZone(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) case "type": out.Values[i] = ec._Rotation_type(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "shiftLength": out.Values[i] = ec._Rotation_shiftLength(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "activeUserIndex": field := field @@ -14397,7 +16857,7 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, }() res = ec._Rotation_activeUserIndex(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14411,7 +16871,7 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, }() res = ec._Rotation_userIDs(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14425,7 +16885,7 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, }() res = ec._Rotation_users(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14439,7 +16899,7 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, }() res = ec._Rotation_nextHandoffTimes(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14448,7 +16908,7 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14457,10 +16917,10 @@ func (ec *executionContext) _Rotation(ctx context.Context, sel ast.SelectionSet, var rotationConnectionImplementors = []string{"RotationConnection"} func (ec *executionContext) _RotationConnection(ctx context.Context, sel ast.SelectionSet, obj *RotationConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, rotationConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, rotationConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14468,19 +16928,19 @@ func (ec *executionContext) _RotationConnection(ctx context.Context, sel ast.Sel case "nodes": out.Values[i] = ec._RotationConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._RotationConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14489,10 +16949,10 @@ func (ec *executionContext) _RotationConnection(ctx context.Context, sel ast.Sel var scheduleImplementors = []string{"Schedule"} func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, obj *schedule.Schedule) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, scheduleImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, scheduleImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14500,17 +16960,17 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, case "id": out.Values[i] = ec._Schedule_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "name": out.Values[i] = ec._Schedule_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "description": out.Values[i] = ec._Schedule_description(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "timeZone": field := field @@ -14522,7 +16982,7 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, }() res = ec._Schedule_timeZone(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14536,7 +16996,7 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, }() res = ec._Schedule_assignedTo(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14550,7 +17010,7 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, }() res = ec._Schedule_shifts(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14564,7 +17024,7 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, }() res = ec._Schedule_targets(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14589,7 +17049,7 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, }() res = ec._Schedule_isFavorite(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14598,7 +17058,7 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14607,10 +17067,10 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, var scheduleConnectionImplementors = []string{"ScheduleConnection"} func (ec *executionContext) _ScheduleConnection(ctx context.Context, sel ast.SelectionSet, obj *ScheduleConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, scheduleConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, scheduleConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14618,19 +17078,19 @@ func (ec *executionContext) _ScheduleConnection(ctx context.Context, sel ast.Sel case "nodes": out.Values[i] = ec._ScheduleConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._ScheduleConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14639,10 +17099,10 @@ func (ec *executionContext) _ScheduleConnection(ctx context.Context, sel ast.Sel var scheduleRuleImplementors = []string{"ScheduleRule"} func (ec *executionContext) _ScheduleRule(ctx context.Context, sel ast.SelectionSet, obj *rule.Rule) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, scheduleRuleImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, scheduleRuleImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14650,22 +17110,22 @@ func (ec *executionContext) _ScheduleRule(ctx context.Context, sel ast.Selection case "id": out.Values[i] = ec._ScheduleRule_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "scheduleID": out.Values[i] = ec._ScheduleRule_scheduleID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "start": out.Values[i] = ec._ScheduleRule_start(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "end": out.Values[i] = ec._ScheduleRule_end(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "weekdayFilter": field := field @@ -14677,7 +17137,7 @@ func (ec *executionContext) _ScheduleRule(ctx context.Context, sel ast.Selection }() res = ec._ScheduleRule_weekdayFilter(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14691,7 +17151,7 @@ func (ec *executionContext) _ScheduleRule(ctx context.Context, sel ast.Selection }() res = ec._ScheduleRule_target(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14700,7 +17160,7 @@ func (ec *executionContext) _ScheduleRule(ctx context.Context, sel ast.Selection } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14709,10 +17169,10 @@ func (ec *executionContext) _ScheduleRule(ctx context.Context, sel ast.Selection var scheduleTargetImplementors = []string{"ScheduleTarget"} func (ec *executionContext) _ScheduleTarget(ctx context.Context, sel ast.SelectionSet, obj *ScheduleTarget) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, scheduleTargetImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, scheduleTargetImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14720,24 +17180,24 @@ func (ec *executionContext) _ScheduleTarget(ctx context.Context, sel ast.Selecti case "scheduleID": out.Values[i] = ec._ScheduleTarget_scheduleID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "target": out.Values[i] = ec._ScheduleTarget_target(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "rules": out.Values[i] = ec._ScheduleTarget_rules(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14746,10 +17206,10 @@ func (ec *executionContext) _ScheduleTarget(ctx context.Context, sel ast.Selecti var serviceImplementors = []string{"Service"} func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, obj *service.Service) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, serviceImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, serviceImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14757,22 +17217,22 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, case "id": out.Values[i] = ec._Service_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "name": out.Values[i] = ec._Service_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "description": out.Values[i] = ec._Service_description(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "escalationPolicyID": out.Values[i] = ec._Service_escalationPolicyID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "escalationPolicy": field := field @@ -14795,7 +17255,7 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, }() res = ec._Service_isFavorite(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14809,7 +17269,7 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, }() res = ec._Service_onCallUsers(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14823,7 +17283,7 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, }() res = ec._Service_integrationKeys(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14837,7 +17297,7 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, }() res = ec._Service_labels(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14851,7 +17311,7 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, }() res = ec._Service_heartbeatMonitors(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -14860,7 +17320,7 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14869,10 +17329,10 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, var serviceConnectionImplementors = []string{"ServiceConnection"} func (ec *executionContext) _ServiceConnection(ctx context.Context, sel ast.SelectionSet, obj *ServiceConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, serviceConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, serviceConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14880,19 +17340,19 @@ func (ec *executionContext) _ServiceConnection(ctx context.Context, sel ast.Sele case "nodes": out.Values[i] = ec._ServiceConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._ServiceConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14901,10 +17361,10 @@ func (ec *executionContext) _ServiceConnection(ctx context.Context, sel ast.Sele var serviceOnCallUserImplementors = []string{"ServiceOnCallUser"} func (ec *executionContext) _ServiceOnCallUser(ctx context.Context, sel ast.SelectionSet, obj *oncall.ServiceOnCallUser) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, serviceOnCallUserImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, serviceOnCallUserImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14912,24 +17372,24 @@ func (ec *executionContext) _ServiceOnCallUser(ctx context.Context, sel ast.Sele case "userID": out.Values[i] = ec._ServiceOnCallUser_userID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "userName": out.Values[i] = ec._ServiceOnCallUser_userName(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "stepNumber": out.Values[i] = ec._ServiceOnCallUser_stepNumber(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14938,10 +17398,10 @@ func (ec *executionContext) _ServiceOnCallUser(ctx context.Context, sel ast.Sele var slackChannelImplementors = []string{"SlackChannel"} func (ec *executionContext) _SlackChannel(ctx context.Context, sel ast.SelectionSet, obj *slack.Channel) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, slackChannelImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, slackChannelImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14949,19 +17409,19 @@ func (ec *executionContext) _SlackChannel(ctx context.Context, sel ast.Selection case "id": out.Values[i] = ec._SlackChannel_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "name": out.Values[i] = ec._SlackChannel_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -14970,10 +17430,10 @@ func (ec *executionContext) _SlackChannel(ctx context.Context, sel ast.Selection var slackChannelConnectionImplementors = []string{"SlackChannelConnection"} func (ec *executionContext) _SlackChannelConnection(ctx context.Context, sel ast.SelectionSet, obj *SlackChannelConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, slackChannelConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, slackChannelConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -14981,19 +17441,19 @@ func (ec *executionContext) _SlackChannelConnection(ctx context.Context, sel ast case "nodes": out.Values[i] = ec._SlackChannelConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._SlackChannelConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15002,10 +17462,10 @@ func (ec *executionContext) _SlackChannelConnection(ctx context.Context, sel ast var stringConnectionImplementors = []string{"StringConnection"} func (ec *executionContext) _StringConnection(ctx context.Context, sel ast.SelectionSet, obj *StringConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, stringConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, stringConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15013,19 +17473,19 @@ func (ec *executionContext) _StringConnection(ctx context.Context, sel ast.Selec case "nodes": out.Values[i] = ec._StringConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._StringConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15034,10 +17494,10 @@ func (ec *executionContext) _StringConnection(ctx context.Context, sel ast.Selec var targetImplementors = []string{"Target"} func (ec *executionContext) _Target(ctx context.Context, sel ast.SelectionSet, obj *assignment.RawTarget) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, targetImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, targetImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15045,12 +17505,12 @@ func (ec *executionContext) _Target(ctx context.Context, sel ast.SelectionSet, o case "id": out.Values[i] = ec._Target_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "type": out.Values[i] = ec._Target_type(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "name": field := field @@ -15068,7 +17528,7 @@ func (ec *executionContext) _Target(ctx context.Context, sel ast.SelectionSet, o } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15077,10 +17537,10 @@ func (ec *executionContext) _Target(ctx context.Context, sel ast.SelectionSet, o var timeZoneImplementors = []string{"TimeZone"} func (ec *executionContext) _TimeZone(ctx context.Context, sel ast.SelectionSet, obj *TimeZone) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, timeZoneImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, timeZoneImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15088,14 +17548,14 @@ func (ec *executionContext) _TimeZone(ctx context.Context, sel ast.SelectionSet, case "id": out.Values[i] = ec._TimeZone_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15104,10 +17564,10 @@ func (ec *executionContext) _TimeZone(ctx context.Context, sel ast.SelectionSet, var timeZoneConnectionImplementors = []string{"TimeZoneConnection"} func (ec *executionContext) _TimeZoneConnection(ctx context.Context, sel ast.SelectionSet, obj *TimeZoneConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, timeZoneConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, timeZoneConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15115,19 +17575,19 @@ func (ec *executionContext) _TimeZoneConnection(ctx context.Context, sel ast.Sel case "nodes": out.Values[i] = ec._TimeZoneConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._TimeZoneConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15136,10 +17596,10 @@ func (ec *executionContext) _TimeZoneConnection(ctx context.Context, sel ast.Sel var userImplementors = []string{"User"} func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *user.User) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, userImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, userImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15147,7 +17607,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj case "id": out.Values[i] = ec._User_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "role": field := field @@ -15159,19 +17619,19 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._User_role(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) case "name": out.Values[i] = ec._User_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "email": out.Values[i] = ec._User_email(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "contactMethods": field := field @@ -15183,7 +17643,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._User_contactMethods(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -15197,14 +17657,14 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._User_notificationRules(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) case "statusUpdateContactMethodID": out.Values[i] = ec._User_statusUpdateContactMethodID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "authSubjects": field := field @@ -15216,7 +17676,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._User_authSubjects(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -15230,7 +17690,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._User_onCallSteps(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -15239,7 +17699,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15248,10 +17708,10 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj var userConnectionImplementors = []string{"UserConnection"} func (ec *executionContext) _UserConnection(ctx context.Context, sel ast.SelectionSet, obj *UserConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, userConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, userConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15259,19 +17719,19 @@ func (ec *executionContext) _UserConnection(ctx context.Context, sel ast.Selecti case "nodes": out.Values[i] = ec._UserConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._UserConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15280,10 +17740,10 @@ func (ec *executionContext) _UserConnection(ctx context.Context, sel ast.Selecti var userContactMethodImplementors = []string{"UserContactMethod"} func (ec *executionContext) _UserContactMethod(ctx context.Context, sel ast.SelectionSet, obj *contactmethod.ContactMethod) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, userContactMethodImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, userContactMethodImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15291,19 +17751,19 @@ func (ec *executionContext) _UserContactMethod(ctx context.Context, sel ast.Sele case "id": out.Values[i] = ec._UserContactMethod_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "type": out.Values[i] = ec._UserContactMethod_type(ctx, field, obj) case "name": out.Values[i] = ec._UserContactMethod_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "value": out.Values[i] = ec._UserContactMethod_value(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "formattedValue": field := field @@ -15315,21 +17775,21 @@ func (ec *executionContext) _UserContactMethod(ctx context.Context, sel ast.Sele }() res = ec._UserContactMethod_formattedValue(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) case "disabled": out.Values[i] = ec._UserContactMethod_disabled(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15338,10 +17798,10 @@ func (ec *executionContext) _UserContactMethod(ctx context.Context, sel ast.Sele var userNotificationRuleImplementors = []string{"UserNotificationRule"} func (ec *executionContext) _UserNotificationRule(ctx context.Context, sel ast.SelectionSet, obj *notificationrule.NotificationRule) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, userNotificationRuleImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, userNotificationRuleImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15349,17 +17809,17 @@ func (ec *executionContext) _UserNotificationRule(ctx context.Context, sel ast.S case "id": out.Values[i] = ec._UserNotificationRule_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "delayMinutes": out.Values[i] = ec._UserNotificationRule_delayMinutes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "contactMethodID": out.Values[i] = ec._UserNotificationRule_contactMethodID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "contactMethod": field := field @@ -15377,7 +17837,7 @@ func (ec *executionContext) _UserNotificationRule(ctx context.Context, sel ast.S } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15386,10 +17846,10 @@ func (ec *executionContext) _UserNotificationRule(ctx context.Context, sel ast.S var userOverrideImplementors = []string{"UserOverride"} func (ec *executionContext) _UserOverride(ctx context.Context, sel ast.SelectionSet, obj *override.UserOverride) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, userOverrideImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, userOverrideImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15397,27 +17857,27 @@ func (ec *executionContext) _UserOverride(ctx context.Context, sel ast.Selection case "id": out.Values[i] = ec._UserOverride_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "start": out.Values[i] = ec._UserOverride_start(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "end": out.Values[i] = ec._UserOverride_end(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "addUserID": out.Values[i] = ec._UserOverride_addUserID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "removeUserID": out.Values[i] = ec._UserOverride_removeUserID(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } case "addUser": field := field @@ -15451,7 +17911,7 @@ func (ec *executionContext) _UserOverride(ctx context.Context, sel ast.Selection }() res = ec._UserOverride_target(ctx, field, obj) if res == graphql.Null { - invalid = true + atomic.AddUint32(&invalids, 1) } return res }) @@ -15460,7 +17920,7 @@ func (ec *executionContext) _UserOverride(ctx context.Context, sel ast.Selection } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15469,10 +17929,10 @@ func (ec *executionContext) _UserOverride(ctx context.Context, sel ast.Selection var userOverrideConnectionImplementors = []string{"UserOverrideConnection"} func (ec *executionContext) _UserOverrideConnection(ctx context.Context, sel ast.SelectionSet, obj *UserOverrideConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, userOverrideConnectionImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, userOverrideConnectionImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15480,19 +17940,19 @@ func (ec *executionContext) _UserOverrideConnection(ctx context.Context, sel ast case "nodes": out.Values[i] = ec._UserOverrideConnection_nodes(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "pageInfo": out.Values[i] = ec._UserOverrideConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15501,10 +17961,10 @@ func (ec *executionContext) _UserOverrideConnection(ctx context.Context, sel ast var __DirectiveImplementors = []string{"__Directive"} func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, __DirectiveImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, __DirectiveImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15512,26 +17972,26 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS case "name": out.Values[i] = ec.___Directive_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "description": out.Values[i] = ec.___Directive_description(ctx, field, obj) case "locations": out.Values[i] = ec.___Directive_locations(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "args": out.Values[i] = ec.___Directive_args(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15540,10 +18000,10 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS var __EnumValueImplementors = []string{"__EnumValue"} func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, __EnumValueImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, __EnumValueImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15551,14 +18011,14 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS case "name": out.Values[i] = ec.___EnumValue_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "description": out.Values[i] = ec.___EnumValue_description(ctx, field, obj) case "isDeprecated": out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "deprecationReason": out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) @@ -15567,7 +18027,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15576,10 +18036,10 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS var __FieldImplementors = []string{"__Field"} func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, __FieldImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, __FieldImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15587,24 +18047,24 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, case "name": out.Values[i] = ec.___Field_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "description": out.Values[i] = ec.___Field_description(ctx, field, obj) case "args": out.Values[i] = ec.___Field_args(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "type": out.Values[i] = ec.___Field_type(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "isDeprecated": out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "deprecationReason": out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) @@ -15613,7 +18073,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15622,10 +18082,10 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, var __InputValueImplementors = []string{"__InputValue"} func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, __InputValueImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, __InputValueImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15633,14 +18093,14 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection case "name": out.Values[i] = ec.___InputValue_name(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "description": out.Values[i] = ec.___InputValue_description(ctx, field, obj) case "type": out.Values[i] = ec.___InputValue_type(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "defaultValue": out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) @@ -15649,7 +18109,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15658,10 +18118,10 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection var __SchemaImplementors = []string{"__Schema"} func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, __SchemaImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, __SchemaImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15669,12 +18129,12 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, case "types": out.Values[i] = ec.___Schema_types(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "queryType": out.Values[i] = ec.___Schema_queryType(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "mutationType": out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) @@ -15683,14 +18143,14 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, case "directives": out.Values[i] = ec.___Schema_directives(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15699,10 +18159,10 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, var __TypeImplementors = []string{"__Type"} func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, __TypeImplementors) + fields := graphql.CollectFields(ec.RequestContext, sel, __TypeImplementors) out := graphql.NewFieldSet(fields) - invalid := false + var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": @@ -15710,7 +18170,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o case "kind": out.Values[i] = ec.___Type_kind(ctx, field, obj) if out.Values[i] == graphql.Null { - invalid = true + invalids++ } case "name": out.Values[i] = ec.___Type_name(ctx, field, obj) @@ -15733,7 +18193,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o } } out.Dispatch() - if invalid { + if invalids > 0 { return graphql.Null } return out @@ -15926,7 +18386,13 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf } func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { - return graphql.MarshalBoolean(v) + res := graphql.MarshalBoolean(v) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalNBoolean2ᚕbool(ctx context.Context, v interface{}) ([]bool, error) { @@ -15963,7 +18429,13 @@ func (ec *executionContext) unmarshalNClockTime2githubᚗcomᚋtargetᚋgoalert } func (ec *executionContext) marshalNClockTime2githubᚗcomᚋtargetᚋgoalertᚋscheduleᚋruleᚐClock(ctx context.Context, sel ast.SelectionSet, v rule.Clock) graphql.Marshaler { - return MarshalClockTime(v) + res := MarshalClockTime(v) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalNConfigType2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConfigType(ctx context.Context, v interface{}) (ConfigType, error) { @@ -16025,7 +18497,13 @@ func (ec *executionContext) unmarshalNContactMethodType2githubᚗcomᚋtargetᚋ } func (ec *executionContext) marshalNContactMethodType2githubᚗcomᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐType(ctx context.Context, sel ast.SelectionSet, v contactmethod.Type) graphql.Marshaler { - return MarshalContactMethodType(v) + res := MarshalContactMethodType(v) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalNCreateAlertInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐCreateAlertInput(ctx context.Context, v interface{}) (CreateAlertInput, error) { @@ -16215,7 +18693,13 @@ func (ec *executionContext) unmarshalNHeartbeatMonitorState2githubᚗcomᚋtarge } func (ec *executionContext) marshalNHeartbeatMonitorState2githubᚗcomᚋtargetᚋgoalertᚋheartbeatᚐState(ctx context.Context, sel ast.SelectionSet, v heartbeat.State) graphql.Marshaler { - return graphql.MarshalString(string(v)) + res := graphql.MarshalString(string(v)) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) (int, error) { @@ -16223,7 +18707,13 @@ func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) } func (ec *executionContext) marshalNID2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { - return graphql.MarshalIntID(v) + res := graphql.MarshalIntID(v) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { @@ -16231,7 +18721,13 @@ func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface } func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - return graphql.MarshalID(v) + res := graphql.MarshalID(v) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalNID2ᚕstring(ctx context.Context, v interface{}) ([]string, error) { @@ -16268,13 +18764,13 @@ func (ec *executionContext) unmarshalNISOTimestamp2timeᚐTime(ctx context.Conte } func (ec *executionContext) marshalNISOTimestamp2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { - if v.IsZero() { + res := MarshalISOTimestamp(v) + if res == graphql.Null { if !ec.HasError(graphql.GetResolverContext(ctx)) { ec.Errorf(ctx, "must not be null") } - return graphql.Null } - return MarshalISOTimestamp(v) + return res } func (ec *executionContext) unmarshalNISOTimestamp2ᚕtimeᚐTime(ctx context.Context, v interface{}) ([]time.Time, error) { @@ -16306,30 +18802,18 @@ func (ec *executionContext) marshalNISOTimestamp2ᚕtimeᚐTime(ctx context.Cont return ret } -func (ec *executionContext) unmarshalNISOTimestamp2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalNISOTimestamp2timeᚐTime(ctx, v) - return &res, err +func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { + return graphql.UnmarshalInt(v) } -func (ec *executionContext) marshalNISOTimestamp2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler { - if v == nil { +func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { + res := graphql.MarshalInt(v) + if res == graphql.Null { if !ec.HasError(graphql.GetResolverContext(ctx)) { ec.Errorf(ctx, "must not be null") } - return graphql.Null } - return ec.marshalNISOTimestamp2timeᚐTime(ctx, sel, *v) -} - -func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { - return graphql.UnmarshalInt(v) -} - -func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { - return graphql.MarshalInt(v) + return res } func (ec *executionContext) unmarshalNInt2ᚕint(ctx context.Context, v interface{}) ([]int, error) { @@ -16511,6 +18995,16 @@ func (ec *executionContext) marshalNPageInfo2githubᚗcomᚋtargetᚋgoalertᚋg return ec._PageInfo(ctx, sel, &v) } +func (ec *executionContext) marshalNPageInfo2ᚖgithub.comᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *PageInfo) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._PageInfo(ctx, sel, v) +} + func (ec *executionContext) marshalNRotation2githubᚗcomᚋtargetᚋgoalertᚋscheduleᚋrotationᚐRotation(ctx context.Context, sel ast.SelectionSet, v rotation.Rotation) graphql.Marshaler { return ec._Rotation(ctx, sel, &v) } @@ -16908,7 +19402,13 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter } func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - return graphql.MarshalString(v) + res := graphql.MarshalString(v) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalNString2ᚕstring(ctx context.Context, v interface{}) ([]string, error) { @@ -17009,6 +19509,14 @@ func (ec *executionContext) unmarshalNTargetInput2githubᚗcomᚋtargetᚋgoaler return ec.unmarshalInputTargetInput(ctx, v) } +func (ec *executionContext) unmarshalNTargetInput2ᚖgithub.comᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx context.Context, v interface{}) (*assignment.RawTarget, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalNTargetInput2githubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, v) + return &res, err +} + func (ec *executionContext) unmarshalNTargetType2githubᚗcomᚋtargetᚋgoalertᚋassignmentᚐTargetType(ctx context.Context, v interface{}) (assignment.TargetType, error) { var res assignment.TargetType return res, res.UnmarshalGQL(v) @@ -17364,7 +19872,13 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con } func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - return graphql.MarshalString(v) + res := graphql.MarshalString(v) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstring(ctx context.Context, v interface{}) ([]string, error) { @@ -17529,7 +20043,13 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i } func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - return graphql.MarshalString(v) + res := graphql.MarshalString(v) + if res == graphql.Null { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res } func (ec *executionContext) marshalOAlert2githubᚗcomᚋtargetᚋgoalertᚋalertᚐAlert(ctx context.Context, sel ast.SelectionSet, v alert.Alert) graphql.Marshaler { @@ -17997,9 +20517,6 @@ func (ec *executionContext) unmarshalOISOTimestamp2timeᚐTime(ctx context.Conte } func (ec *executionContext) marshalOISOTimestamp2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { - if v.IsZero() { - return graphql.Null - } return MarshalISOTimestamp(v) } diff --git a/graphql2/gqlgen.yml b/graphql2/gqlgen.yml index 9f9fe5968b..48c38b76ea 100644 --- a/graphql2/gqlgen.yml +++ b/graphql2/gqlgen.yml @@ -1,4 +1,5 @@ schema: ./schema.graphql +omit_slice_element_pointers: true exec: filename: generated.go model: @@ -29,7 +30,7 @@ models: Alert: model: github.com/target/goalert/alert.Alert AlertLogEntry: - model: github.com/target/goalert/alert/log.Entry + model: github.com/target/goalert/alert/log.Entry AlertState: model: github.com/target/goalert/alert.State Service: diff --git a/graphql2/graphqlapp/alert.go b/graphql2/graphqlapp/alert.go index 136b215664..5769916179 100644 --- a/graphql2/graphqlapp/alert.go +++ b/graphql2/graphqlapp/alert.go @@ -134,6 +134,7 @@ func (q *Query) Alerts(ctx context.Context, opts *graphql2.AlertSearchOptions) ( } conn = new(graphql2.AlertConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(alerts) == s.Limit { conn.PageInfo.HasNextPage = true alerts = alerts[:len(alerts)-1] @@ -222,6 +223,7 @@ func (a *Alert) RecentEvents(ctx context.Context, obj *alert.Alert, opts *graphq return nil, err } conn := new(graphql2.AlertLogEntryConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(logs) == s.Limit { logs = logs[:len(logs)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/escalationpolicy.go b/graphql2/graphqlapp/escalationpolicy.go index 57dfb080a8..6774ca39d6 100644 --- a/graphql2/graphqlapp/escalationpolicy.go +++ b/graphql2/graphqlapp/escalationpolicy.go @@ -374,6 +374,7 @@ func (q *Query) EscalationPolicies(ctx context.Context, opts *graphql2.Escalatio return nil, err } conn = new(graphql2.EscalationPolicyConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(pols) == searchOpts.Limit { pols = pols[:len(pols)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/label.go b/graphql2/graphqlapp/label.go index 55d6ca5983..50e68f58ac 100644 --- a/graphql2/graphqlapp/label.go +++ b/graphql2/graphqlapp/label.go @@ -40,6 +40,7 @@ func (q *Query) LabelKeys(ctx context.Context, input *graphql2.LabelKeySearchOpt return nil, err } conn = new(graphql2.StringConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(labelKeys) == opts.Limit { labelKeys = labelKeys[:len(labelKeys)-1] conn.PageInfo.HasNextPage = true @@ -88,6 +89,7 @@ func (q *Query) LabelValues(ctx context.Context, input *graphql2.LabelValueSearc return nil, err } conn = new(graphql2.StringConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(values) == opts.Limit { values = values[:len(values)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/playground.go b/graphql2/graphqlapp/playground.go index 0ee4ec3090..6be21adbe1 100644 --- a/graphql2/graphqlapp/playground.go +++ b/graphql2/graphqlapp/playground.go @@ -2,7 +2,7 @@ package graphqlapp import "html/template" -const playVersion = "1.7.11" +const playVersion = "1.7.20" const playHTML = ` diff --git a/graphql2/graphqlapp/query.go b/graphql2/graphqlapp/query.go index f16353383c..58aa9de6aa 100644 --- a/graphql2/graphqlapp/query.go +++ b/graphql2/graphqlapp/query.go @@ -2,6 +2,7 @@ package graphqlapp import ( context "context" + "github.com/target/goalert/graphql2" "github.com/target/goalert/search" "github.com/target/goalert/validation/validate" @@ -44,6 +45,7 @@ func (a *Query) AuthSubjectsForProvider(ctx context.Context, _first *int, _after } conn = new(graphql2.AuthSubjectConnection) + conn.PageInfo = &graphql2.PageInfo{} conn.Nodes, err = a.UserStore.FindSomeAuthSubjectsForProvider(ctx, first+1, c.LastID, c.ProviderID) if err != nil { return nil, err diff --git a/graphql2/graphqlapp/rotation.go b/graphql2/graphqlapp/rotation.go index 417d28afe3..217a3c7ba5 100644 --- a/graphql2/graphqlapp/rotation.go +++ b/graphql2/graphqlapp/rotation.go @@ -3,6 +3,8 @@ package graphqlapp import ( context "context" "database/sql" + "time" + "github.com/target/goalert/assignment" "github.com/target/goalert/graphql2" "github.com/target/goalert/permission" @@ -12,7 +14,6 @@ import ( "github.com/target/goalert/util" "github.com/target/goalert/validation" "github.com/target/goalert/validation/validate" - "time" "github.com/pkg/errors" ) @@ -212,6 +213,7 @@ func (q *Query) Rotations(ctx context.Context, opts *graphql2.RotationSearchOpti return nil, err } conn = new(graphql2.RotationConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(rots) == searchOpts.Limit { rots = rots[:len(rots)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/schedule.go b/graphql2/graphqlapp/schedule.go index 0968d22ec9..856e152d84 100644 --- a/graphql2/graphqlapp/schedule.go +++ b/graphql2/graphqlapp/schedule.go @@ -46,7 +46,7 @@ func (s *Schedule) Target(ctx context.Context, raw *schedule.Schedule, input ass return &graphql2.ScheduleTarget{ ScheduleID: raw.ID, - Target: input, + Target: &input, Rules: rules, }, nil } @@ -65,8 +65,9 @@ func (s *Schedule) Targets(ctx context.Context, raw *schedule.Schedule) ([]graph result := make([]graphql2.ScheduleTarget, 0, len(m)) for tgt, rules := range m { + t := tgt // need to make a copy so we can take a pointer result = append(result, graphql2.ScheduleTarget{ - Target: tgt, + Target: &t, ScheduleID: raw.ID, Rules: rules, }) @@ -244,6 +245,7 @@ func (q *Query) Schedules(ctx context.Context, opts *graphql2.ScheduleSearchOpti return nil, err } conn = new(graphql2.ScheduleConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(scheds) == searchOpts.Limit { scheds = scheds[:len(scheds)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/service.go b/graphql2/graphqlapp/service.go index 84686005f5..2652e56f71 100644 --- a/graphql2/graphqlapp/service.go +++ b/graphql2/graphqlapp/service.go @@ -64,6 +64,7 @@ func (q *Query) Services(ctx context.Context, opts *graphql2.ServiceSearchOption return nil, err } conn = new(graphql2.ServiceConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(svcs) == searchOpts.Limit { svcs = svcs[:len(svcs)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/slack.go b/graphql2/graphqlapp/slack.go index d15ef8a6a8..2a601850ca 100644 --- a/graphql2/graphqlapp/slack.go +++ b/graphql2/graphqlapp/slack.go @@ -76,6 +76,7 @@ func (q *Query) SlackChannels(ctx context.Context, input *graphql2.SlackChannelS channels = filtered conn = new(graphql2.SlackChannelConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(channels) > limit { channels = channels[:limit] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/timezone.go b/graphql2/graphqlapp/timezone.go index 15b087bb7d..65d0f86525 100644 --- a/graphql2/graphqlapp/timezone.go +++ b/graphql2/graphqlapp/timezone.go @@ -2,6 +2,7 @@ package graphqlapp import ( context "context" + "github.com/target/goalert/graphql2" "github.com/target/goalert/search" "github.com/target/goalert/timezone" @@ -38,6 +39,7 @@ func (q *Query) TimeZones(ctx context.Context, input *graphql2.TimeZoneSearchOpt } conn = new(graphql2.TimeZoneConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(names) == searchOpts.Limit { names = names[:len(names)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/user.go b/graphql2/graphqlapp/user.go index 05bf990312..62f43bdb7f 100644 --- a/graphql2/graphqlapp/user.go +++ b/graphql2/graphqlapp/user.go @@ -100,6 +100,7 @@ func (q *Query) Users(ctx context.Context, opts *graphql2.UserSearchOptions, fir } conn = new(graphql2.UserConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(users) == searchOpts.Limit { users = users[:len(users)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/graphqlapp/useroverride.go b/graphql2/graphqlapp/useroverride.go index 31709d3a10..9e8180639d 100644 --- a/graphql2/graphqlapp/useroverride.go +++ b/graphql2/graphqlapp/useroverride.go @@ -3,6 +3,7 @@ package graphqlapp import ( context "context" "database/sql" + "github.com/target/goalert/assignment" "github.com/target/goalert/graphql2" "github.com/target/goalert/override" @@ -124,6 +125,7 @@ func (q *Query) UserOverrides(ctx context.Context, input *graphql2.UserOverrideS } conn = new(graphql2.UserOverrideConnection) + conn.PageInfo = &graphql2.PageInfo{} if len(overrides) == searchOpts.Limit { overrides = overrides[:len(overrides)-1] conn.PageInfo.HasNextPage = true diff --git a/graphql2/models_gen.go b/graphql2/models_gen.go index ccd1f541b8..a33f9ce2a0 100644 --- a/graphql2/models_gen.go +++ b/graphql2/models_gen.go @@ -9,7 +9,7 @@ import ( "time" "github.com/target/goalert/alert" - "github.com/target/goalert/alert/log" + alertlog "github.com/target/goalert/alert/log" "github.com/target/goalert/assignment" "github.com/target/goalert/escalation" "github.com/target/goalert/label" @@ -25,12 +25,12 @@ import ( type AlertConnection struct { Nodes []alert.Alert `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type AlertLogEntryConnection struct { Nodes []alertlog.Entry `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type AlertRecentEventsOptions struct { @@ -50,7 +50,7 @@ type AlertSearchOptions struct { type AuthSubjectConnection struct { Nodes []user.AuthSubject `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type ConfigValue struct { @@ -153,7 +153,7 @@ type CreateUserOverrideInput struct { type EscalationPolicyConnection struct { Nodes []escalation.Policy `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type EscalationPolicySearchOptions struct { @@ -165,7 +165,7 @@ type EscalationPolicySearchOptions struct { type LabelConnection struct { Nodes []label.Label `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type LabelKeySearchOptions struct { @@ -198,7 +198,7 @@ type PageInfo struct { type RotationConnection struct { Nodes []rotation.Rotation `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type RotationSearchOptions struct { @@ -212,7 +212,7 @@ type RotationSearchOptions struct { type ScheduleConnection struct { Nodes []schedule.Schedule `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type ScheduleRuleInput struct { @@ -232,9 +232,9 @@ type ScheduleSearchOptions struct { } type ScheduleTarget struct { - ScheduleID string `json:"scheduleID"` - Target assignment.RawTarget `json:"target"` - Rules []rule.Rule `json:"rules"` + ScheduleID string `json:"scheduleID"` + Target *assignment.RawTarget `json:"target"` + Rules []rule.Rule `json:"rules"` } type ScheduleTargetInput struct { @@ -250,7 +250,7 @@ type SendContactMethodVerificationInput struct { type ServiceConnection struct { Nodes []service.Service `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type ServiceSearchOptions struct { @@ -263,8 +263,8 @@ type ServiceSearchOptions struct { } type SetFavoriteInput struct { - Target assignment.RawTarget `json:"target"` - Favorite bool `json:"favorite"` + Target *assignment.RawTarget `json:"target"` + Favorite bool `json:"favorite"` } type SetLabelInput struct { @@ -275,7 +275,7 @@ type SetLabelInput struct { type SlackChannelConnection struct { Nodes []slack.Channel `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type SlackChannelSearchOptions struct { @@ -286,8 +286,8 @@ type SlackChannelSearchOptions struct { } type StringConnection struct { - Nodes []string `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + Nodes []string `json:"nodes"` + PageInfo *PageInfo `json:"pageInfo"` } type TimeZone struct { @@ -296,7 +296,7 @@ type TimeZone struct { type TimeZoneConnection struct { Nodes []TimeZone `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type TimeZoneSearchOptions struct { @@ -381,12 +381,12 @@ type UpdateUserOverrideInput struct { type UserConnection struct { Nodes []user.User `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type UserOverrideConnection struct { Nodes []override.UserOverride `json:"nodes"` - PageInfo PageInfo `json:"pageInfo"` + PageInfo *PageInfo `json:"pageInfo"` } type UserOverrideSearchOptions struct { diff --git a/notification/store.go b/notification/store.go index d84b4abbf4..90b493f5f0 100644 --- a/notification/store.go +++ b/notification/store.go @@ -135,6 +135,9 @@ func (db *DB) cmUserID(ctx context.Context, id string) (string, error) { var userID string err = db.getCMUserID.QueryRowContext(ctx, id).Scan(&userID) + if err == sql.ErrNoRows { + return "", validation.NewFieldError("ContactMethodID", "does not exist") + } if err != nil { return "", err } diff --git a/smoketest/harness/graphql.go b/smoketest/harness/graphql.go index c981f3a571..9c1a7fa393 100644 --- a/smoketest/harness/graphql.go +++ b/smoketest/harness/graphql.go @@ -5,6 +5,7 @@ import ( "context" "encoding/json" "fmt" + "io/ioutil" "net/http" "strconv" "strings" @@ -81,6 +82,7 @@ func (h *Harness) GraphQLQueryT(t *testing.T, query string, u string) *QLRespons if err != nil { t.Fatal("failed to make request:", err) } + req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{ Name: auth.CookieName, Value: h.sessToken, @@ -91,7 +93,8 @@ func (h *Harness) GraphQLQueryT(t *testing.T, query string, u string) *QLRespons } defer resp.Body.Close() if resp.StatusCode != 200 { - t.Fatal("failed to make graphql request:", resp.Status) + data, _ := ioutil.ReadAll(resp.Body) + t.Fatal("failed to make graphql request:", resp.Status, string(data)) } var r QLResponse diff --git a/web/src/cypress/support/graphql.ts b/web/src/cypress/support/graphql.ts index a9231b7547..4fe605345a 100644 --- a/web/src/cypress/support/graphql.ts +++ b/web/src/cypress/support/graphql.ts @@ -22,34 +22,25 @@ function graphql( ): Cypress.Chainable { if (!variables) variables = {} - return cy - .request({ - url, - method: 'POST', - body: JSON.stringify({ - query, - variables, - }), - }) - .then(res => { - expect(res.status, 'status code').to.eq(200) + return cy.request('POST', url, { query, variables }).then(res => { + expect(res.status, 'status code').to.eq(200) - let data: GraphQLResponse - try { - if (typeof res.body === 'string') data = JSON.parse(res.body) - else data = res.body - } catch (e) { - console.error(res.body) - throw e - } - if (data.errors && data.errors[0]) { - // causes error message to be shown - expect(data.errors[0].message).to.be.empty - } - expect(data.errors, 'graphql errors').to.be.empty + let data: GraphQLResponse + try { + if (typeof res.body === 'string') data = JSON.parse(res.body) + else data = res.body + } catch (e) { + console.error(res.body) + throw e + } + if (data.errors && data.errors[0]) { + // causes error message to be shown + expect(data.errors[0].message).to.be.empty + } + expect(data.errors, 'graphql errors').to.be.empty - return data.data - }) + return data.data + }) } Cypress.Commands.add('graphql', graphql)