From 76f9f4283372da46e167c445bf436f71965b3226 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:37:21 -0400 Subject: [PATCH 01/20] ingest(config): add MetaPipePath and LedgerCloseDuration fields for streaming-loadtest backend Co-Authored-By: Claude Opus 4.7 (1M context) --- internal/ingest/ingest.go | 8 ++++++++ internal/ingest/ingest_test.go | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 internal/ingest/ingest_test.go diff --git a/internal/ingest/ingest.go b/internal/ingest/ingest.go index 93f3eda26..1be70a657 100644 --- a/internal/ingest/ingest.go +++ b/internal/ingest/ingest.go @@ -101,6 +101,14 @@ type Configs struct { DBMinConns int DBMaxConnLifetime time.Duration DBMaxConnIdleTime time.Duration + // Streaming-loadtest backend options. + // MetaPipePath is the filesystem path of the named pipe (FIFO) that carries + // stream-framed XDR LedgerCloseMeta from stellar-core apply-load. Only consulted + // when LedgerBackendType == LedgerBackendTypeStreamingLoadtest. + MetaPipePath string + // LedgerCloseDuration paces the streaming-loadtest backend: GetLedger sleeps + // until this duration has elapsed since the previous emit. 0 = uncapped. + LedgerCloseDuration time.Duration } func (c Configs) BuildPoolConfig() db.PoolConfig { diff --git a/internal/ingest/ingest_test.go b/internal/ingest/ingest_test.go new file mode 100644 index 000000000..398143f41 --- /dev/null +++ b/internal/ingest/ingest_test.go @@ -0,0 +1,17 @@ +package ingest + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestConfigsStreamingLoadtestFields(t *testing.T) { + cfg := Configs{ + MetaPipePath: "/tmp/fake.pipe", + LedgerCloseDuration: 2 * time.Second, + } + assert.Equal(t, "/tmp/fake.pipe", cfg.MetaPipePath) + assert.Equal(t, 2*time.Second, cfg.LedgerCloseDuration) +} From afd20a21ac06e8932bdc682810fc0b3151f93a78 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:41:08 -0400 Subject: [PATCH 02/20] ingest: add LedgerBackendTypeStreamingLoadtest constant Co-Authored-By: Claude Opus 4.7 (1M context) --- internal/ingest/ingest.go | 3 +++ internal/ingest/ingest_test.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/internal/ingest/ingest.go b/internal/ingest/ingest.go index 1be70a657..863c0c1ac 100644 --- a/internal/ingest/ingest.go +++ b/internal/ingest/ingest.go @@ -39,6 +39,9 @@ const ( LedgerBackendTypeRPC LedgerBackendType = "rpc" // LedgerBackendTypeDatastore uses cloud storage (S3/GCS) to fetch ledgers LedgerBackendTypeDatastore LedgerBackendType = "datastore" + // LedgerBackendTypeStreamingLoadtest reads stream-framed XDR LedgerCloseMeta + // from a named pipe fed by stellar-core apply-load. Dev-only. + LedgerBackendTypeStreamingLoadtest LedgerBackendType = "streaming-loadtest" ) // StorageBackendConfig holds configuration for the datastore-based ledger backend diff --git a/internal/ingest/ingest_test.go b/internal/ingest/ingest_test.go index 398143f41..7c2eab208 100644 --- a/internal/ingest/ingest_test.go +++ b/internal/ingest/ingest_test.go @@ -15,3 +15,7 @@ func TestConfigsStreamingLoadtestFields(t *testing.T) { assert.Equal(t, "/tmp/fake.pipe", cfg.MetaPipePath) assert.Equal(t, 2*time.Second, cfg.LedgerCloseDuration) } + +func TestLedgerBackendTypeStreamingLoadtestConstant(t *testing.T) { + assert.Equal(t, LedgerBackendType("streaming-loadtest"), LedgerBackendTypeStreamingLoadtest) +} From 7b1bd3c597e84e55da161a8f3b3a6cd5d3ae7e44 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:43:29 -0400 Subject: [PATCH 03/20] ingest: add StreamingLoadtestLedgerBackend skeleton with PrepareRange Co-Authored-By: Claude Opus 4.7 (1M context) --- .../streaming_loadtest_ledger_backend.go | 123 ++++++++++++++++++ .../streaming_loadtest_ledger_backend_test.go | 51 ++++++++ 2 files changed, 174 insertions(+) create mode 100644 internal/ingest/streaming_loadtest_ledger_backend.go create mode 100644 internal/ingest/streaming_loadtest_ledger_backend_test.go diff --git a/internal/ingest/streaming_loadtest_ledger_backend.go b/internal/ingest/streaming_loadtest_ledger_backend.go new file mode 100644 index 000000000..250de1221 --- /dev/null +++ b/internal/ingest/streaming_loadtest_ledger_backend.go @@ -0,0 +1,123 @@ +package ingest + +import ( + "context" + "fmt" + "io" + "os" + "sync" + "time" + + "github.com/stellar/go-stellar-sdk/ingest/ledgerbackend" + "github.com/stellar/go-stellar-sdk/xdr" +) + +// StreamingLoadtestBackendConfig configures the StreamingLoadtestLedgerBackend. +type StreamingLoadtestBackendConfig struct { + // MetaPipePath is the filesystem path of a FIFO carrying stream-framed + // XDR LedgerCloseMeta records, written by stellar-core apply-load via its + // METADATA_OUTPUT_STREAM setting. + MetaPipePath string + // LedgerCloseDuration paces GetLedger emits. 0 = uncapped. + LedgerCloseDuration time.Duration + // NetworkPassphrase is recorded but not validated by this backend; apply-load + // writes meta that is passphrase-independent at the framing layer. + NetworkPassphrase string +} + +// StreamingLoadtestLedgerBackend reads stream-framed XDR LedgerCloseMeta from a +// named pipe, typically produced by `stellar-core apply-load`. It implements +// ledgerbackend.LedgerBackend. It is dev-only and intended for load testing. +type StreamingLoadtestLedgerBackend struct { + config StreamingLoadtestBackendConfig + + pipeFile *os.File + xdrStream *xdr.Stream + + mu sync.RWMutex + prepared bool + preparedFrom uint32 + latestSeqSeen uint32 + lastEmitTime time.Time + done bool +} + +// Verify interface implementation at compile time. +var _ ledgerbackend.LedgerBackend = (*StreamingLoadtestLedgerBackend)(nil) + +func NewStreamingLoadtestLedgerBackend(cfg StreamingLoadtestBackendConfig) (*StreamingLoadtestLedgerBackend, error) { + if cfg.MetaPipePath == "" { + return nil, fmt.Errorf("MetaPipePath is required") + } + return &StreamingLoadtestLedgerBackend{config: cfg}, nil +} + +func (b *StreamingLoadtestLedgerBackend) PrepareRange(ctx context.Context, ledgerRange ledgerbackend.Range) error { + b.mu.Lock() + defer b.mu.Unlock() + + if b.prepared { + return nil + } + if ledgerRange.Bounded() { + return fmt.Errorf("streaming-loadtest backend only supports unbounded ranges") + } + + // Open the read-side. This blocks until a writer opens the FIFO on the other end. + // Honour context cancellation by running the open in a goroutine. + openResult := make(chan struct { + f *os.File + err error + }, 1) + go func() { + f, err := os.OpenFile(b.config.MetaPipePath, os.O_RDONLY, 0) + openResult <- struct { + f *os.File + err error + }{f, err} + }() + + select { + case <-ctx.Done(): + return fmt.Errorf("context cancelled waiting for pipe writer: %w", ctx.Err()) + case res := <-openResult: + if res.err != nil { + return fmt.Errorf("opening meta pipe %s: %w", b.config.MetaPipePath, res.err) + } + b.pipeFile = res.f + } + + b.xdrStream = xdr.NewStream(b.pipeFile) + b.preparedFrom = ledgerRange.From() + b.prepared = true + return nil +} + +// GetLedger, GetLatestLedgerSequence, IsPrepared implemented in later tasks. +func (b *StreamingLoadtestLedgerBackend) GetLedger(ctx context.Context, sequence uint32) (xdr.LedgerCloseMeta, error) { + return xdr.LedgerCloseMeta{}, fmt.Errorf("not implemented") +} + +func (b *StreamingLoadtestLedgerBackend) GetLatestLedgerSequence(ctx context.Context) (uint32, error) { + return 0, fmt.Errorf("not implemented") +} + +func (b *StreamingLoadtestLedgerBackend) IsPrepared(ctx context.Context, ledgerRange ledgerbackend.Range) (bool, error) { + return false, fmt.Errorf("not implemented") +} + +func (b *StreamingLoadtestLedgerBackend) Close() error { + b.mu.Lock() + defer b.mu.Unlock() + if b.done { + return nil + } + b.done = true + if b.pipeFile != nil { + return b.pipeFile.Close() + } + return nil +} + +// Silence unused import complaints until GetLedger uses io.EOF. +var _ = io.EOF diff --git a/internal/ingest/streaming_loadtest_ledger_backend_test.go b/internal/ingest/streaming_loadtest_ledger_backend_test.go new file mode 100644 index 000000000..f46370304 --- /dev/null +++ b/internal/ingest/streaming_loadtest_ledger_backend_test.go @@ -0,0 +1,51 @@ +package ingest + +import ( + "context" + "os" + "path/filepath" + "syscall" + "testing" + "time" + + "github.com/stellar/go-stellar-sdk/ingest/ledgerbackend" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// mkFIFO creates a named pipe in a temp dir. Returns the path; t.Cleanup removes it. +func mkFIFO(t *testing.T) string { + t.Helper() + dir := t.TempDir() + path := filepath.Join(dir, "meta.pipe") + require.NoError(t, syscall.Mkfifo(path, 0o600)) + return path +} + +func TestStreamingLoadtestBackend_PrepareRangeOpensPipe(t *testing.T) { + pipePath := mkFIFO(t) + + backend, err := NewStreamingLoadtestLedgerBackend(StreamingLoadtestBackendConfig{ + MetaPipePath: pipePath, + LedgerCloseDuration: 0, + NetworkPassphrase: "Apply Load", + }) + require.NoError(t, err) + defer backend.Close() + + // A write-side opener must exist for the read-side open to proceed. + writerOpened := make(chan struct{}) + go func() { + f, err := os.OpenFile(pipePath, os.O_WRONLY, 0) + if err == nil { + close(writerOpened) + t.Cleanup(func() { _ = f.Close() }) + } + }() + + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + err = backend.PrepareRange(ctx, ledgerbackend.UnboundedRange(2)) + require.NoError(t, err) + assert.True(t, backend.prepared, "PrepareRange should have set prepared=true") +} From a6b895fb69bc2312352a3f53c960a00054a1225e Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:46:11 -0400 Subject: [PATCH 04/20] ingest: implement StreamingLoadtestLedgerBackend.GetLedger Co-Authored-By: Claude Opus 4.7 (1M context) --- .../streaming_loadtest_ledger_backend.go | 46 ++++++++++++-- .../streaming_loadtest_ledger_backend_test.go | 63 +++++++++++++++++++ 2 files changed, 105 insertions(+), 4 deletions(-) diff --git a/internal/ingest/streaming_loadtest_ledger_backend.go b/internal/ingest/streaming_loadtest_ledger_backend.go index 250de1221..be4cbef99 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend.go +++ b/internal/ingest/streaming_loadtest_ledger_backend.go @@ -93,9 +93,49 @@ func (b *StreamingLoadtestLedgerBackend) PrepareRange(ctx context.Context, ledge return nil } -// GetLedger, GetLatestLedgerSequence, IsPrepared implemented in later tasks. func (b *StreamingLoadtestLedgerBackend) GetLedger(ctx context.Context, sequence uint32) (xdr.LedgerCloseMeta, error) { - return xdr.LedgerCloseMeta{}, fmt.Errorf("not implemented") + b.mu.Lock() + defer b.mu.Unlock() + + if !b.prepared { + return xdr.LedgerCloseMeta{}, fmt.Errorf("GetLedger called before PrepareRange") + } + if b.done { + return xdr.LedgerCloseMeta{}, fmt.Errorf("backend closed") + } + + // Pace: sleep until closeDuration has elapsed since last emit. + if b.config.LedgerCloseDuration > 0 && !b.lastEmitTime.IsZero() { + nextEmit := b.lastEmitTime.Add(b.config.LedgerCloseDuration) + wait := time.Until(nextEmit) + if wait > 0 { + timer := time.NewTimer(wait) + select { + case <-timer.C: + case <-ctx.Done(): + timer.Stop() + return xdr.LedgerCloseMeta{}, ctx.Err() + } + } + } + + var lcm xdr.LedgerCloseMeta + if err := b.xdrStream.ReadOne(&lcm); err != nil { + if err == io.EOF { + return xdr.LedgerCloseMeta{}, fmt.Errorf("meta stream ended: %w", io.EOF) + } + return xdr.LedgerCloseMeta{}, fmt.Errorf("reading meta frame: %w", err) + } + + gotSeq := uint32(lcm.LedgerSequence()) + if gotSeq != sequence { + return xdr.LedgerCloseMeta{}, fmt.Errorf("stream sequence mismatch: expected %d, got %d", sequence, gotSeq) + } + if gotSeq > b.latestSeqSeen { + b.latestSeqSeen = gotSeq + } + b.lastEmitTime = time.Now() + return lcm, nil } func (b *StreamingLoadtestLedgerBackend) GetLatestLedgerSequence(ctx context.Context) (uint32, error) { @@ -119,5 +159,3 @@ func (b *StreamingLoadtestLedgerBackend) Close() error { return nil } -// Silence unused import complaints until GetLedger uses io.EOF. -var _ = io.EOF diff --git a/internal/ingest/streaming_loadtest_ledger_backend_test.go b/internal/ingest/streaming_loadtest_ledger_backend_test.go index f46370304..647465a7c 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend_test.go +++ b/internal/ingest/streaming_loadtest_ledger_backend_test.go @@ -1,7 +1,9 @@ package ingest import ( + "bytes" "context" + "encoding/binary" "os" "path/filepath" "syscall" @@ -9,6 +11,7 @@ import ( "time" "github.com/stellar/go-stellar-sdk/ingest/ledgerbackend" + "github.com/stellar/go-stellar-sdk/xdr" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -49,3 +52,63 @@ func TestStreamingLoadtestBackend_PrepareRangeOpensPipe(t *testing.T) { require.NoError(t, err) assert.True(t, backend.prepared, "PrepareRange should have set prepared=true") } + +// writeLedgerCloseMeta writes a single LedgerCloseMeta as a stream-framed XDR +// record to the given writer. Mimics what stellar-core apply-load produces. +func writeLedgerCloseMeta(t *testing.T, w *os.File, seq uint32) { + t.Helper() + lcm := xdr.LedgerCloseMeta{ + V: 0, + V0: &xdr.LedgerCloseMetaV0{ + LedgerHeader: xdr.LedgerHeaderHistoryEntry{ + Header: xdr.LedgerHeader{ + LedgerSeq: xdr.Uint32(seq), + }, + }, + }, + } + var payload bytes.Buffer + _, err := xdr.Marshal(&payload, &lcm) + require.NoError(t, err) + + length := uint32(payload.Len()) | 0x80000000 + var header [4]byte + binary.BigEndian.PutUint32(header[:], length) + _, err = w.Write(header[:]) + require.NoError(t, err) + _, err = w.Write(payload.Bytes()) + require.NoError(t, err) +} + +func TestStreamingLoadtestBackend_GetLedgerReadsFrame(t *testing.T) { + pipePath := mkFIFO(t) + + backend, err := NewStreamingLoadtestLedgerBackend(StreamingLoadtestBackendConfig{ + MetaPipePath: pipePath, + LedgerCloseDuration: 0, + NetworkPassphrase: "Apply Load", + }) + require.NoError(t, err) + defer backend.Close() + + writerDone := make(chan error, 1) + go func() { + f, err := os.OpenFile(pipePath, os.O_WRONLY, 0) + if err != nil { + writerDone <- err + return + } + defer f.Close() + writeLedgerCloseMeta(t, f, 42) + writerDone <- nil + }() + + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + require.NoError(t, backend.PrepareRange(ctx, ledgerbackend.UnboundedRange(42))) + + got, err := backend.GetLedger(ctx, 42) + require.NoError(t, err) + assert.Equal(t, uint32(42), got.LedgerSequence()) + require.NoError(t, <-writerDone) +} From df67ff5d0c13b57abdb97e4719c84f719019a3c4 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:47:41 -0400 Subject: [PATCH 05/20] ingest: test StreamingLoadtestLedgerBackend pacing behaviour Co-Authored-By: Claude Opus 4.7 (1M context) --- .../streaming_loadtest_ledger_backend_test.go | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/internal/ingest/streaming_loadtest_ledger_backend_test.go b/internal/ingest/streaming_loadtest_ledger_backend_test.go index 647465a7c..75b992890 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend_test.go +++ b/internal/ingest/streaming_loadtest_ledger_backend_test.go @@ -112,3 +112,56 @@ func TestStreamingLoadtestBackend_GetLedgerReadsFrame(t *testing.T) { assert.Equal(t, uint32(42), got.LedgerSequence()) require.NoError(t, <-writerDone) } + +func TestStreamingLoadtestBackend_GetLedgerPaces(t *testing.T) { + pipePath := mkFIFO(t) + + pace := 200 * time.Millisecond + backend, err := NewStreamingLoadtestLedgerBackend(StreamingLoadtestBackendConfig{ + MetaPipePath: pipePath, + LedgerCloseDuration: pace, + NetworkPassphrase: "Apply Load", + }) + require.NoError(t, err) + defer backend.Close() + + writerDone := make(chan error, 1) + go func() { + f, err := os.OpenFile(pipePath, os.O_WRONLY, 0) + if err != nil { + writerDone <- err + return + } + defer f.Close() + writeLedgerCloseMeta(t, f, 1) + writeLedgerCloseMeta(t, f, 2) + writeLedgerCloseMeta(t, f, 3) + writerDone <- nil + }() + + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + require.NoError(t, backend.PrepareRange(ctx, ledgerbackend.UnboundedRange(1))) + + start := time.Now() + _, err = backend.GetLedger(ctx, 1) + require.NoError(t, err) + elapsedFirst := time.Since(start) + assert.Less(t, elapsedFirst, 100*time.Millisecond, "first GetLedger should not sleep") + + start2 := time.Now() + _, err = backend.GetLedger(ctx, 2) + require.NoError(t, err) + elapsedSecond := time.Since(start2) + assert.GreaterOrEqual(t, elapsedSecond, pace-20*time.Millisecond, + "second GetLedger should pace by at least %v", pace) + + start3 := time.Now() + _, err = backend.GetLedger(ctx, 3) + require.NoError(t, err) + elapsedThird := time.Since(start3) + assert.GreaterOrEqual(t, elapsedThird, pace-20*time.Millisecond, + "third GetLedger should pace by at least %v", pace) + + require.NoError(t, <-writerDone) +} From 2094e1f3708b2583da4893ea3778746292100124 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:48:27 -0400 Subject: [PATCH 06/20] ingest: implement StreamingLoadtestLedgerBackend.GetLatestLedgerSequence Co-Authored-By: Claude Opus 4.7 (1M context) --- .../streaming_loadtest_ledger_backend.go | 7 +++- .../streaming_loadtest_ledger_backend_test.go | 40 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/internal/ingest/streaming_loadtest_ledger_backend.go b/internal/ingest/streaming_loadtest_ledger_backend.go index be4cbef99..d09615464 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend.go +++ b/internal/ingest/streaming_loadtest_ledger_backend.go @@ -139,7 +139,12 @@ func (b *StreamingLoadtestLedgerBackend) GetLedger(ctx context.Context, sequence } func (b *StreamingLoadtestLedgerBackend) GetLatestLedgerSequence(ctx context.Context) (uint32, error) { - return 0, fmt.Errorf("not implemented") + b.mu.RLock() + defer b.mu.RUnlock() + if !b.prepared { + return 0, fmt.Errorf("GetLatestLedgerSequence called before PrepareRange") + } + return b.latestSeqSeen, nil } func (b *StreamingLoadtestLedgerBackend) IsPrepared(ctx context.Context, ledgerRange ledgerbackend.Range) (bool, error) { diff --git a/internal/ingest/streaming_loadtest_ledger_backend_test.go b/internal/ingest/streaming_loadtest_ledger_backend_test.go index 75b992890..ea1e17417 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend_test.go +++ b/internal/ingest/streaming_loadtest_ledger_backend_test.go @@ -165,3 +165,43 @@ func TestStreamingLoadtestBackend_GetLedgerPaces(t *testing.T) { require.NoError(t, <-writerDone) } + +func TestStreamingLoadtestBackend_GetLatestLedgerSequence(t *testing.T) { + pipePath := mkFIFO(t) + + backend, err := NewStreamingLoadtestLedgerBackend(StreamingLoadtestBackendConfig{ + MetaPipePath: pipePath, + }) + require.NoError(t, err) + defer backend.Close() + + writerDone := make(chan error, 1) + go func() { + f, err := os.OpenFile(pipePath, os.O_WRONLY, 0) + if err != nil { + writerDone <- err + return + } + defer f.Close() + writeLedgerCloseMeta(t, f, 100) + writeLedgerCloseMeta(t, f, 101) + writerDone <- nil + }() + + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + require.NoError(t, backend.PrepareRange(ctx, ledgerbackend.UnboundedRange(100))) + + _, err = backend.GetLedger(ctx, 100) + require.NoError(t, err) + seq, err := backend.GetLatestLedgerSequence(ctx) + require.NoError(t, err) + assert.Equal(t, uint32(100), seq) + + _, err = backend.GetLedger(ctx, 101) + require.NoError(t, err) + seq, err = backend.GetLatestLedgerSequence(ctx) + require.NoError(t, err) + assert.Equal(t, uint32(101), seq) + require.NoError(t, <-writerDone) +} From e7fa4ec693a750a635d8adcb8dfa22381aa2ac83 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:48:52 -0400 Subject: [PATCH 07/20] ingest: test StreamingLoadtestLedgerBackend EOF surface Co-Authored-By: Claude Opus 4.7 (1M context) --- .../streaming_loadtest_ledger_backend_test.go | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/internal/ingest/streaming_loadtest_ledger_backend_test.go b/internal/ingest/streaming_loadtest_ledger_backend_test.go index ea1e17417..41fa778a7 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend_test.go +++ b/internal/ingest/streaming_loadtest_ledger_backend_test.go @@ -205,3 +205,37 @@ func TestStreamingLoadtestBackend_GetLatestLedgerSequence(t *testing.T) { assert.Equal(t, uint32(101), seq) require.NoError(t, <-writerDone) } + +func TestStreamingLoadtestBackend_GetLedgerEOF(t *testing.T) { + pipePath := mkFIFO(t) + + backend, err := NewStreamingLoadtestLedgerBackend(StreamingLoadtestBackendConfig{ + MetaPipePath: pipePath, + }) + require.NoError(t, err) + defer backend.Close() + + writerDone := make(chan error, 1) + go func() { + f, err := os.OpenFile(pipePath, os.O_WRONLY, 0) + if err != nil { + writerDone <- err + return + } + writeLedgerCloseMeta(t, f, 5) + f.Close() + writerDone <- nil + }() + + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + require.NoError(t, backend.PrepareRange(ctx, ledgerbackend.UnboundedRange(5))) + + _, err = backend.GetLedger(ctx, 5) + require.NoError(t, err) + + _, err = backend.GetLedger(ctx, 6) + require.Error(t, err) + assert.Contains(t, err.Error(), "meta stream ended") + require.NoError(t, <-writerDone) +} From 1f26ae8eab58a494581cb866a997a7fcde4130c0 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:49:41 -0400 Subject: [PATCH 08/20] ingest: wire streaming-loadtest backend into NewLedgerBackend Co-Authored-By: Claude Opus 4.7 (1M context) --- internal/ingest/ledger_backend.go | 6 +++++ .../streaming_loadtest_ledger_backend_test.go | 24 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/internal/ingest/ledger_backend.go b/internal/ingest/ledger_backend.go index 1fc8393a2..e2d1a6ad1 100644 --- a/internal/ingest/ledger_backend.go +++ b/internal/ingest/ledger_backend.go @@ -18,6 +18,12 @@ func NewLedgerBackend(ctx context.Context, cfg Configs) (ledgerbackend.LedgerBac return newDatastoreLedgerBackend(ctx, cfg.DatastoreConfigPath, cfg.NetworkPassphrase) case LedgerBackendTypeRPC: return newRPCLedgerBackend(cfg) + case LedgerBackendTypeStreamingLoadtest: + return NewStreamingLoadtestLedgerBackend(StreamingLoadtestBackendConfig{ + MetaPipePath: cfg.MetaPipePath, + LedgerCloseDuration: cfg.LedgerCloseDuration, + NetworkPassphrase: cfg.NetworkPassphrase, + }) default: return nil, fmt.Errorf("unsupported ledger backend type: %s", cfg.LedgerBackendType) } diff --git a/internal/ingest/streaming_loadtest_ledger_backend_test.go b/internal/ingest/streaming_loadtest_ledger_backend_test.go index 41fa778a7..695f7a5ef 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend_test.go +++ b/internal/ingest/streaming_loadtest_ledger_backend_test.go @@ -239,3 +239,27 @@ func TestStreamingLoadtestBackend_GetLedgerEOF(t *testing.T) { assert.Contains(t, err.Error(), "meta stream ended") require.NoError(t, <-writerDone) } + +func TestNewLedgerBackend_StreamingLoadtest(t *testing.T) { + pipePath := mkFIFO(t) + + go func() { + f, err := os.OpenFile(pipePath, os.O_WRONLY, 0) + if err == nil { + t.Cleanup(func() { _ = f.Close() }) + } + }() + + cfg := Configs{ + LedgerBackendType: LedgerBackendTypeStreamingLoadtest, + MetaPipePath: pipePath, + LedgerCloseDuration: 500 * time.Millisecond, + NetworkPassphrase: "Apply Load", + } + backend, err := NewLedgerBackend(context.Background(), cfg) + require.NoError(t, err) + require.NotNil(t, backend) + _, ok := backend.(*StreamingLoadtestLedgerBackend) + assert.True(t, ok, "NewLedgerBackend should return a StreamingLoadtestLedgerBackend") + assert.NoError(t, backend.Close()) +} From d8d5b1c9c33674409441eb22e2337e30a957de91 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:53:01 -0400 Subject: [PATCH 09/20] cmd(ingest): add --meta-pipe-path, --ledger-close-duration flags and streaming-loadtest backend option Co-Authored-By: Claude Opus 4.7 (1M context) --- cmd/ingest.go | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/cmd/ingest.go b/cmd/ingest.go index dec061c97..4957ce4c4 100644 --- a/cmd/ingest.go +++ b/cmd/ingest.go @@ -108,7 +108,7 @@ func (c *ingestCmd) Command() *cobra.Command { }, { Name: "ledger-backend-type", - Usage: "Type of ledger backend to use for fetching ledgers. Options: 'rpc' or 'datastore' (default)", + Usage: "Type of ledger backend to use for fetching ledgers. Options: 'rpc', 'datastore' (default), or 'streaming-loadtest' (dev-only, reads from named pipe)", OptType: types.String, ConfigKey: &ledgerBackendType, FlagDefault: string(ingest.LedgerBackendTypeDatastore), @@ -122,6 +122,23 @@ func (c *ingestCmd) Command() *cobra.Command { FlagDefault: "config/datastore-pubnet.toml", Required: false, }, + { + Name: "loadtest-meta-pipe-path", + Usage: "Filesystem path of the named pipe (FIFO) for streaming-loadtest backend. Required when ledger-backend-type is 'streaming-loadtest'.", + OptType: types.String, + ConfigKey: &cfg.MetaPipePath, + FlagDefault: "", + Required: false, + }, + { + Name: "loadtest-ledger-close-duration", + Usage: "Minimum duration between ledger emits in streaming-loadtest mode. Accepts Go duration syntax (e.g., 1s, 200ms, 0 = uncapped). Only used with streaming-loadtest backend.", + OptType: types.String, + ConfigKey: &cfg.LedgerCloseDuration, + FlagDefault: "0s", + Required: false, + CustomSetValue: utils.SetConfigOptionDuration, + }, { Name: "chunk-interval", Usage: "TimescaleDB chunk time interval for hypertables. Only affects future chunks. Uses PostgreSQL INTERVAL syntax.", @@ -183,8 +200,10 @@ func (c *ingestCmd) Command() *cobra.Command { cfg.LedgerBackendType = ingest.LedgerBackendTypeRPC case string(ingest.LedgerBackendTypeDatastore): cfg.LedgerBackendType = ingest.LedgerBackendTypeDatastore + case string(ingest.LedgerBackendTypeStreamingLoadtest): + cfg.LedgerBackendType = ingest.LedgerBackendTypeStreamingLoadtest default: - return fmt.Errorf("invalid ledger-backend-type '%s', must be 'rpc' or 'datastore'", ledgerBackendType) + return fmt.Errorf("invalid ledger-backend-type '%s', must be 'rpc', 'datastore', or 'streaming-loadtest'", ledgerBackendType) } appTracker, err := sentry.NewSentryTracker(sentryDSN, stellarEnvironment, 5) From 75c29ebfb2cc66329c1a010d906f91238cb5324a Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 14:57:16 -0400 Subject: [PATCH 10/20] Update streaming_loadtest_ledger_backend.go --- internal/ingest/streaming_loadtest_ledger_backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ingest/streaming_loadtest_ledger_backend.go b/internal/ingest/streaming_loadtest_ledger_backend.go index d09615464..38699663c 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend.go +++ b/internal/ingest/streaming_loadtest_ledger_backend.go @@ -148,7 +148,7 @@ func (b *StreamingLoadtestLedgerBackend) GetLatestLedgerSequence(ctx context.Con } func (b *StreamingLoadtestLedgerBackend) IsPrepared(ctx context.Context, ledgerRange ledgerbackend.Range) (bool, error) { - return false, fmt.Errorf("not implemented") + return b.prepared, nil } func (b *StreamingLoadtestLedgerBackend) Close() error { From c8053c2d7a998e5c41d770d875f8801e360b7bfe Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Tue, 21 Apr 2026 17:47:02 -0400 Subject: [PATCH 11/20] ingest: drain until archive publishes checkpoint before returning from constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NewStreamingLoadtestLedgerBackend now, when ArchiveURL is set, opens the meta FIFO and drains frames until the history archive reports a non-zero currentLedger (AND we've consumed a frame with seq >= that checkpoint). This resolves a startup deadlock where apply-load blocks on FIFO writes before publishing the first archive checkpoint, and wallet-backend's PopulateAccountTokens path can't proceed without a valid checkpoint. The drain happens in the constructor (before PrepareRange) because startLiveIngestion calls GetLatestLedgerSequence + PopulateAccountTokens before PrepareRange. Also: lint/errcheck cleanup — errors.Is for io.EOF, wrapped external errors, removed unnecessary uint32 casts on xdr.LedgerCloseMeta.LedgerSequence (which is already uint32). Co-Authored-By: Claude Opus 4.7 (1M context) --- internal/ingest/ledger_backend.go | 1 + .../streaming_loadtest_ledger_backend.go | 181 +++++++++++++++++- .../streaming_loadtest_ledger_backend_test.go | 175 +++++++++++++++++ 3 files changed, 349 insertions(+), 8 deletions(-) diff --git a/internal/ingest/ledger_backend.go b/internal/ingest/ledger_backend.go index e2d1a6ad1..145a2898c 100644 --- a/internal/ingest/ledger_backend.go +++ b/internal/ingest/ledger_backend.go @@ -23,6 +23,7 @@ func NewLedgerBackend(ctx context.Context, cfg Configs) (ledgerbackend.LedgerBac MetaPipePath: cfg.MetaPipePath, LedgerCloseDuration: cfg.LedgerCloseDuration, NetworkPassphrase: cfg.NetworkPassphrase, + ArchiveURL: cfg.ArchiveURL, }) default: return nil, fmt.Errorf("unsupported ledger backend type: %s", cfg.LedgerBackendType) diff --git a/internal/ingest/streaming_loadtest_ledger_backend.go b/internal/ingest/streaming_loadtest_ledger_backend.go index 38699663c..b03a6cf3d 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend.go +++ b/internal/ingest/streaming_loadtest_ledger_backend.go @@ -2,13 +2,18 @@ package ingest import ( "context" + "encoding/json" + "errors" "fmt" "io" + "net/http" "os" + "strings" "sync" "time" "github.com/stellar/go-stellar-sdk/ingest/ledgerbackend" + "github.com/stellar/go-stellar-sdk/support/log" "github.com/stellar/go-stellar-sdk/xdr" ) @@ -23,6 +28,18 @@ type StreamingLoadtestBackendConfig struct { // NetworkPassphrase is recorded but not validated by this backend; apply-load // writes meta that is passphrase-independent at the framing layer. NetworkPassphrase string + // ArchiveURL, when non-empty, makes the constructor open the FIFO and + // drain frames until the history archive publishes its first checkpoint. + // Required when co-located with stellar-core apply-load: apply-load + // blocks on FIFO writes (buffered write + flush per ledger close) once + // the 64KB pipe buffer fills, and can't publish a checkpoint to the + // archive until someone drains the pipe. wallet-backend's startLiveIngestion + // path requires a valid checkpoint from the archive before it reaches + // PrepareRange, so the drain must happen here. + ArchiveURL string + // DrainTimeout is the hard cap on how long the constructor's drain waits + // for the archive to publish. 0 = default (5 minutes). + DrainTimeout time.Duration } // StreamingLoadtestLedgerBackend reads stream-framed XDR LedgerCloseMeta from a @@ -45,11 +62,158 @@ type StreamingLoadtestLedgerBackend struct { // Verify interface implementation at compile time. var _ ledgerbackend.LedgerBackend = (*StreamingLoadtestLedgerBackend)(nil) +const defaultDrainTimeout = 5 * time.Minute + func NewStreamingLoadtestLedgerBackend(cfg StreamingLoadtestBackendConfig) (*StreamingLoadtestLedgerBackend, error) { if cfg.MetaPipePath == "" { return nil, fmt.Errorf("MetaPipePath is required") } - return &StreamingLoadtestLedgerBackend{config: cfg}, nil + b := &StreamingLoadtestLedgerBackend{config: cfg} + + if cfg.ArchiveURL != "" { + timeout := cfg.DrainTimeout + if timeout == 0 { + timeout = defaultDrainTimeout + } + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + if err := b.openPipe(ctx); err != nil { + return nil, fmt.Errorf("opening meta pipe: %w", err) + } + if err := b.drainUntilArchiveReady(ctx); err != nil { + if closeErr := b.pipeFile.Close(); closeErr != nil { + log.Ctx(ctx).Warnf("closing pipe after drain failure: %v", closeErr) + } + return nil, fmt.Errorf("waiting for archive checkpoint: %w", err) + } + b.prepared = true + } + return b, nil +} + +// openPipe opens the FIFO read-side. Blocks until apply-load opens the write side. +// Respects ctx cancellation. +func (b *StreamingLoadtestLedgerBackend) openPipe(ctx context.Context) error { + openResult := make(chan struct { + f *os.File + err error + }, 1) + go func() { + f, err := os.OpenFile(b.config.MetaPipePath, os.O_RDONLY, 0) + openResult <- struct { + f *os.File + err error + }{f, err} + }() + + select { + case <-ctx.Done(): + return fmt.Errorf("context cancelled waiting for pipe writer: %w", ctx.Err()) + case res := <-openResult: + if res.err != nil { + return fmt.Errorf("opening meta pipe %s: %w", b.config.MetaPipePath, res.err) + } + b.pipeFile = res.f + b.xdrStream = xdr.NewStream(b.pipeFile) + return nil + } +} + +// drainUntilArchiveReady reads and discards frames from the pipe until the +// history archive at cfg.ArchiveURL reports a non-zero currentLedger AND the +// drain has consumed a frame with seq >= that currentLedger. Blocks until done +// or until ctx expires. +// +// This unsticks apply-load (which blocks on FIFO writes after ~64KB of meta) +// long enough for it to close ledgers through the first checkpoint boundary +// and publish the history archive, which wallet-backend's +// PopulateAccountTokens path requires. +func (b *StreamingLoadtestLedgerBackend) drainUntilArchiveReady(ctx context.Context) error { + archivePollInterval := 500 * time.Millisecond + + archiveReady := make(chan uint32, 1) + + pollCtx, cancelPoll := context.WithCancel(ctx) + defer cancelPoll() + go func() { + for { + curLedger, err := b.fetchArchiveCurrentLedger(pollCtx) + if err == nil && curLedger > 0 { + select { + case archiveReady <- curLedger: + case <-pollCtx.Done(): + } + return + } + select { + case <-pollCtx.Done(): + return + case <-time.After(archivePollInterval): + } + } + }() + + var archiveCheckpointLedger uint32 + for { + if archiveCheckpointLedger == 0 { + select { + case v := <-archiveReady: + archiveCheckpointLedger = v + log.Ctx(ctx).Infof("streaming-loadtest: archive published checkpoint %d; draining until we consume that ledger from the pipe", v) + default: + } + } + + if err := ctx.Err(); err != nil { + return fmt.Errorf("drain cancelled: %w", err) + } + + var lcm xdr.LedgerCloseMeta + if err := b.xdrStream.ReadOne(&lcm); err != nil { + if errors.Is(err, io.EOF) { + return fmt.Errorf("meta stream ended during drain: %w", io.EOF) + } + return fmt.Errorf("reading meta frame during drain: %w", err) + } + seq := lcm.LedgerSequence() + b.mu.Lock() + if seq > b.latestSeqSeen { + b.latestSeqSeen = seq + } + b.mu.Unlock() + + if archiveCheckpointLedger > 0 && seq >= archiveCheckpointLedger { + log.Ctx(ctx).Infof("streaming-loadtest: drain complete at ledger %d; handing off to GetLedger", seq) + return nil + } + } +} + +func (b *StreamingLoadtestLedgerBackend) fetchArchiveCurrentLedger(ctx context.Context) (uint32, error) { + url := strings.TrimRight(b.config.ArchiveURL, "/") + "/.well-known/stellar-history.json" + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return 0, fmt.Errorf("building archive request: %w", err) + } + resp, err := http.DefaultClient.Do(req) + if err != nil { + return 0, fmt.Errorf("fetching archive HAS: %w", err) + } + defer func() { + if closeErr := resp.Body.Close(); closeErr != nil { + log.Ctx(ctx).Warnf("closing archive response body: %v", closeErr) + } + }() + if resp.StatusCode != http.StatusOK { + return 0, fmt.Errorf("archive returned %s", resp.Status) + } + var has struct { + CurrentLedger uint32 `json:"currentLedger"` + } + if err := json.NewDecoder(resp.Body).Decode(&has); err != nil { + return 0, fmt.Errorf("decoding archive HAS: %w", err) + } + return has.CurrentLedger, nil } func (b *StreamingLoadtestLedgerBackend) PrepareRange(ctx context.Context, ledgerRange ledgerbackend.Range) error { @@ -63,8 +227,8 @@ func (b *StreamingLoadtestLedgerBackend) PrepareRange(ctx context.Context, ledge return fmt.Errorf("streaming-loadtest backend only supports unbounded ranges") } - // Open the read-side. This blocks until a writer opens the FIFO on the other end. - // Honour context cancellation by running the open in a goroutine. + // Fallback path for when the backend was constructed without ArchiveURL + // (unit tests that bypass the drain). Open the pipe here. openResult := make(chan struct { f *os.File err error @@ -114,20 +278,20 @@ func (b *StreamingLoadtestLedgerBackend) GetLedger(ctx context.Context, sequence case <-timer.C: case <-ctx.Done(): timer.Stop() - return xdr.LedgerCloseMeta{}, ctx.Err() + return xdr.LedgerCloseMeta{}, fmt.Errorf("paced GetLedger cancelled: %w", ctx.Err()) } } } var lcm xdr.LedgerCloseMeta if err := b.xdrStream.ReadOne(&lcm); err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { return xdr.LedgerCloseMeta{}, fmt.Errorf("meta stream ended: %w", io.EOF) } return xdr.LedgerCloseMeta{}, fmt.Errorf("reading meta frame: %w", err) } - gotSeq := uint32(lcm.LedgerSequence()) + gotSeq := lcm.LedgerSequence() if gotSeq != sequence { return xdr.LedgerCloseMeta{}, fmt.Errorf("stream sequence mismatch: expected %d, got %d", sequence, gotSeq) } @@ -159,8 +323,9 @@ func (b *StreamingLoadtestLedgerBackend) Close() error { } b.done = true if b.pipeFile != nil { - return b.pipeFile.Close() + if err := b.pipeFile.Close(); err != nil { + return fmt.Errorf("closing meta pipe: %w", err) + } } return nil } - diff --git a/internal/ingest/streaming_loadtest_ledger_backend_test.go b/internal/ingest/streaming_loadtest_ledger_backend_test.go index 695f7a5ef..01019eb36 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend_test.go +++ b/internal/ingest/streaming_loadtest_ledger_backend_test.go @@ -4,8 +4,12 @@ import ( "bytes" "context" "encoding/binary" + "encoding/json" + "net/http" + "net/http/httptest" "os" "path/filepath" + "sync/atomic" "syscall" "testing" "time" @@ -263,3 +267,174 @@ func TestNewLedgerBackend_StreamingLoadtest(t *testing.T) { assert.True(t, ok, "NewLedgerBackend should return a StreamingLoadtestLedgerBackend") assert.NoError(t, backend.Close()) } + +func TestStreamingLoadtestBackend_DrainsUntilArchiveReady(t *testing.T) { + pipePath := mkFIFO(t) + + var currentLedger atomic.Uint32 + archive := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path != "/.well-known/stellar-history.json" { + http.NotFound(w, r) + return + } + if err := json.NewEncoder(w).Encode(map[string]any{ + "currentLedger": currentLedger.Load(), + }); err != nil { + t.Logf("archive encode error: %v", err) + } + })) + defer archive.Close() + + // Coordinate the writer with the archive: publish checkpoint when the + // drain has consumed frames 1..7. We pace the writer so that the drain + // and archive-poll loop can interleave deterministically. + writerDone := make(chan error, 1) + writerCtx, writerCancel := context.WithCancel(context.Background()) + defer writerCancel() + go func() { + f, err := os.OpenFile(pipePath, os.O_WRONLY, 0) + if err != nil { + writerDone <- err + return + } + defer f.Close() + // Write ledgers 1..7 slowly, so drain consumes them while archive still reports 0. + for seq := uint32(1); seq <= 7; seq++ { + writeLedgerCloseMeta(t, f, seq) + time.Sleep(50 * time.Millisecond) + } + // Flip the archive. Drain will see currentLedger=7 on its next poll + // and then consume one more frame (seq 8) before deciding seq >= 7. + // Wait — the check is `seq >= C`, so seq=7 itself satisfies. + // But we've already consumed 7. So we need to make sure the archive + // flips BEFORE drain consumes 7. Since drain is blocked on ReadOne + // between our slow writes, we flip now (before write 7 even — delay + // slightly more). + currentLedger.Store(7) + // Keep feeding frames (best-effort — reader may close) until test ends. + seq := uint32(8) + for { + select { + case <-writerCtx.Done(): + writerDone <- nil + return + default: + } + if !writeFrameBestEffort(f, seq) { + writerDone <- nil + return + } + seq++ + time.Sleep(50 * time.Millisecond) + } + }() + + backend, err := NewStreamingLoadtestLedgerBackend(StreamingLoadtestBackendConfig{ + MetaPipePath: pipePath, + ArchiveURL: archive.URL, + DrainTimeout: 10 * time.Second, + }) + require.NoError(t, err) + defer backend.Close() + + // The drain returns once it consumes a frame with seq >= archive's currentLedger. + // The exact handoff seq can be 7 or higher (archive reports 7, drain may have + // already overshot). Grab whatever the backend thinks is next via reading and + // asserting monotonic progress instead of pinning to a specific seq. + lastSeen, err := backend.GetLatestLedgerSequence(context.Background()) + require.NoError(t, err) + assert.GreaterOrEqual(t, lastSeen, uint32(7), "drain should have consumed >= the archive checkpoint") + + // Next GetLedger should read the ledger with seq = lastSeen + 1 from the pipe. + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + lcm, err := backend.GetLedger(ctx, lastSeen+1) + require.NoError(t, err) + assert.Equal(t, lastSeen+1, lcm.LedgerSequence()) + + writerCancel() + <-writerDone +} + +func TestStreamingLoadtestBackend_DrainTimeout(t *testing.T) { + pipePath := mkFIFO(t) + + // Archive always reports currentLedger=0 — drain should time out. + archive := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if err := json.NewEncoder(w).Encode(map[string]any{"currentLedger": 0}); err != nil { + t.Logf("archive encode error: %v", err) + } + })) + defer archive.Close() + + // Writer feeds frames until the reader closes (broken pipe) or ctx ends. + // Uses raw write calls (not the require.NoError helper) so broken-pipe + // errors don't fail the test. + writerCtx, writerCancel := context.WithCancel(context.Background()) + defer writerCancel() + writerDone := make(chan struct{}) + go func() { + defer close(writerDone) + f, err := os.OpenFile(pipePath, os.O_WRONLY, 0) + if err != nil { + return + } + defer f.Close() + seq := uint32(1) + for { + select { + case <-writerCtx.Done(): + return + default: + } + if !writeFrameBestEffort(f, seq) { + return + } + seq++ + } + }() + + start := time.Now() + _, err := NewStreamingLoadtestLedgerBackend(StreamingLoadtestBackendConfig{ + MetaPipePath: pipePath, + ArchiveURL: archive.URL, + DrainTimeout: 1 * time.Second, + }) + elapsed := time.Since(start) + require.Error(t, err) + assert.Contains(t, err.Error(), "waiting for archive checkpoint") + assert.Less(t, elapsed, 3*time.Second, "drain should timeout promptly") + + writerCancel() + <-writerDone +} + +// writeFrameBestEffort writes a stream-framed LedgerCloseMeta to the given +// file without failing the test on broken-pipe errors. Returns false if the +// write failed (reader likely closed). +func writeFrameBestEffort(w *os.File, seq uint32) bool { + lcm := xdr.LedgerCloseMeta{ + V: 0, + V0: &xdr.LedgerCloseMetaV0{ + LedgerHeader: xdr.LedgerHeaderHistoryEntry{ + Header: xdr.LedgerHeader{ + LedgerSeq: xdr.Uint32(seq), + }, + }, + }, + } + var payload bytes.Buffer + if _, err := xdr.Marshal(&payload, &lcm); err != nil { + return false + } + length := uint32(payload.Len()) | 0x80000000 + var header [4]byte + binary.BigEndian.PutUint32(header[:], length) + if _, err := w.Write(header[:]); err != nil { + return false + } + if _, err := w.Write(payload.Bytes()); err != nil { + return false + } + return true +} From a701d10bd248751c1654ae21ee972f7a7c6d7a62 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 09:27:54 -0400 Subject: [PATCH 12/20] Update statechange.resolvers.go --- .../resolvers/statechange.resolvers.go | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/internal/serve/graphql/resolvers/statechange.resolvers.go b/internal/serve/graphql/resolvers/statechange.resolvers.go index 571833b6f..5edb3261f 100644 --- a/internal/serve/graphql/resolvers/statechange.resolvers.go +++ b/internal/serve/graphql/resolvers/statechange.resolvers.go @@ -431,12 +431,14 @@ func (r *Resolver) TrustlineChange() graphql1.TrustlineChangeResolver { return &trustlineChangeResolver{r} } -type accountChangeResolver struct{ *Resolver } -type balanceAuthorizationChangeResolver struct{ *Resolver } -type flagsChangeResolver struct{ *Resolver } -type metadataChangeResolver struct{ *Resolver } -type reservesChangeResolver struct{ *Resolver } -type signerChangeResolver struct{ *Resolver } -type signerThresholdsChangeResolver struct{ *Resolver } -type standardBalanceChangeResolver struct{ *Resolver } -type trustlineChangeResolver struct{ *Resolver } +type ( + accountChangeResolver struct{ *Resolver } + balanceAuthorizationChangeResolver struct{ *Resolver } + flagsChangeResolver struct{ *Resolver } + metadataChangeResolver struct{ *Resolver } + reservesChangeResolver struct{ *Resolver } + signerChangeResolver struct{ *Resolver } + signerThresholdsChangeResolver struct{ *Resolver } + standardBalanceChangeResolver struct{ *Resolver } + trustlineChangeResolver struct{ *Resolver } +) From 6f324c578acc29673ca7a0c93a4ecac7e2c5c13a Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 11:24:35 -0400 Subject: [PATCH 13/20] chore(deps): bump go-stellar-sdk to v0.5.0 and Go toolchain to 1.25.9 Bump github.com/stellar/go-stellar-sdk from v0.1.0 to v0.5.0. The new SDK requires Go 1.25, so the Go toolchain moves to 1.25.9 (latest patch) across go.mod, the Dockerfile base image (also migrating from Debian bullseye to bookworm), and the CI workflow. Transitive effect: github.com/stellar/go-xdr advances alongside the SDK, and several golang.org/x/* modules move to patch releases compatible with Go 1.25. No application code changes required -- the SDK's public surface remained backwards-compatible across v0.1 to v0.5. --- .github/workflows/go.yaml | 8 ++++---- Dockerfile | 2 +- go.mod | 18 ++++++++---------- go.sum | 32 ++++++++++++++++---------------- 4 files changed, 29 insertions(+), 31 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 3ad8c5886..a4e1473dd 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.24.2" + go-version: "1.25.9" cache: true cache-dependency-path: go.sum @@ -76,7 +76,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.24.2" + go-version: "1.25.9" cache: true cache-dependency-path: go.sum @@ -115,7 +115,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.24.2" + go-version: "1.25.9" cache: true cache-dependency-path: go.sum @@ -152,7 +152,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.24.2' + go-version: '1.25.9' - name: Get short commit hash id: git diff --git a/Dockerfile b/Dockerfile index 1d4b95879..de6b0de29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Step 1: Build Go API with debug symbols -FROM golang:1.24.6-bullseye AS api-build +FROM golang:1.25.9-bookworm AS api-build ARG GIT_COMMIT WORKDIR /src/wallet-backend diff --git a/go.mod b/go.mod index 4e25e8700..305e7b75a 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/stellar/wallet-backend -go 1.24.0 - -toolchain go1.24.2 +go 1.25.9 require ( github.com/99designs/gqlgen v0.17.76 @@ -26,15 +24,15 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.9.1 github.com/spf13/viper v1.20.1 - github.com/stellar/go-stellar-sdk v0.1.0 - github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2 + github.com/stellar/go-stellar-sdk v0.5.0 + github.com/stellar/go-xdr v0.0.0-20260312225820-cc2b0611aabf github.com/stellar/stellar-rpc v0.9.6-0.20250618231249-2d3e8ff69365 github.com/stretchr/testify v1.11.1 github.com/testcontainers/testcontainers-go v0.37.0 github.com/tetratelabs/wazero v1.10.1 github.com/vektah/gqlparser/v2 v2.5.30 github.com/vikstrous/dataloadgen v0.0.9 - golang.org/x/text v0.27.0 + golang.org/x/text v0.31.0 ) require ( @@ -177,12 +175,12 @@ require ( go.opentelemetry.io/otel/trace v1.38.0 // indirect go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.40.0 // indirect + golang.org/x/crypto v0.45.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/net v0.42.0 // indirect + golang.org/x/net v0.47.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.35.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/sys v0.38.0 // indirect golang.org/x/time v0.8.0 // indirect google.golang.org/api v0.215.0 // indirect google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect diff --git a/go.sum b/go.sum index b7969e088..977c4f1b6 100644 --- a/go.sum +++ b/go.sum @@ -405,10 +405,10 @@ github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8W github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/stellar/go v0.0.0-20250618181832-deaa3c3c87bd h1:iP73uR+pVWJxgI0tWRFUOk2FX+M+HzxnjaEqQnB+70I= github.com/stellar/go v0.0.0-20250618181832-deaa3c3c87bd/go.mod h1:SbWsnxzU24xq4gh3v1f5HZ2W3EDdZkPYJOZu9TxNG7c= -github.com/stellar/go-stellar-sdk v0.1.0 h1:MfV7dv4k6xQQrWeKT7npWyKhjoayphLVGwXKtTLNeH8= -github.com/stellar/go-stellar-sdk v0.1.0/go.mod h1:fZPcxQZw1I0zZ+X76uFcVPqmQCaYbWc87lDFW/kQJaY= -github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2 h1:OzCVd0SV5qE3ZcDeSFCmOWLZfEWZ3Oe8KtmSOYKEVWE= -github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2/go.mod h1:yoxyU/M8nl9LKeWIoBrbDPQ7Cy+4jxRcWcOayZ4BMps= +github.com/stellar/go-stellar-sdk v0.5.0 h1:xpOO+ZTyvGz54wTm7pwl2Gf1e6lZl0ExrJ/tKb+Roj4= +github.com/stellar/go-stellar-sdk v0.5.0/go.mod h1:tLKAQPxa2I5UvGMabBbUXcY3fmgYnfDudrMeK7CDX4w= +github.com/stellar/go-xdr v0.0.0-20260312225820-cc2b0611aabf h1:GY1RVbX3Hg7poPXEf6yojjP0hyypvgUgZmCqQU9D0xg= +github.com/stellar/go-xdr v0.0.0-20260312225820-cc2b0611aabf/go.mod h1:If+U9Z1W5xU97VrOgJandQT+2dN7/iOpkCrxBJEyF80= github.com/stellar/stellar-rpc v0.9.6-0.20250618231249-2d3e8ff69365 h1:44MGQ1AXnWiibX1u/aCqizdnbwQASsiSy68+aHODdGk= github.com/stellar/stellar-rpc v0.9.6-0.20250618231249-2d3e8ff69365/go.mod h1:UT1k9G6GpubOvpqC+AqbziDyu2DWS5cLhnOb6QT+DU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -497,8 +497,8 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= @@ -516,8 +516,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= @@ -526,8 +526,8 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -538,14 +538,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= -golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= +golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 764b228cbd80e9b4b21b9ad67fe5eb6ffd4458ff Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 11:26:03 -0400 Subject: [PATCH 14/20] chore(build): bump Makefile + workflow tooling for Go 1.25, remove govulncheck - x/tools cluster (goimports, shadow, deadcode): v0.31.0 -> v0.43.0 - gqlgen: v0.17.76 -> v0.17.88 (requires Go 1.25) - gotestsum (CI): v1.11.0 -> v1.13.0 - gofumpt: add a pinned auto-install guard at v0.9.2 to match the pattern used by the other tools in the Makefile - Remove the govulncheck target and its entry in the `check` aggregator. Vulnerability scanning can be reintroduced via Dependabot or osv-scanner in a separate change if desired. exhaustive (v0.12.0) and golangci-lint (v2.1.2) are already current and remain unchanged. --- .github/workflows/go.yaml | 16 +++++++------- Makefile | 22 ++++++++------------ go.mod | 20 +++++++++--------- go.sum | 44 +++++++++++++++++++-------------------- 4 files changed, 49 insertions(+), 53 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index a4e1473dd..6b043a045 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -31,9 +31,9 @@ jobs: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2 golangci-lint run - - name: Run `shadow@v0.31.0` + - name: Run `shadow@v0.43.0` run: | - go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.31.0 + go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.43.0 shadow ./... | { grep -v "generated.go" || true; } - name: Run `exhaustive@v0.12.0` @@ -41,9 +41,9 @@ jobs: go install github.com/nishanths/exhaustive/cmd/exhaustive@v0.12.0 exhaustive -default-signifies-exhaustive ./... - - name: Run `deadcode@v0.31.0` + - name: Run `deadcode@v0.43.0` run: | - go install golang.org/x/tools/cmd/deadcode@v0.31.0 + go install golang.org/x/tools/cmd/deadcode@v0.43.0 output=$(deadcode -test ./... | { grep -v "UnmarshalUInt32" || true; } | { grep -v "isBalance" || true; }) if [[ -n "$output" ]]; then echo "🚨 Deadcode found:" @@ -53,9 +53,9 @@ jobs: echo "✅ No deadcode found" fi - - name: Run `goimports@v0.31.0` + - name: Run `goimports@v0.43.0` run: | - go install golang.org/x/tools/cmd/goimports@v0.31.0 + go install golang.org/x/tools/cmd/goimports@v0.43.0 # Find all .go files excluding paths containing 'mock' and run goimports non_compliant_files=$(find . -type f -name "*.go" ! -path "*mock*" | xargs goimports -local "github.com/stellar/wallet-backend" -l) @@ -119,8 +119,8 @@ jobs: cache: true cache-dependency-path: go.sum - - name: Install gotestsum@v1.11.0 - run: go install gotest.tools/gotestsum@v1.11.0 + - name: Install gotestsum@v1.13.0 + run: go install gotest.tools/gotestsum@v1.13.0 - name: Run tests run: gotestsum --format-hide-empty-pkg --format pkgname-and-test-fails -- -coverprofile=c.out ./... -timeout 3m -coverpkg ./... diff --git a/Makefile b/Makefile index 0827483f8..2b0b3dff6 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,10 @@ tidy: ## Tidy modfiles and format source files go mod tidy -v @echo "==> Formatting code..." go fmt ./... + @command -v $(shell go env GOPATH)/bin/gofumpt >/dev/null 2>&1 || { go install mvdan.cc/gofumpt@v0.9.2; } $(shell go env GOPATH)/bin/gofumpt -l -w . @echo "==> Fixing imports..." - @command -v $(shell go env GOPATH)/bin/goimports >/dev/null 2>&1 || { go install golang.org/x/tools/cmd/goimports@v0.31.0; } + @command -v $(shell go env GOPATH)/bin/goimports >/dev/null 2>&1 || { go install golang.org/x/tools/cmd/goimports@v0.43.0; } @find . -type f -name "*.go" ! -path "*mock*" | xargs $(shell go env GOPATH)/bin/goimports -local "github.com/stellar/wallet-backend" -w fmt: ## Check if code is formatted with gofmt @@ -48,7 +49,7 @@ shadow: ## Run shadow analysis to find shadowed variables @echo "==> Running shadow analyzer..." @if ! command -v $(shell go env GOPATH)/bin/shadow >/dev/null 2>&1; then \ echo "Installing shadow..."; \ - go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.31.0; \ + go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.43.0; \ fi @$(shell go env GOPATH)/bin/shadow ./... | { grep -v "generated.go" || true; } @@ -61,7 +62,7 @@ deadcode: ## Find unused code @echo "==> Checking for deadcode..." @if ! command -v $(shell go env GOPATH)/bin/deadcode >/dev/null 2>&1; then \ echo "Installing deadcode..."; \ - go install golang.org/x/tools/cmd/deadcode@v0.31.0; \ + go install golang.org/x/tools/cmd/deadcode@v0.43.0; \ fi @output=$$($(shell go env GOPATH)/bin/deadcode -test ./... | grep -v "UnmarshalUInt32" | grep -v "isBalance"); \ if [ -n "$$output" ]; then \ @@ -74,13 +75,13 @@ deadcode: ## Find unused code fix-imports: ## Fix import formatting and organization @echo "==> Fixing imports..." - @command -v $(shell go env GOPATH)/bin/goimports >/dev/null 2>&1 || { go install golang.org/x/tools/cmd/goimports@v0.31.0; } + @command -v $(shell go env GOPATH)/bin/goimports >/dev/null 2>&1 || { go install golang.org/x/tools/cmd/goimports@v0.43.0; } @find . -type f -name "*.go" ! -path "*mock*" | xargs $(shell go env GOPATH)/bin/goimports -local "github.com/stellar/wallet-backend" -w @echo "✅ Imports fixed." goimports: ## Check import formatting and organization @echo "==> Checking imports..." - @command -v $(shell go env GOPATH)/bin/goimports >/dev/null 2>&1 || { go install golang.org/x/tools/cmd/goimports@v0.31.0; } + @command -v $(shell go env GOPATH)/bin/goimports >/dev/null 2>&1 || { go install golang.org/x/tools/cmd/goimports@v0.43.0; } @non_compliant_files=$$(find . -type f -name "*.go" ! -path "*mock*" | xargs $(shell go env GOPATH)/bin/goimports -local "github.com/stellar/wallet-backend" -l); \ if [ -n "$$non_compliant_files" ]; then \ echo "🚨 The following files are not compliant with goimports:"; \ @@ -90,12 +91,7 @@ goimports: ## Check import formatting and organization echo "✅ All files are compliant with goimports."; \ fi -govulncheck: ## Check for known vulnerabilities - @echo "==> Running vulnerability check..." - @command -v govulncheck >/dev/null 2>&1 || { go install golang.org/x/vuln/cmd/govulncheck@latest; } - $(shell go env GOPATH)/bin/govulncheck ./... - -check: tidy fmt vet lint generate shadow exhaustive deadcode goimports govulncheck gql-validate ## Run all checks +check: tidy fmt vet lint generate shadow exhaustive deadcode goimports gql-validate ## Run all checks @echo "✅ All checks completed successfully" # ==================================================================================== # @@ -103,13 +99,13 @@ check: tidy fmt vet lint generate shadow exhaustive deadcode goimports govulnche # ==================================================================================== # gql-generate: ## Generate GraphQL code using gqlgen @echo "==> Generating GraphQL code..." - @command -v $(shell go env GOPATH)/bin/gqlgen >/dev/null 2>&1 || { go install github.com/99designs/gqlgen@v0.17.76; } + @command -v $(shell go env GOPATH)/bin/gqlgen >/dev/null 2>&1 || { go install github.com/99designs/gqlgen@v0.17.88; } $(shell go env GOPATH)/bin/gqlgen generate @echo "✅ GraphQL code generated successfully" gql-validate: ## Validate GraphQL schema @echo "==> Validating GraphQL schema..." - @command -v $(shell go env GOPATH)/bin/gqlgen >/dev/null 2>&1 || { go install github.com/99designs/gqlgen@v0.17.76; } + @command -v $(shell go env GOPATH)/bin/gqlgen >/dev/null 2>&1 || { go install github.com/99designs/gqlgen@v0.17.88; } $(shell go env GOPATH)/bin/gqlgen validate @echo "✅ GraphQL schema is valid" diff --git a/go.mod b/go.mod index 305e7b75a..4a8dbf573 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/stellar/wallet-backend go 1.25.9 require ( - github.com/99designs/gqlgen v0.17.76 + github.com/99designs/gqlgen v0.17.88 github.com/alitto/pond/v2 v2.5.0 github.com/avast/retry-go/v4 v4.6.1 github.com/basemachina/gqlgen-complexity-reporter v0.1.2 @@ -30,9 +30,9 @@ require ( github.com/stretchr/testify v1.11.1 github.com/testcontainers/testcontainers-go v0.37.0 github.com/tetratelabs/wazero v1.10.1 - github.com/vektah/gqlparser/v2 v2.5.30 + github.com/vektah/gqlparser/v2 v2.5.32 github.com/vikstrous/dataloadgen v0.0.9 - golang.org/x/text v0.31.0 + golang.org/x/text v0.34.0 ) require ( @@ -102,7 +102,7 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/go-cmp v0.7.0 // indirect @@ -148,7 +148,7 @@ require ( github.com/sagikazarmark/locafero v0.7.0 // indirect github.com/segmentio/go-loggly v0.5.1-0.20171222203950-eb91657e62b2 // indirect github.com/shirou/gopsutil/v4 v4.25.1 // indirect - github.com/sosodev/duration v1.3.1 // indirect + github.com/sosodev/duration v1.4.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.12.0 // indirect github.com/spf13/cast v1.7.1 // indirect @@ -175,19 +175,19 @@ require ( go.opentelemetry.io/otel/trace v1.38.0 // indirect go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.45.0 // indirect + golang.org/x/crypto v0.48.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/net v0.47.0 // indirect + golang.org/x/net v0.50.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sync v0.18.0 // indirect - golang.org/x/sys v0.38.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.41.0 // indirect golang.org/x/time v0.8.0 // indirect google.golang.org/api v0.215.0 // indirect google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250728155136-f173205681a0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 // indirect google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.8 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/djherbis/atime.v1 v1.0.0 // indirect gopkg.in/djherbis/stream.v1 v1.3.1 // indirect gopkg.in/tylerb/graceful.v1 v1.2.15 // indirect diff --git a/go.sum b/go.sum index 977c4f1b6..1b8239aa2 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/99designs/gqlgen v0.17.76 h1:YsJBcfACWmXWU2t1yCjoGdOmqcTfOFpjbLAE443fmYI= -github.com/99designs/gqlgen v0.17.76/go.mod h1:miiU+PkAnTIDKMQ1BseUOIVeQHoiwYDZGCswoxl7xec= +github.com/99designs/gqlgen v0.17.88 h1:neMQDgehMwT1vYIOx/w5ZYPUU/iMNAJzRO44I5Intoc= +github.com/99designs/gqlgen v0.17.88/go.mod h1:qeqYFEgOeSKqWedOjogPizimp2iu4E23bdPvl4jTYic= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= @@ -205,8 +205,8 @@ github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHO github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= -github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= -github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.2.3 h1:kkGXqQOBSDDWRhWNXTFpqGSCMyh/PLnqUvMGJPDJDs0= @@ -387,8 +387,8 @@ github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0Zqm github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4= -github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= +github.com/sosodev/duration v1.4.0 h1:35ed0KiVFriGHHzZZJaZLgmTEEICIyt8Sx0RQfj9IjE= +github.com/sosodev/duration v1.4.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= @@ -438,8 +438,8 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.34.0 h1:d3AAQJ2DRcxJYHm7OXNXtXt2as1vMDfxeIcFvhmGGm4= github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= -github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE= -github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo= +github.com/vektah/gqlparser/v2 v2.5.32 h1:k9QPJd4sEDTL+qB4ncPLflqTJ3MmjB9SrVzJrawpFSc= +github.com/vektah/gqlparser/v2 v2.5.32/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts= github.com/vikstrous/dataloadgen v0.0.9 h1:pIVKyTZEFvq9Wbfk4zZ0uFQcMPhE/uCHnlnWB6sNA4g= github.com/vikstrous/dataloadgen v0.0.9/go.mod h1:8vuQVpBH0ODbMKAPUdCAPcOGezoTIhgAjgex51t4vbg= github.com/xdrpp/goxdr v0.1.1 h1:E1B2c6E8eYhOVyd7yEpOyopzTPirUeF6mVOfXfGyJyc= @@ -497,8 +497,8 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= -golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= +golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= +golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= @@ -516,8 +516,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= -golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= +golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= @@ -526,8 +526,8 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -538,14 +538,14 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= -golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= +golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -589,8 +589,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= -google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From e90536519dd10ba4b6d4466c5f7fd610a62e81c0 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 11:34:29 -0400 Subject: [PATCH 15/20] fix: address staticcheck QF1012 findings surfaced by Go 1.25 Replace builder.WriteString(fmt.Sprintf(...)) with fmt.Fprintf(&builder, ...) across internal/data SQL query builders and the integrationtests useCase summary formatter. strings.Builder implements io.Writer, so Fprintf writes directly without an intermediate string allocation. These lint findings appeared after the Go toolchain bump to 1.25.9. Autofixed via `golangci-lint run --fix`. --- internal/data/operations.go | 22 +++++----- internal/data/statechanges.go | 44 +++++++++---------- internal/data/transactions.go | 10 ++--- .../infrastructure/helpers.go | 8 ++-- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/internal/data/operations.go b/internal/data/operations.go index 003bb33d9..fcf99407a 100644 --- a/internal/data/operations.go +++ b/internal/data/operations.go @@ -43,7 +43,7 @@ func (m *OperationModel) GetAll(ctx context.Context, columns string, limit *int3 var args []interface{} argIndex := 1 - queryBuilder.WriteString(fmt.Sprintf(`SELECT %s, ledger_created_at as cursor_ledger_created_at, id as cursor_id FROM operations`, columns)) + fmt.Fprintf(&queryBuilder, `SELECT %s, ledger_created_at as cursor_ledger_created_at, id as cursor_id FROM operations`, columns) // Decomposed cursor pagination: expands ROW() tuple comparison into OR clauses so // TimescaleDB ColumnarScan can push filters into vectorized batch processing. @@ -64,7 +64,7 @@ func (m *OperationModel) GetAll(ctx context.Context, columns string, limit *int3 } if limit != nil { - queryBuilder.WriteString(fmt.Sprintf(" LIMIT $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " LIMIT $%d", argIndex) args = append(args, *limit) } query := queryBuilder.String() @@ -139,9 +139,9 @@ func (m *OperationModel) BatchGetByToIDs(ctx context.Context, toIDs []int64, col ) SELECT %s, ledger_created_at as cursor_ledger_created_at, id as cursor_id FROM ranked_operations_per_to_id ` - queryBuilder.WriteString(fmt.Sprintf(query, sortOrder, columns)) + fmt.Fprintf(&queryBuilder, query, sortOrder, columns) if limit != nil { - queryBuilder.WriteString(fmt.Sprintf(" WHERE rn <= %d", *limit)) + fmt.Fprintf(&queryBuilder, " WHERE rn <= %d", *limit) } query = queryBuilder.String() if sortOrder == DESC { @@ -167,16 +167,16 @@ func (m *OperationModel) BatchGetByToID(ctx context.Context, toID int64, columns columns = prepareColumnsWithID(columns, types.Operation{}, "", "id") queryBuilder := strings.Builder{} // Operations for a tx_to_id are in range (tx_to_id, tx_to_id + 4096) based on TOID encoding. - queryBuilder.WriteString(fmt.Sprintf(`SELECT %s, ledger_created_at as cursor_ledger_created_at, id as cursor_id FROM operations WHERE id > $1 AND id < $1 + 4096`, columns)) + fmt.Fprintf(&queryBuilder, `SELECT %s, ledger_created_at as cursor_ledger_created_at, id as cursor_id FROM operations WHERE id > $1 AND id < $1 + 4096`, columns) args := []interface{}{toID} argIndex := 2 if cursor != nil { if sortOrder == DESC { - queryBuilder.WriteString(fmt.Sprintf(" AND id < $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " AND id < $%d", argIndex) } else { - queryBuilder.WriteString(fmt.Sprintf(" AND id > $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " AND id > $%d", argIndex) } args = append(args, *cursor) argIndex++ @@ -189,7 +189,7 @@ func (m *OperationModel) BatchGetByToID(ctx context.Context, toID int64, columns } if limit != nil { - queryBuilder.WriteString(fmt.Sprintf(" LIMIT $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " LIMIT $%d", argIndex) args = append(args, *limit) } @@ -252,17 +252,17 @@ func (m *OperationModel) BatchGetByAccountAddress(ctx context.Context, accountAd } if limit != nil { - queryBuilder.WriteString(fmt.Sprintf(` LIMIT $%d`, argIndex)) + fmt.Fprintf(&queryBuilder, ` LIMIT $%d`, argIndex) args = append(args, *limit) } // Close CTE and LATERAL join to fetch full operation rows - queryBuilder.WriteString(fmt.Sprintf(` + fmt.Fprintf(&queryBuilder, ` ) SELECT %s, o.ledger_created_at as cursor_ledger_created_at, o.id as cursor_id FROM account_ops ao LEFT JOIN LATERAL (SELECT * FROM operations o WHERE o.id = ao.operation_id AND o.ledger_created_at = ao.ledger_created_at LIMIT 1) o ON true - WHERE o.id IS NOT NULL`, columns)) + WHERE o.id IS NOT NULL`, columns) if orderBy == DESC { queryBuilder.WriteString(` diff --git a/internal/data/statechanges.go b/internal/data/statechanges.go index a74238949..9a1c94f74 100644 --- a/internal/data/statechanges.go +++ b/internal/data/statechanges.go @@ -31,39 +31,39 @@ func (m *StateChangeModel) BatchGetByAccountAddress(ctx context.Context, account args := []interface{}{types.AddressBytea(accountAddress)} argIndex := 2 - queryBuilder.WriteString(fmt.Sprintf(` + fmt.Fprintf(&queryBuilder, ` SELECT %s, ledger_created_at as cursor_ledger_created_at, to_id as cursor_to_id, operation_id as cursor_operation_id, state_change_id as cursor_state_change_id FROM state_changes WHERE account_id = $1 - `, columns)) + `, columns) // Time range filter: enables TimescaleDB chunk pruning on the state_changes hypertable args, argIndex = appendTimeRangeConditions(&queryBuilder, "ledger_created_at", timeRange, args, argIndex) // Add transaction hash filter if provided (uses subquery to find to_id by hash) if txHash != nil { - queryBuilder.WriteString(fmt.Sprintf(" AND to_id = (SELECT to_id FROM transactions WHERE hash = $%d)", argIndex)) + fmt.Fprintf(&queryBuilder, " AND to_id = (SELECT to_id FROM transactions WHERE hash = $%d)", argIndex) args = append(args, types.HashBytea(*txHash)) argIndex++ } // Add operation ID filter if provided if operationID != nil { - queryBuilder.WriteString(fmt.Sprintf(" AND operation_id = $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " AND operation_id = $%d", argIndex) args = append(args, *operationID) argIndex++ } // Add category filter if provided if category != nil { - queryBuilder.WriteString(fmt.Sprintf(" AND state_change_category = $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " AND state_change_category = $%d", argIndex) args = append(args, *category) argIndex++ } // Add reason filter if provided if reason != nil { - queryBuilder.WriteString(fmt.Sprintf(" AND state_change_reason = $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " AND state_change_reason = $%d", argIndex) args = append(args, *reason) argIndex++ } @@ -91,7 +91,7 @@ func (m *StateChangeModel) BatchGetByAccountAddress(ctx context.Context, account // Add limit using parameterized query if limit != nil && *limit > 0 { - queryBuilder.WriteString(fmt.Sprintf(" LIMIT $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " LIMIT $%d", argIndex) args = append(args, *limit) } @@ -122,10 +122,10 @@ func (m *StateChangeModel) GetAll(ctx context.Context, columns string, limit *in var args []interface{} argIndex := 1 - queryBuilder.WriteString(fmt.Sprintf(` + fmt.Fprintf(&queryBuilder, ` SELECT %s, ledger_created_at as cursor_ledger_created_at, to_id as cursor_to_id, operation_id as cursor_operation_id, state_change_id as cursor_state_change_id FROM state_changes - `, columns)) + `, columns) // Decomposed cursor pagination: expands ROW() tuple comparison into OR clauses so // TimescaleDB ColumnarScan can push filters into vectorized batch processing. @@ -149,7 +149,7 @@ func (m *StateChangeModel) GetAll(ctx context.Context, columns string, limit *in } if limit != nil && *limit > 0 { - queryBuilder.WriteString(fmt.Sprintf(" LIMIT $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " LIMIT $%d", argIndex) args = append(args, *limit) } @@ -320,11 +320,11 @@ func generateStateChangeID() (int64, error) { func (m *StateChangeModel) BatchGetByToID(ctx context.Context, toID int64, columns string, limit *int32, cursor *types.StateChangeCursor, sortOrder SortOrder) ([]*types.StateChangeWithCursor, error) { columns = prepareColumnsWithID(columns, types.StateChange{}, "", "to_id", "operation_id", "state_change_id", "account_id") var queryBuilder strings.Builder - queryBuilder.WriteString(fmt.Sprintf(` + fmt.Fprintf(&queryBuilder, ` SELECT %s, ledger_created_at as cursor_ledger_created_at, to_id as cursor_to_id, operation_id as cursor_operation_id, state_change_id as cursor_state_change_id FROM state_changes WHERE to_id = $1 - `, columns)) + `, columns) args := []interface{}{toID} argIndex := 2 @@ -350,7 +350,7 @@ func (m *StateChangeModel) BatchGetByToID(ctx context.Context, toID int64, colum } if limit != nil && *limit > 0 { - queryBuilder.WriteString(fmt.Sprintf(" LIMIT $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " LIMIT $%d", argIndex) args = append(args, *limit) } @@ -384,7 +384,7 @@ func (m *StateChangeModel) BatchGetByToIDs(ctx context.Context, toIDs []int64, c // transactions, we use ROW_NUMBER() with PARTITION BY to_id to limit results per transaction. // This guarantees that each transaction gets at most 'limit' state changes, providing // more balanced and predictable pagination across multiple transactions. - queryBuilder.WriteString(fmt.Sprintf(` + fmt.Fprintf(&queryBuilder, ` WITH inputs (to_id) AS ( SELECT * FROM UNNEST($1::bigint[]) @@ -400,9 +400,9 @@ func (m *StateChangeModel) BatchGetByToIDs(ctx context.Context, toIDs []int64, c inputs i ON sc.to_id = i.to_id ) SELECT %s, ledger_created_at as cursor_ledger_created_at, to_id as cursor_to_id, operation_id as cursor_operation_id, state_change_id as cursor_state_change_id FROM ranked_state_changes_per_to_id - `, sortOrder, sortOrder, sortOrder, sortOrder, columns)) + `, sortOrder, sortOrder, sortOrder, sortOrder, columns) if limit != nil { - queryBuilder.WriteString(fmt.Sprintf(" WHERE rn <= %d", *limit)) + fmt.Fprintf(&queryBuilder, " WHERE rn <= %d", *limit) } query := queryBuilder.String() @@ -430,11 +430,11 @@ func (m *StateChangeModel) BatchGetByToIDs(ctx context.Context, toIDs []int64, c func (m *StateChangeModel) BatchGetByOperationID(ctx context.Context, operationID int64, columns string, limit *int32, cursor *types.StateChangeCursor, sortOrder SortOrder) ([]*types.StateChangeWithCursor, error) { columns = prepareColumnsWithID(columns, types.StateChange{}, "", "to_id", "operation_id", "state_change_id", "account_id") var queryBuilder strings.Builder - queryBuilder.WriteString(fmt.Sprintf(` + fmt.Fprintf(&queryBuilder, ` SELECT %s, ledger_created_at as cursor_ledger_created_at, to_id as cursor_to_id, operation_id as cursor_operation_id, state_change_id as cursor_state_change_id FROM state_changes WHERE operation_id = $1 - `, columns)) + `, columns) args := []interface{}{operationID} argIndex := 2 @@ -460,7 +460,7 @@ func (m *StateChangeModel) BatchGetByOperationID(ctx context.Context, operationI } if limit != nil && *limit > 0 { - queryBuilder.WriteString(fmt.Sprintf(" LIMIT $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " LIMIT $%d", argIndex) args = append(args, *limit) } @@ -494,7 +494,7 @@ func (m *StateChangeModel) BatchGetByOperationIDs(ctx context.Context, operation // operations, we use ROW_NUMBER() with PARTITION BY operation_id to limit results per operation. // This guarantees that each operation gets at most 'limit' state changes, providing // more balanced and predictable pagination across multiple operations. - queryBuilder.WriteString(fmt.Sprintf(` + fmt.Fprintf(&queryBuilder, ` WITH inputs (operation_id) AS ( SELECT * FROM UNNEST($1::bigint[]) @@ -510,9 +510,9 @@ func (m *StateChangeModel) BatchGetByOperationIDs(ctx context.Context, operation inputs i ON sc.operation_id = i.operation_id ) SELECT %s, ledger_created_at as cursor_ledger_created_at, to_id as cursor_to_id, operation_id as cursor_operation_id, state_change_id as cursor_state_change_id FROM ranked_state_changes_per_operation_id - `, sortOrder, sortOrder, sortOrder, sortOrder, columns)) + `, sortOrder, sortOrder, sortOrder, sortOrder, columns) if limit != nil { - queryBuilder.WriteString(fmt.Sprintf(" WHERE rn <= %d", *limit)) + fmt.Fprintf(&queryBuilder, " WHERE rn <= %d", *limit) } query := queryBuilder.String() diff --git a/internal/data/transactions.go b/internal/data/transactions.go index bb04c5fc4..03f5e1ea3 100644 --- a/internal/data/transactions.go +++ b/internal/data/transactions.go @@ -44,7 +44,7 @@ func (m *TransactionModel) GetAll(ctx context.Context, columns string, limit *in var args []interface{} argIndex := 1 - queryBuilder.WriteString(fmt.Sprintf(`SELECT %s, ledger_created_at as cursor_ledger_created_at, to_id as cursor_id FROM transactions`, columns)) + fmt.Fprintf(&queryBuilder, `SELECT %s, ledger_created_at as cursor_ledger_created_at, to_id as cursor_id FROM transactions`, columns) // Decomposed cursor pagination: expands ROW() tuple comparison into OR clauses so // TimescaleDB ColumnarScan can push filters into vectorized batch processing. @@ -65,7 +65,7 @@ func (m *TransactionModel) GetAll(ctx context.Context, columns string, limit *in } if limit != nil { - queryBuilder.WriteString(fmt.Sprintf(" LIMIT $%d", argIndex)) + fmt.Fprintf(&queryBuilder, " LIMIT $%d", argIndex) args = append(args, *limit) } @@ -128,17 +128,17 @@ func (m *TransactionModel) BatchGetByAccountAddress(ctx context.Context, account } if limit != nil { - queryBuilder.WriteString(fmt.Sprintf(` LIMIT $%d`, argIndex)) + fmt.Fprintf(&queryBuilder, ` LIMIT $%d`, argIndex) args = append(args, *limit) } // Close CTE and LATERAL join to fetch full transaction rows - queryBuilder.WriteString(fmt.Sprintf(` + fmt.Fprintf(&queryBuilder, ` ) SELECT %s, t.ledger_created_at as cursor_ledger_created_at, t.to_id as cursor_id FROM account_txns ta LEFT JOIN LATERAL (SELECT * FROM transactions t WHERE t.to_id = ta.tx_to_id AND t.ledger_created_at = ta.ledger_created_at LIMIT 1) t ON true - WHERE t.to_id IS NOT NULL`, columns)) + WHERE t.to_id IS NOT NULL`, columns) if orderBy == DESC { queryBuilder.WriteString(` diff --git a/internal/integrationtests/infrastructure/helpers.go b/internal/integrationtests/infrastructure/helpers.go index 8856cff79..69a2e06b2 100644 --- a/internal/integrationtests/infrastructure/helpers.go +++ b/internal/integrationtests/infrastructure/helpers.go @@ -157,12 +157,12 @@ func RenderResult(useCase *UseCase) string { var builder strings.Builder builder.WriteString(statusText) - builder.WriteString(fmt.Sprintf(" {Use Case: %s", useCase.name)) - builder.WriteString(fmt.Sprintf(", Category: %s", useCase.category)) - builder.WriteString(fmt.Sprintf(", Hash: %s", useCase.SendTransactionResult.Hash)) + fmt.Fprintf(&builder, " {Use Case: %s", useCase.name) + fmt.Fprintf(&builder, ", Category: %s", useCase.category) + fmt.Fprintf(&builder, ", Hash: %s", useCase.SendTransactionResult.Hash) if status != entities.SuccessStatus { txResult := useCase.GetTransactionResult - builder.WriteString(fmt.Sprintf("ResultXDR: %+v, ErrorResultXDR: %+v, ResultMetaXDR: %+v", txResult.ResultXDR, txResult.ErrorResultXDR, txResult.ResultMetaXDR)) + fmt.Fprintf(&builder, "ResultXDR: %+v, ErrorResultXDR: %+v, ResultMetaXDR: %+v", txResult.ResultXDR, txResult.ErrorResultXDR, txResult.ResultMetaXDR) } builder.WriteString("}") From bc30b42e464d3abd0d832861f212f70ce11ad1ff Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 11:34:41 -0400 Subject: [PATCH 16/20] chore(build): route exhaustive through golangci-lint The standalone github.com/nishanths/exhaustive/cmd/exhaustive@v0.12.0 binary transitively requires golang.org/x/tools@v0.15.0, which fails to compile under Go 1.25 (a stricter constant-evaluation rule rejects an older pattern in x/tools/internal/tokeninternal). The exhaustive project has had no new release in ~2 years and its master branch has the same problem. golangci-lint v2.1.2 ships its own vendored exhaustive analyzer and builds cleanly under Go 1.25, so move the enforcement there: - Remove the standalone exhaustive Makefile target and its entry in the `check` aggregator. - Remove the standalone exhaustive step in the GitHub Actions go.yaml workflow. - Enable the exhaustive linter in .golangci.yml with the same `default-signifies-exhaustive: true` setting the standalone tool used. Coverage is preserved -- the golangci-lint pass at `make check` now reports zero exhaustive findings, matching the previous state. --- .github/workflows/go.yaml | 7 +------ .golangci.yml | 4 ++++ Makefile | 7 +------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 6b043a045..ccfc4b9ec 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -36,12 +36,7 @@ jobs: go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.43.0 shadow ./... | { grep -v "generated.go" || true; } - - name: Run `exhaustive@v0.12.0` - run: | - go install github.com/nishanths/exhaustive/cmd/exhaustive@v0.12.0 - exhaustive -default-signifies-exhaustive ./... - - - name: Run `deadcode@v0.43.0` +- name: Run `deadcode@v0.43.0` run: | go install golang.org/x/tools/cmd/deadcode@v0.43.0 output=$(deadcode -test ./... | { grep -v "UnmarshalUInt32" || true; } | { grep -v "isBalance" || true; }) diff --git a/.golangci.yml b/.golangci.yml index 04f33768d..5d9f1c8ef 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,6 +22,7 @@ linters: - unused - unconvert - unparam + - exhaustive settings: staticcheck: @@ -34,6 +35,9 @@ linters: # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`. check-blank: true + exhaustive: + default-signifies-exhaustive: true + exclusions: paths: # mocks are ignored diff --git a/Makefile b/Makefile index 2b0b3dff6..a180fa6d6 100644 --- a/Makefile +++ b/Makefile @@ -53,11 +53,6 @@ shadow: ## Run shadow analysis to find shadowed variables fi @$(shell go env GOPATH)/bin/shadow ./... | { grep -v "generated.go" || true; } -exhaustive: ## Check exhaustiveness of switch statements - @echo "==> Running exhaustive..." - @command -v exhaustive >/dev/null 2>&1 || { go install github.com/nishanths/exhaustive/cmd/exhaustive@v0.12.0; } - $(shell go env GOPATH)/bin/exhaustive -default-signifies-exhaustive ./... - deadcode: ## Find unused code @echo "==> Checking for deadcode..." @if ! command -v $(shell go env GOPATH)/bin/deadcode >/dev/null 2>&1; then \ @@ -91,7 +86,7 @@ goimports: ## Check import formatting and organization echo "✅ All files are compliant with goimports."; \ fi -check: tidy fmt vet lint generate shadow exhaustive deadcode goimports gql-validate ## Run all checks +check: tidy fmt vet lint generate shadow deadcode goimports gql-validate ## Run all checks @echo "✅ All checks completed successfully" # ==================================================================================== # From 1ca6b98635924e4f18d9df7dfde3792259410fc6 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 11:34:51 -0400 Subject: [PATCH 17/20] chore(graphql): regenerate gqlgen output for v0.17.88 Regenerated via `make gql-generate` after bumping gqlgen from v0.17.76 to v0.17.88. The new version produces substantially smaller output (~7800 deletions, ~3500 insertions in generated.go) and also applies gofumpt v0.9's type-block consolidation to the resolver stubs. No behaviour changes -- schema and resolver signatures are unchanged. Regeneration is idempotent: a second `make gql-generate` produces no diff. --- internal/serve/graphql/generated/generated.go | 11268 +++++----------- .../graphql/resolvers/account.resolvers.go | 8 +- .../graphql/resolvers/operation.resolvers.go | 5 +- .../graphql/resolvers/queries.resolvers.go | 8 +- .../resolvers/statechange.resolvers.go | 5 +- .../resolvers/transaction.resolvers.go | 5 +- 6 files changed, 3511 insertions(+), 7788 deletions(-) diff --git a/internal/serve/graphql/generated/generated.go b/internal/serve/graphql/generated/generated.go index c2e2d9fa0..00cde9737 100644 --- a/internal/serve/graphql/generated/generated.go +++ b/internal/serve/graphql/generated/generated.go @@ -8,37 +8,25 @@ import ( "errors" "fmt" "strconv" - "sync" "sync/atomic" "time" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - gqlparser "github.com/vektah/gqlparser/v2" - "github.com/vektah/gqlparser/v2/ast" - "github.com/stellar/wallet-backend/internal/indexer/types" "github.com/stellar/wallet-backend/internal/serve/graphql/scalars" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { - return &executableSchema{ - schema: cfg.Schema, - resolvers: cfg.Resolvers, - directives: cfg.Directives, - complexity: cfg.Complexity, - } + return &executableSchema{SchemaData: cfg.Schema, Resolvers: cfg.Resolvers, Directives: cfg.Directives, ComplexityRoot: cfg.Complexity} } -type Config struct { - Schema *ast.Schema - Resolvers ResolverRoot - Directives DirectiveRoot - Complexity ComplexityRoot -} +type Config = graphql.Config[ResolverRoot, DirectiveRoot, ComplexityRoot] type ResolverRoot interface { Account() AccountResolver @@ -438,34 +426,28 @@ type TrustlineChangeResolver interface { LiquidityPoolID(ctx context.Context, obj *types.TrustlineStateChangeModel) (*string, error) } -type executableSchema struct { - schema *ast.Schema - resolvers ResolverRoot - directives DirectiveRoot - complexity ComplexityRoot -} +type executableSchema graphql.ExecutableSchemaState[ResolverRoot, DirectiveRoot, ComplexityRoot] func (e *executableSchema) Schema() *ast.Schema { - if e.schema != nil { - return e.schema + if e.SchemaData != nil { + return e.SchemaData } return parsedSchema } func (e *executableSchema) Complexity(ctx context.Context, typeName, field string, childComplexity int, rawArgs map[string]any) (int, bool) { - ec := executionContext{nil, e, 0, 0, nil} + ec := newExecutionContext(nil, e, nil) _ = ec switch typeName + "." + field { case "Account.address": - if e.complexity.Account.Address == nil { + if e.ComplexityRoot.Account.Address == nil { break } - return e.complexity.Account.Address(childComplexity), true - + return e.ComplexityRoot.Account.Address(childComplexity), true case "Account.balances": - if e.complexity.Account.Balances == nil { + if e.ComplexityRoot.Account.Balances == nil { break } @@ -474,10 +456,9 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Account.Balances(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - + return e.ComplexityRoot.Account.Balances(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "Account.operations": - if e.complexity.Account.Operations == nil { + if e.ComplexityRoot.Account.Operations == nil { break } @@ -486,10 +467,9 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Account.Operations(childComplexity, args["since"].(*time.Time), args["until"].(*time.Time), args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - + return e.ComplexityRoot.Account.Operations(childComplexity, args["since"].(*time.Time), args["until"].(*time.Time), args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "Account.stateChanges": - if e.complexity.Account.StateChanges == nil { + if e.ComplexityRoot.Account.StateChanges == nil { break } @@ -498,10 +478,9 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Account.StateChanges(childComplexity, args["filter"].(*AccountStateChangeFilterInput), args["since"].(*time.Time), args["until"].(*time.Time), args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - + return e.ComplexityRoot.Account.StateChanges(childComplexity, args["filter"].(*AccountStateChangeFilterInput), args["since"].(*time.Time), args["until"].(*time.Time), args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "Account.transactions": - if e.complexity.Account.Transactions == nil { + if e.ComplexityRoot.Account.Transactions == nil { break } @@ -510,409 +489,359 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Account.Transactions(childComplexity, args["since"].(*time.Time), args["until"].(*time.Time), args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true + return e.ComplexityRoot.Account.Transactions(childComplexity, args["since"].(*time.Time), args["until"].(*time.Time), args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "AccountChange.account": - if e.complexity.AccountChange.Account == nil { + if e.ComplexityRoot.AccountChange.Account == nil { break } - return e.complexity.AccountChange.Account(childComplexity), true - + return e.ComplexityRoot.AccountChange.Account(childComplexity), true case "AccountChange.funderAddress": - if e.complexity.AccountChange.FunderAddress == nil { + if e.ComplexityRoot.AccountChange.FunderAddress == nil { break } - return e.complexity.AccountChange.FunderAddress(childComplexity), true - + return e.ComplexityRoot.AccountChange.FunderAddress(childComplexity), true case "AccountChange.ingestedAt": - if e.complexity.AccountChange.IngestedAt == nil { + if e.ComplexityRoot.AccountChange.IngestedAt == nil { break } - return e.complexity.AccountChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.AccountChange.IngestedAt(childComplexity), true case "AccountChange.ledgerCreatedAt": - if e.complexity.AccountChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.AccountChange.LedgerCreatedAt == nil { break } - return e.complexity.AccountChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.AccountChange.LedgerCreatedAt(childComplexity), true case "AccountChange.ledgerNumber": - if e.complexity.AccountChange.LedgerNumber == nil { + if e.ComplexityRoot.AccountChange.LedgerNumber == nil { break } - return e.complexity.AccountChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.AccountChange.LedgerNumber(childComplexity), true case "AccountChange.operation": - if e.complexity.AccountChange.Operation == nil { + if e.ComplexityRoot.AccountChange.Operation == nil { break } - return e.complexity.AccountChange.Operation(childComplexity), true - + return e.ComplexityRoot.AccountChange.Operation(childComplexity), true case "AccountChange.reason": - if e.complexity.AccountChange.Reason == nil { + if e.ComplexityRoot.AccountChange.Reason == nil { break } - return e.complexity.AccountChange.Reason(childComplexity), true - + return e.ComplexityRoot.AccountChange.Reason(childComplexity), true case "AccountChange.transaction": - if e.complexity.AccountChange.Transaction == nil { + if e.ComplexityRoot.AccountChange.Transaction == nil { break } - return e.complexity.AccountChange.Transaction(childComplexity), true - + return e.ComplexityRoot.AccountChange.Transaction(childComplexity), true case "AccountChange.type": - if e.complexity.AccountChange.Type == nil { + if e.ComplexityRoot.AccountChange.Type == nil { break } - return e.complexity.AccountChange.Type(childComplexity), true + return e.ComplexityRoot.AccountChange.Type(childComplexity), true case "BalanceAuthorizationChange.account": - if e.complexity.BalanceAuthorizationChange.Account == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.Account == nil { break } - return e.complexity.BalanceAuthorizationChange.Account(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.Account(childComplexity), true case "BalanceAuthorizationChange.flags": - if e.complexity.BalanceAuthorizationChange.Flags == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.Flags == nil { break } - return e.complexity.BalanceAuthorizationChange.Flags(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.Flags(childComplexity), true case "BalanceAuthorizationChange.ingestedAt": - if e.complexity.BalanceAuthorizationChange.IngestedAt == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.IngestedAt == nil { break } - return e.complexity.BalanceAuthorizationChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.IngestedAt(childComplexity), true case "BalanceAuthorizationChange.ledgerCreatedAt": - if e.complexity.BalanceAuthorizationChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.LedgerCreatedAt == nil { break } - return e.complexity.BalanceAuthorizationChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.LedgerCreatedAt(childComplexity), true case "BalanceAuthorizationChange.ledgerNumber": - if e.complexity.BalanceAuthorizationChange.LedgerNumber == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.LedgerNumber == nil { break } - return e.complexity.BalanceAuthorizationChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.LedgerNumber(childComplexity), true case "BalanceAuthorizationChange.liquidityPoolId": - if e.complexity.BalanceAuthorizationChange.LiquidityPoolID == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.LiquidityPoolID == nil { break } - return e.complexity.BalanceAuthorizationChange.LiquidityPoolID(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.LiquidityPoolID(childComplexity), true case "BalanceAuthorizationChange.operation": - if e.complexity.BalanceAuthorizationChange.Operation == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.Operation == nil { break } - return e.complexity.BalanceAuthorizationChange.Operation(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.Operation(childComplexity), true case "BalanceAuthorizationChange.reason": - if e.complexity.BalanceAuthorizationChange.Reason == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.Reason == nil { break } - return e.complexity.BalanceAuthorizationChange.Reason(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.Reason(childComplexity), true case "BalanceAuthorizationChange.tokenId": - if e.complexity.BalanceAuthorizationChange.TokenID == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.TokenID == nil { break } - return e.complexity.BalanceAuthorizationChange.TokenID(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.TokenID(childComplexity), true case "BalanceAuthorizationChange.transaction": - if e.complexity.BalanceAuthorizationChange.Transaction == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.Transaction == nil { break } - return e.complexity.BalanceAuthorizationChange.Transaction(childComplexity), true - + return e.ComplexityRoot.BalanceAuthorizationChange.Transaction(childComplexity), true case "BalanceAuthorizationChange.type": - if e.complexity.BalanceAuthorizationChange.Type == nil { + if e.ComplexityRoot.BalanceAuthorizationChange.Type == nil { break } - return e.complexity.BalanceAuthorizationChange.Type(childComplexity), true + return e.ComplexityRoot.BalanceAuthorizationChange.Type(childComplexity), true case "BalanceConnection.edges": - if e.complexity.BalanceConnection.Edges == nil { + if e.ComplexityRoot.BalanceConnection.Edges == nil { break } - return e.complexity.BalanceConnection.Edges(childComplexity), true - + return e.ComplexityRoot.BalanceConnection.Edges(childComplexity), true case "BalanceConnection.pageInfo": - if e.complexity.BalanceConnection.PageInfo == nil { + if e.ComplexityRoot.BalanceConnection.PageInfo == nil { break } - return e.complexity.BalanceConnection.PageInfo(childComplexity), true + return e.ComplexityRoot.BalanceConnection.PageInfo(childComplexity), true case "BalanceEdge.cursor": - if e.complexity.BalanceEdge.Cursor == nil { + if e.ComplexityRoot.BalanceEdge.Cursor == nil { break } - return e.complexity.BalanceEdge.Cursor(childComplexity), true - + return e.ComplexityRoot.BalanceEdge.Cursor(childComplexity), true case "BalanceEdge.node": - if e.complexity.BalanceEdge.Node == nil { + if e.ComplexityRoot.BalanceEdge.Node == nil { break } - return e.complexity.BalanceEdge.Node(childComplexity), true + return e.ComplexityRoot.BalanceEdge.Node(childComplexity), true case "FlagsChange.account": - if e.complexity.FlagsChange.Account == nil { + if e.ComplexityRoot.FlagsChange.Account == nil { break } - return e.complexity.FlagsChange.Account(childComplexity), true - + return e.ComplexityRoot.FlagsChange.Account(childComplexity), true case "FlagsChange.flags": - if e.complexity.FlagsChange.Flags == nil { + if e.ComplexityRoot.FlagsChange.Flags == nil { break } - return e.complexity.FlagsChange.Flags(childComplexity), true - + return e.ComplexityRoot.FlagsChange.Flags(childComplexity), true case "FlagsChange.ingestedAt": - if e.complexity.FlagsChange.IngestedAt == nil { + if e.ComplexityRoot.FlagsChange.IngestedAt == nil { break } - return e.complexity.FlagsChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.FlagsChange.IngestedAt(childComplexity), true case "FlagsChange.ledgerCreatedAt": - if e.complexity.FlagsChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.FlagsChange.LedgerCreatedAt == nil { break } - return e.complexity.FlagsChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.FlagsChange.LedgerCreatedAt(childComplexity), true case "FlagsChange.ledgerNumber": - if e.complexity.FlagsChange.LedgerNumber == nil { + if e.ComplexityRoot.FlagsChange.LedgerNumber == nil { break } - return e.complexity.FlagsChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.FlagsChange.LedgerNumber(childComplexity), true case "FlagsChange.operation": - if e.complexity.FlagsChange.Operation == nil { + if e.ComplexityRoot.FlagsChange.Operation == nil { break } - return e.complexity.FlagsChange.Operation(childComplexity), true - + return e.ComplexityRoot.FlagsChange.Operation(childComplexity), true case "FlagsChange.reason": - if e.complexity.FlagsChange.Reason == nil { + if e.ComplexityRoot.FlagsChange.Reason == nil { break } - return e.complexity.FlagsChange.Reason(childComplexity), true - + return e.ComplexityRoot.FlagsChange.Reason(childComplexity), true case "FlagsChange.transaction": - if e.complexity.FlagsChange.Transaction == nil { + if e.ComplexityRoot.FlagsChange.Transaction == nil { break } - return e.complexity.FlagsChange.Transaction(childComplexity), true - + return e.ComplexityRoot.FlagsChange.Transaction(childComplexity), true case "FlagsChange.type": - if e.complexity.FlagsChange.Type == nil { + if e.ComplexityRoot.FlagsChange.Type == nil { break } - return e.complexity.FlagsChange.Type(childComplexity), true + return e.ComplexityRoot.FlagsChange.Type(childComplexity), true case "MetadataChange.account": - if e.complexity.MetadataChange.Account == nil { + if e.ComplexityRoot.MetadataChange.Account == nil { break } - return e.complexity.MetadataChange.Account(childComplexity), true - + return e.ComplexityRoot.MetadataChange.Account(childComplexity), true case "MetadataChange.ingestedAt": - if e.complexity.MetadataChange.IngestedAt == nil { + if e.ComplexityRoot.MetadataChange.IngestedAt == nil { break } - return e.complexity.MetadataChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.MetadataChange.IngestedAt(childComplexity), true case "MetadataChange.keyValue": - if e.complexity.MetadataChange.KeyValue == nil { + if e.ComplexityRoot.MetadataChange.KeyValue == nil { break } - return e.complexity.MetadataChange.KeyValue(childComplexity), true - + return e.ComplexityRoot.MetadataChange.KeyValue(childComplexity), true case "MetadataChange.ledgerCreatedAt": - if e.complexity.MetadataChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.MetadataChange.LedgerCreatedAt == nil { break } - return e.complexity.MetadataChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.MetadataChange.LedgerCreatedAt(childComplexity), true case "MetadataChange.ledgerNumber": - if e.complexity.MetadataChange.LedgerNumber == nil { + if e.ComplexityRoot.MetadataChange.LedgerNumber == nil { break } - return e.complexity.MetadataChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.MetadataChange.LedgerNumber(childComplexity), true case "MetadataChange.operation": - if e.complexity.MetadataChange.Operation == nil { + if e.ComplexityRoot.MetadataChange.Operation == nil { break } - return e.complexity.MetadataChange.Operation(childComplexity), true - + return e.ComplexityRoot.MetadataChange.Operation(childComplexity), true case "MetadataChange.reason": - if e.complexity.MetadataChange.Reason == nil { + if e.ComplexityRoot.MetadataChange.Reason == nil { break } - return e.complexity.MetadataChange.Reason(childComplexity), true - + return e.ComplexityRoot.MetadataChange.Reason(childComplexity), true case "MetadataChange.transaction": - if e.complexity.MetadataChange.Transaction == nil { + if e.ComplexityRoot.MetadataChange.Transaction == nil { break } - return e.complexity.MetadataChange.Transaction(childComplexity), true - + return e.ComplexityRoot.MetadataChange.Transaction(childComplexity), true case "MetadataChange.type": - if e.complexity.MetadataChange.Type == nil { + if e.ComplexityRoot.MetadataChange.Type == nil { break } - return e.complexity.MetadataChange.Type(childComplexity), true + return e.ComplexityRoot.MetadataChange.Type(childComplexity), true case "NativeBalance.balance": - if e.complexity.NativeBalance.Balance == nil { + if e.ComplexityRoot.NativeBalance.Balance == nil { break } - return e.complexity.NativeBalance.Balance(childComplexity), true - + return e.ComplexityRoot.NativeBalance.Balance(childComplexity), true case "NativeBalance.buyingLiabilities": - if e.complexity.NativeBalance.BuyingLiabilities == nil { + if e.ComplexityRoot.NativeBalance.BuyingLiabilities == nil { break } - return e.complexity.NativeBalance.BuyingLiabilities(childComplexity), true - + return e.ComplexityRoot.NativeBalance.BuyingLiabilities(childComplexity), true case "NativeBalance.lastModifiedLedger": - if e.complexity.NativeBalance.LastModifiedLedger == nil { + if e.ComplexityRoot.NativeBalance.LastModifiedLedger == nil { break } - return e.complexity.NativeBalance.LastModifiedLedger(childComplexity), true - + return e.ComplexityRoot.NativeBalance.LastModifiedLedger(childComplexity), true case "NativeBalance.minimumBalance": - if e.complexity.NativeBalance.MinimumBalance == nil { + if e.ComplexityRoot.NativeBalance.MinimumBalance == nil { break } - return e.complexity.NativeBalance.MinimumBalance(childComplexity), true - + return e.ComplexityRoot.NativeBalance.MinimumBalance(childComplexity), true case "NativeBalance.sellingLiabilities": - if e.complexity.NativeBalance.SellingLiabilities == nil { + if e.ComplexityRoot.NativeBalance.SellingLiabilities == nil { break } - return e.complexity.NativeBalance.SellingLiabilities(childComplexity), true - + return e.ComplexityRoot.NativeBalance.SellingLiabilities(childComplexity), true case "NativeBalance.tokenId": - if e.complexity.NativeBalance.TokenID == nil { + if e.ComplexityRoot.NativeBalance.TokenID == nil { break } - return e.complexity.NativeBalance.TokenID(childComplexity), true - + return e.ComplexityRoot.NativeBalance.TokenID(childComplexity), true case "NativeBalance.tokenType": - if e.complexity.NativeBalance.TokenType == nil { + if e.ComplexityRoot.NativeBalance.TokenType == nil { break } - return e.complexity.NativeBalance.TokenType(childComplexity), true + return e.ComplexityRoot.NativeBalance.TokenType(childComplexity), true case "Operation.accounts": - if e.complexity.Operation.Accounts == nil { + if e.ComplexityRoot.Operation.Accounts == nil { break } - return e.complexity.Operation.Accounts(childComplexity), true - + return e.ComplexityRoot.Operation.Accounts(childComplexity), true case "Operation.id": - if e.complexity.Operation.ID == nil { + if e.ComplexityRoot.Operation.ID == nil { break } - return e.complexity.Operation.ID(childComplexity), true - + return e.ComplexityRoot.Operation.ID(childComplexity), true case "Operation.ingestedAt": - if e.complexity.Operation.IngestedAt == nil { + if e.ComplexityRoot.Operation.IngestedAt == nil { break } - return e.complexity.Operation.IngestedAt(childComplexity), true - + return e.ComplexityRoot.Operation.IngestedAt(childComplexity), true case "Operation.ledgerCreatedAt": - if e.complexity.Operation.LedgerCreatedAt == nil { + if e.ComplexityRoot.Operation.LedgerCreatedAt == nil { break } - return e.complexity.Operation.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.Operation.LedgerCreatedAt(childComplexity), true case "Operation.ledgerNumber": - if e.complexity.Operation.LedgerNumber == nil { + if e.ComplexityRoot.Operation.LedgerNumber == nil { break } - return e.complexity.Operation.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.Operation.LedgerNumber(childComplexity), true case "Operation.operationType": - if e.complexity.Operation.OperationType == nil { + if e.ComplexityRoot.Operation.OperationType == nil { break } - return e.complexity.Operation.OperationType(childComplexity), true - + return e.ComplexityRoot.Operation.OperationType(childComplexity), true case "Operation.operationXdr": - if e.complexity.Operation.OperationXdr == nil { + if e.ComplexityRoot.Operation.OperationXdr == nil { break } - return e.complexity.Operation.OperationXdr(childComplexity), true - + return e.ComplexityRoot.Operation.OperationXdr(childComplexity), true case "Operation.resultCode": - if e.complexity.Operation.ResultCode == nil { + if e.ComplexityRoot.Operation.ResultCode == nil { break } - return e.complexity.Operation.ResultCode(childComplexity), true - + return e.ComplexityRoot.Operation.ResultCode(childComplexity), true case "Operation.stateChanges": - if e.complexity.Operation.StateChanges == nil { + if e.ComplexityRoot.Operation.StateChanges == nil { break } @@ -921,80 +850,73 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Operation.StateChanges(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - + return e.ComplexityRoot.Operation.StateChanges(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "Operation.successful": - if e.complexity.Operation.Successful == nil { + if e.ComplexityRoot.Operation.Successful == nil { break } - return e.complexity.Operation.Successful(childComplexity), true - + return e.ComplexityRoot.Operation.Successful(childComplexity), true case "Operation.transaction": - if e.complexity.Operation.Transaction == nil { + if e.ComplexityRoot.Operation.Transaction == nil { break } - return e.complexity.Operation.Transaction(childComplexity), true + return e.ComplexityRoot.Operation.Transaction(childComplexity), true case "OperationConnection.edges": - if e.complexity.OperationConnection.Edges == nil { + if e.ComplexityRoot.OperationConnection.Edges == nil { break } - return e.complexity.OperationConnection.Edges(childComplexity), true - + return e.ComplexityRoot.OperationConnection.Edges(childComplexity), true case "OperationConnection.pageInfo": - if e.complexity.OperationConnection.PageInfo == nil { + if e.ComplexityRoot.OperationConnection.PageInfo == nil { break } - return e.complexity.OperationConnection.PageInfo(childComplexity), true + return e.ComplexityRoot.OperationConnection.PageInfo(childComplexity), true case "OperationEdge.cursor": - if e.complexity.OperationEdge.Cursor == nil { + if e.ComplexityRoot.OperationEdge.Cursor == nil { break } - return e.complexity.OperationEdge.Cursor(childComplexity), true - + return e.ComplexityRoot.OperationEdge.Cursor(childComplexity), true case "OperationEdge.node": - if e.complexity.OperationEdge.Node == nil { + if e.ComplexityRoot.OperationEdge.Node == nil { break } - return e.complexity.OperationEdge.Node(childComplexity), true + return e.ComplexityRoot.OperationEdge.Node(childComplexity), true case "PageInfo.endCursor": - if e.complexity.PageInfo.EndCursor == nil { + if e.ComplexityRoot.PageInfo.EndCursor == nil { break } - return e.complexity.PageInfo.EndCursor(childComplexity), true - + return e.ComplexityRoot.PageInfo.EndCursor(childComplexity), true case "PageInfo.hasNextPage": - if e.complexity.PageInfo.HasNextPage == nil { + if e.ComplexityRoot.PageInfo.HasNextPage == nil { break } - return e.complexity.PageInfo.HasNextPage(childComplexity), true - + return e.ComplexityRoot.PageInfo.HasNextPage(childComplexity), true case "PageInfo.hasPreviousPage": - if e.complexity.PageInfo.HasPreviousPage == nil { + if e.ComplexityRoot.PageInfo.HasPreviousPage == nil { break } - return e.complexity.PageInfo.HasPreviousPage(childComplexity), true - + return e.ComplexityRoot.PageInfo.HasPreviousPage(childComplexity), true case "PageInfo.startCursor": - if e.complexity.PageInfo.StartCursor == nil { + if e.ComplexityRoot.PageInfo.StartCursor == nil { break } - return e.complexity.PageInfo.StartCursor(childComplexity), true + return e.ComplexityRoot.PageInfo.StartCursor(childComplexity), true case "Query.accountByAddress": - if e.complexity.Query.AccountByAddress == nil { + if e.ComplexityRoot.Query.AccountByAddress == nil { break } @@ -1003,10 +925,10 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Query.AccountByAddress(childComplexity, args["address"].(string)), true + return e.ComplexityRoot.Query.AccountByAddress(childComplexity, args["address"].(string)), true case "Query.operationById": - if e.complexity.Query.OperationByID == nil { + if e.ComplexityRoot.Query.OperationByID == nil { break } @@ -1015,10 +937,9 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Query.OperationByID(childComplexity, args["id"].(int64)), true - + return e.ComplexityRoot.Query.OperationByID(childComplexity, args["id"].(int64)), true case "Query.operations": - if e.complexity.Query.Operations == nil { + if e.ComplexityRoot.Query.Operations == nil { break } @@ -1027,10 +948,9 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Query.Operations(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - + return e.ComplexityRoot.Query.Operations(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "Query.stateChanges": - if e.complexity.Query.StateChanges == nil { + if e.ComplexityRoot.Query.StateChanges == nil { break } @@ -1039,10 +959,9 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Query.StateChanges(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - + return e.ComplexityRoot.Query.StateChanges(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "Query.transactionByHash": - if e.complexity.Query.TransactionByHash == nil { + if e.ComplexityRoot.Query.TransactionByHash == nil { break } @@ -1051,10 +970,9 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Query.TransactionByHash(childComplexity, args["hash"].(string)), true - + return e.ComplexityRoot.Query.TransactionByHash(childComplexity, args["hash"].(string)), true case "Query.transactions": - if e.complexity.Query.Transactions == nil { + if e.ComplexityRoot.Query.Transactions == nil { break } @@ -1063,486 +981,426 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Query.Transactions(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true + return e.ComplexityRoot.Query.Transactions(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "ReservesChange.account": - if e.complexity.ReservesChange.Account == nil { + if e.ComplexityRoot.ReservesChange.Account == nil { break } - return e.complexity.ReservesChange.Account(childComplexity), true - + return e.ComplexityRoot.ReservesChange.Account(childComplexity), true case "ReservesChange.claimableBalanceId": - if e.complexity.ReservesChange.ClaimableBalanceID == nil { + if e.ComplexityRoot.ReservesChange.ClaimableBalanceID == nil { break } - return e.complexity.ReservesChange.ClaimableBalanceID(childComplexity), true - + return e.ComplexityRoot.ReservesChange.ClaimableBalanceID(childComplexity), true case "ReservesChange.ingestedAt": - if e.complexity.ReservesChange.IngestedAt == nil { + if e.ComplexityRoot.ReservesChange.IngestedAt == nil { break } - return e.complexity.ReservesChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.ReservesChange.IngestedAt(childComplexity), true case "ReservesChange.ledgerCreatedAt": - if e.complexity.ReservesChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.ReservesChange.LedgerCreatedAt == nil { break } - return e.complexity.ReservesChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.ReservesChange.LedgerCreatedAt(childComplexity), true case "ReservesChange.ledgerNumber": - if e.complexity.ReservesChange.LedgerNumber == nil { + if e.ComplexityRoot.ReservesChange.LedgerNumber == nil { break } - return e.complexity.ReservesChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.ReservesChange.LedgerNumber(childComplexity), true case "ReservesChange.liquidityPoolId": - if e.complexity.ReservesChange.LiquidityPoolID == nil { + if e.ComplexityRoot.ReservesChange.LiquidityPoolID == nil { break } - return e.complexity.ReservesChange.LiquidityPoolID(childComplexity), true - + return e.ComplexityRoot.ReservesChange.LiquidityPoolID(childComplexity), true case "ReservesChange.operation": - if e.complexity.ReservesChange.Operation == nil { + if e.ComplexityRoot.ReservesChange.Operation == nil { break } - return e.complexity.ReservesChange.Operation(childComplexity), true - + return e.ComplexityRoot.ReservesChange.Operation(childComplexity), true case "ReservesChange.reason": - if e.complexity.ReservesChange.Reason == nil { + if e.ComplexityRoot.ReservesChange.Reason == nil { break } - return e.complexity.ReservesChange.Reason(childComplexity), true - + return e.ComplexityRoot.ReservesChange.Reason(childComplexity), true case "ReservesChange.sponsorAddress": - if e.complexity.ReservesChange.SponsorAddress == nil { + if e.ComplexityRoot.ReservesChange.SponsorAddress == nil { break } - return e.complexity.ReservesChange.SponsorAddress(childComplexity), true - + return e.ComplexityRoot.ReservesChange.SponsorAddress(childComplexity), true case "ReservesChange.sponsoredAddress": - if e.complexity.ReservesChange.SponsoredAddress == nil { + if e.ComplexityRoot.ReservesChange.SponsoredAddress == nil { break } - return e.complexity.ReservesChange.SponsoredAddress(childComplexity), true - + return e.ComplexityRoot.ReservesChange.SponsoredAddress(childComplexity), true case "ReservesChange.sponsoredData": - if e.complexity.ReservesChange.SponsoredData == nil { + if e.ComplexityRoot.ReservesChange.SponsoredData == nil { break } - return e.complexity.ReservesChange.SponsoredData(childComplexity), true - + return e.ComplexityRoot.ReservesChange.SponsoredData(childComplexity), true case "ReservesChange.sponsoredTrustline": - if e.complexity.ReservesChange.SponsoredTrustline == nil { + if e.ComplexityRoot.ReservesChange.SponsoredTrustline == nil { break } - return e.complexity.ReservesChange.SponsoredTrustline(childComplexity), true - + return e.ComplexityRoot.ReservesChange.SponsoredTrustline(childComplexity), true case "ReservesChange.transaction": - if e.complexity.ReservesChange.Transaction == nil { + if e.ComplexityRoot.ReservesChange.Transaction == nil { break } - return e.complexity.ReservesChange.Transaction(childComplexity), true - + return e.ComplexityRoot.ReservesChange.Transaction(childComplexity), true case "ReservesChange.type": - if e.complexity.ReservesChange.Type == nil { + if e.ComplexityRoot.ReservesChange.Type == nil { break } - return e.complexity.ReservesChange.Type(childComplexity), true + return e.ComplexityRoot.ReservesChange.Type(childComplexity), true case "SACBalance.balance": - if e.complexity.SACBalance.Balance == nil { + if e.ComplexityRoot.SACBalance.Balance == nil { break } - return e.complexity.SACBalance.Balance(childComplexity), true - + return e.ComplexityRoot.SACBalance.Balance(childComplexity), true case "SACBalance.code": - if e.complexity.SACBalance.Code == nil { + if e.ComplexityRoot.SACBalance.Code == nil { break } - return e.complexity.SACBalance.Code(childComplexity), true - + return e.ComplexityRoot.SACBalance.Code(childComplexity), true case "SACBalance.decimals": - if e.complexity.SACBalance.Decimals == nil { + if e.ComplexityRoot.SACBalance.Decimals == nil { break } - return e.complexity.SACBalance.Decimals(childComplexity), true - + return e.ComplexityRoot.SACBalance.Decimals(childComplexity), true case "SACBalance.isAuthorized": - if e.complexity.SACBalance.IsAuthorized == nil { + if e.ComplexityRoot.SACBalance.IsAuthorized == nil { break } - return e.complexity.SACBalance.IsAuthorized(childComplexity), true - + return e.ComplexityRoot.SACBalance.IsAuthorized(childComplexity), true case "SACBalance.isClawbackEnabled": - if e.complexity.SACBalance.IsClawbackEnabled == nil { + if e.ComplexityRoot.SACBalance.IsClawbackEnabled == nil { break } - return e.complexity.SACBalance.IsClawbackEnabled(childComplexity), true - + return e.ComplexityRoot.SACBalance.IsClawbackEnabled(childComplexity), true case "SACBalance.issuer": - if e.complexity.SACBalance.Issuer == nil { + if e.ComplexityRoot.SACBalance.Issuer == nil { break } - return e.complexity.SACBalance.Issuer(childComplexity), true - + return e.ComplexityRoot.SACBalance.Issuer(childComplexity), true case "SACBalance.tokenId": - if e.complexity.SACBalance.TokenID == nil { + if e.ComplexityRoot.SACBalance.TokenID == nil { break } - return e.complexity.SACBalance.TokenID(childComplexity), true - + return e.ComplexityRoot.SACBalance.TokenID(childComplexity), true case "SACBalance.tokenType": - if e.complexity.SACBalance.TokenType == nil { + if e.ComplexityRoot.SACBalance.TokenType == nil { break } - return e.complexity.SACBalance.TokenType(childComplexity), true + return e.ComplexityRoot.SACBalance.TokenType(childComplexity), true case "SEP41Balance.balance": - if e.complexity.SEP41Balance.Balance == nil { + if e.ComplexityRoot.SEP41Balance.Balance == nil { break } - return e.complexity.SEP41Balance.Balance(childComplexity), true - + return e.ComplexityRoot.SEP41Balance.Balance(childComplexity), true case "SEP41Balance.decimals": - if e.complexity.SEP41Balance.Decimals == nil { + if e.ComplexityRoot.SEP41Balance.Decimals == nil { break } - return e.complexity.SEP41Balance.Decimals(childComplexity), true - + return e.ComplexityRoot.SEP41Balance.Decimals(childComplexity), true case "SEP41Balance.name": - if e.complexity.SEP41Balance.Name == nil { + if e.ComplexityRoot.SEP41Balance.Name == nil { break } - return e.complexity.SEP41Balance.Name(childComplexity), true - + return e.ComplexityRoot.SEP41Balance.Name(childComplexity), true case "SEP41Balance.symbol": - if e.complexity.SEP41Balance.Symbol == nil { + if e.ComplexityRoot.SEP41Balance.Symbol == nil { break } - return e.complexity.SEP41Balance.Symbol(childComplexity), true - + return e.ComplexityRoot.SEP41Balance.Symbol(childComplexity), true case "SEP41Balance.tokenId": - if e.complexity.SEP41Balance.TokenID == nil { + if e.ComplexityRoot.SEP41Balance.TokenID == nil { break } - return e.complexity.SEP41Balance.TokenID(childComplexity), true - + return e.ComplexityRoot.SEP41Balance.TokenID(childComplexity), true case "SEP41Balance.tokenType": - if e.complexity.SEP41Balance.TokenType == nil { + if e.ComplexityRoot.SEP41Balance.TokenType == nil { break } - return e.complexity.SEP41Balance.TokenType(childComplexity), true + return e.ComplexityRoot.SEP41Balance.TokenType(childComplexity), true case "SignerChange.account": - if e.complexity.SignerChange.Account == nil { + if e.ComplexityRoot.SignerChange.Account == nil { break } - return e.complexity.SignerChange.Account(childComplexity), true - + return e.ComplexityRoot.SignerChange.Account(childComplexity), true case "SignerChange.ingestedAt": - if e.complexity.SignerChange.IngestedAt == nil { + if e.ComplexityRoot.SignerChange.IngestedAt == nil { break } - return e.complexity.SignerChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.SignerChange.IngestedAt(childComplexity), true case "SignerChange.ledgerCreatedAt": - if e.complexity.SignerChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.SignerChange.LedgerCreatedAt == nil { break } - return e.complexity.SignerChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.SignerChange.LedgerCreatedAt(childComplexity), true case "SignerChange.ledgerNumber": - if e.complexity.SignerChange.LedgerNumber == nil { + if e.ComplexityRoot.SignerChange.LedgerNumber == nil { break } - return e.complexity.SignerChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.SignerChange.LedgerNumber(childComplexity), true case "SignerChange.operation": - if e.complexity.SignerChange.Operation == nil { + if e.ComplexityRoot.SignerChange.Operation == nil { break } - return e.complexity.SignerChange.Operation(childComplexity), true - + return e.ComplexityRoot.SignerChange.Operation(childComplexity), true case "SignerChange.reason": - if e.complexity.SignerChange.Reason == nil { + if e.ComplexityRoot.SignerChange.Reason == nil { break } - return e.complexity.SignerChange.Reason(childComplexity), true - + return e.ComplexityRoot.SignerChange.Reason(childComplexity), true case "SignerChange.signerAddress": - if e.complexity.SignerChange.SignerAddress == nil { + if e.ComplexityRoot.SignerChange.SignerAddress == nil { break } - return e.complexity.SignerChange.SignerAddress(childComplexity), true - + return e.ComplexityRoot.SignerChange.SignerAddress(childComplexity), true case "SignerChange.signerWeights": - if e.complexity.SignerChange.SignerWeights == nil { + if e.ComplexityRoot.SignerChange.SignerWeights == nil { break } - return e.complexity.SignerChange.SignerWeights(childComplexity), true - + return e.ComplexityRoot.SignerChange.SignerWeights(childComplexity), true case "SignerChange.transaction": - if e.complexity.SignerChange.Transaction == nil { + if e.ComplexityRoot.SignerChange.Transaction == nil { break } - return e.complexity.SignerChange.Transaction(childComplexity), true - + return e.ComplexityRoot.SignerChange.Transaction(childComplexity), true case "SignerChange.type": - if e.complexity.SignerChange.Type == nil { + if e.ComplexityRoot.SignerChange.Type == nil { break } - return e.complexity.SignerChange.Type(childComplexity), true + return e.ComplexityRoot.SignerChange.Type(childComplexity), true case "SignerThresholdsChange.account": - if e.complexity.SignerThresholdsChange.Account == nil { + if e.ComplexityRoot.SignerThresholdsChange.Account == nil { break } - return e.complexity.SignerThresholdsChange.Account(childComplexity), true - + return e.ComplexityRoot.SignerThresholdsChange.Account(childComplexity), true case "SignerThresholdsChange.ingestedAt": - if e.complexity.SignerThresholdsChange.IngestedAt == nil { + if e.ComplexityRoot.SignerThresholdsChange.IngestedAt == nil { break } - return e.complexity.SignerThresholdsChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.SignerThresholdsChange.IngestedAt(childComplexity), true case "SignerThresholdsChange.ledgerCreatedAt": - if e.complexity.SignerThresholdsChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.SignerThresholdsChange.LedgerCreatedAt == nil { break } - return e.complexity.SignerThresholdsChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.SignerThresholdsChange.LedgerCreatedAt(childComplexity), true case "SignerThresholdsChange.ledgerNumber": - if e.complexity.SignerThresholdsChange.LedgerNumber == nil { + if e.ComplexityRoot.SignerThresholdsChange.LedgerNumber == nil { break } - return e.complexity.SignerThresholdsChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.SignerThresholdsChange.LedgerNumber(childComplexity), true case "SignerThresholdsChange.operation": - if e.complexity.SignerThresholdsChange.Operation == nil { + if e.ComplexityRoot.SignerThresholdsChange.Operation == nil { break } - return e.complexity.SignerThresholdsChange.Operation(childComplexity), true - + return e.ComplexityRoot.SignerThresholdsChange.Operation(childComplexity), true case "SignerThresholdsChange.reason": - if e.complexity.SignerThresholdsChange.Reason == nil { + if e.ComplexityRoot.SignerThresholdsChange.Reason == nil { break } - return e.complexity.SignerThresholdsChange.Reason(childComplexity), true - + return e.ComplexityRoot.SignerThresholdsChange.Reason(childComplexity), true case "SignerThresholdsChange.thresholds": - if e.complexity.SignerThresholdsChange.Thresholds == nil { + if e.ComplexityRoot.SignerThresholdsChange.Thresholds == nil { break } - return e.complexity.SignerThresholdsChange.Thresholds(childComplexity), true - + return e.ComplexityRoot.SignerThresholdsChange.Thresholds(childComplexity), true case "SignerThresholdsChange.transaction": - if e.complexity.SignerThresholdsChange.Transaction == nil { + if e.ComplexityRoot.SignerThresholdsChange.Transaction == nil { break } - return e.complexity.SignerThresholdsChange.Transaction(childComplexity), true - + return e.ComplexityRoot.SignerThresholdsChange.Transaction(childComplexity), true case "SignerThresholdsChange.type": - if e.complexity.SignerThresholdsChange.Type == nil { + if e.ComplexityRoot.SignerThresholdsChange.Type == nil { break } - return e.complexity.SignerThresholdsChange.Type(childComplexity), true + return e.ComplexityRoot.SignerThresholdsChange.Type(childComplexity), true case "StandardBalanceChange.account": - if e.complexity.StandardBalanceChange.Account == nil { + if e.ComplexityRoot.StandardBalanceChange.Account == nil { break } - return e.complexity.StandardBalanceChange.Account(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.Account(childComplexity), true case "StandardBalanceChange.amount": - if e.complexity.StandardBalanceChange.Amount == nil { + if e.ComplexityRoot.StandardBalanceChange.Amount == nil { break } - return e.complexity.StandardBalanceChange.Amount(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.Amount(childComplexity), true case "StandardBalanceChange.ingestedAt": - if e.complexity.StandardBalanceChange.IngestedAt == nil { + if e.ComplexityRoot.StandardBalanceChange.IngestedAt == nil { break } - return e.complexity.StandardBalanceChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.IngestedAt(childComplexity), true case "StandardBalanceChange.ledgerCreatedAt": - if e.complexity.StandardBalanceChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.StandardBalanceChange.LedgerCreatedAt == nil { break } - return e.complexity.StandardBalanceChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.LedgerCreatedAt(childComplexity), true case "StandardBalanceChange.ledgerNumber": - if e.complexity.StandardBalanceChange.LedgerNumber == nil { + if e.ComplexityRoot.StandardBalanceChange.LedgerNumber == nil { break } - return e.complexity.StandardBalanceChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.LedgerNumber(childComplexity), true case "StandardBalanceChange.operation": - if e.complexity.StandardBalanceChange.Operation == nil { + if e.ComplexityRoot.StandardBalanceChange.Operation == nil { break } - return e.complexity.StandardBalanceChange.Operation(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.Operation(childComplexity), true case "StandardBalanceChange.reason": - if e.complexity.StandardBalanceChange.Reason == nil { + if e.ComplexityRoot.StandardBalanceChange.Reason == nil { break } - return e.complexity.StandardBalanceChange.Reason(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.Reason(childComplexity), true case "StandardBalanceChange.tokenId": - if e.complexity.StandardBalanceChange.TokenID == nil { + if e.ComplexityRoot.StandardBalanceChange.TokenID == nil { break } - return e.complexity.StandardBalanceChange.TokenID(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.TokenID(childComplexity), true case "StandardBalanceChange.transaction": - if e.complexity.StandardBalanceChange.Transaction == nil { + if e.ComplexityRoot.StandardBalanceChange.Transaction == nil { break } - return e.complexity.StandardBalanceChange.Transaction(childComplexity), true - + return e.ComplexityRoot.StandardBalanceChange.Transaction(childComplexity), true case "StandardBalanceChange.type": - if e.complexity.StandardBalanceChange.Type == nil { + if e.ComplexityRoot.StandardBalanceChange.Type == nil { break } - return e.complexity.StandardBalanceChange.Type(childComplexity), true + return e.ComplexityRoot.StandardBalanceChange.Type(childComplexity), true case "StateChangeConnection.edges": - if e.complexity.StateChangeConnection.Edges == nil { + if e.ComplexityRoot.StateChangeConnection.Edges == nil { break } - return e.complexity.StateChangeConnection.Edges(childComplexity), true - + return e.ComplexityRoot.StateChangeConnection.Edges(childComplexity), true case "StateChangeConnection.pageInfo": - if e.complexity.StateChangeConnection.PageInfo == nil { + if e.ComplexityRoot.StateChangeConnection.PageInfo == nil { break } - return e.complexity.StateChangeConnection.PageInfo(childComplexity), true + return e.ComplexityRoot.StateChangeConnection.PageInfo(childComplexity), true case "StateChangeEdge.cursor": - if e.complexity.StateChangeEdge.Cursor == nil { + if e.ComplexityRoot.StateChangeEdge.Cursor == nil { break } - return e.complexity.StateChangeEdge.Cursor(childComplexity), true - + return e.ComplexityRoot.StateChangeEdge.Cursor(childComplexity), true case "StateChangeEdge.node": - if e.complexity.StateChangeEdge.Node == nil { + if e.ComplexityRoot.StateChangeEdge.Node == nil { break } - return e.complexity.StateChangeEdge.Node(childComplexity), true + return e.ComplexityRoot.StateChangeEdge.Node(childComplexity), true case "Transaction.accounts": - if e.complexity.Transaction.Accounts == nil { + if e.ComplexityRoot.Transaction.Accounts == nil { break } - return e.complexity.Transaction.Accounts(childComplexity), true - + return e.ComplexityRoot.Transaction.Accounts(childComplexity), true case "Transaction.feeCharged": - if e.complexity.Transaction.FeeCharged == nil { + if e.ComplexityRoot.Transaction.FeeCharged == nil { break } - return e.complexity.Transaction.FeeCharged(childComplexity), true - + return e.ComplexityRoot.Transaction.FeeCharged(childComplexity), true case "Transaction.hash": - if e.complexity.Transaction.Hash == nil { + if e.ComplexityRoot.Transaction.Hash == nil { break } - return e.complexity.Transaction.Hash(childComplexity), true - + return e.ComplexityRoot.Transaction.Hash(childComplexity), true case "Transaction.ingestedAt": - if e.complexity.Transaction.IngestedAt == nil { + if e.ComplexityRoot.Transaction.IngestedAt == nil { break } - return e.complexity.Transaction.IngestedAt(childComplexity), true - + return e.ComplexityRoot.Transaction.IngestedAt(childComplexity), true case "Transaction.isFeeBump": - if e.complexity.Transaction.IsFeeBump == nil { + if e.ComplexityRoot.Transaction.IsFeeBump == nil { break } - return e.complexity.Transaction.IsFeeBump(childComplexity), true - + return e.ComplexityRoot.Transaction.IsFeeBump(childComplexity), true case "Transaction.ledgerCreatedAt": - if e.complexity.Transaction.LedgerCreatedAt == nil { + if e.ComplexityRoot.Transaction.LedgerCreatedAt == nil { break } - return e.complexity.Transaction.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.Transaction.LedgerCreatedAt(childComplexity), true case "Transaction.ledgerNumber": - if e.complexity.Transaction.LedgerNumber == nil { + if e.ComplexityRoot.Transaction.LedgerNumber == nil { break } - return e.complexity.Transaction.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.Transaction.LedgerNumber(childComplexity), true case "Transaction.operations": - if e.complexity.Transaction.Operations == nil { + if e.ComplexityRoot.Transaction.Operations == nil { break } @@ -1551,17 +1409,15 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Transaction.Operations(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true - + return e.ComplexityRoot.Transaction.Operations(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "Transaction.resultCode": - if e.complexity.Transaction.ResultCode == nil { + if e.ComplexityRoot.Transaction.ResultCode == nil { break } - return e.complexity.Transaction.ResultCode(childComplexity), true - + return e.ComplexityRoot.Transaction.ResultCode(childComplexity), true case "Transaction.stateChanges": - if e.complexity.Transaction.StateChanges == nil { + if e.ComplexityRoot.Transaction.StateChanges == nil { break } @@ -1570,196 +1426,173 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return 0, false } - return e.complexity.Transaction.StateChanges(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true + return e.ComplexityRoot.Transaction.StateChanges(childComplexity, args["first"].(*int32), args["after"].(*string), args["last"].(*int32), args["before"].(*string)), true case "TransactionConnection.edges": - if e.complexity.TransactionConnection.Edges == nil { + if e.ComplexityRoot.TransactionConnection.Edges == nil { break } - return e.complexity.TransactionConnection.Edges(childComplexity), true - + return e.ComplexityRoot.TransactionConnection.Edges(childComplexity), true case "TransactionConnection.pageInfo": - if e.complexity.TransactionConnection.PageInfo == nil { + if e.ComplexityRoot.TransactionConnection.PageInfo == nil { break } - return e.complexity.TransactionConnection.PageInfo(childComplexity), true + return e.ComplexityRoot.TransactionConnection.PageInfo(childComplexity), true case "TransactionEdge.cursor": - if e.complexity.TransactionEdge.Cursor == nil { + if e.ComplexityRoot.TransactionEdge.Cursor == nil { break } - return e.complexity.TransactionEdge.Cursor(childComplexity), true - + return e.ComplexityRoot.TransactionEdge.Cursor(childComplexity), true case "TransactionEdge.node": - if e.complexity.TransactionEdge.Node == nil { + if e.ComplexityRoot.TransactionEdge.Node == nil { break } - return e.complexity.TransactionEdge.Node(childComplexity), true + return e.ComplexityRoot.TransactionEdge.Node(childComplexity), true case "TrustlineBalance.balance": - if e.complexity.TrustlineBalance.Balance == nil { + if e.ComplexityRoot.TrustlineBalance.Balance == nil { break } - return e.complexity.TrustlineBalance.Balance(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.Balance(childComplexity), true case "TrustlineBalance.buyingLiabilities": - if e.complexity.TrustlineBalance.BuyingLiabilities == nil { + if e.ComplexityRoot.TrustlineBalance.BuyingLiabilities == nil { break } - return e.complexity.TrustlineBalance.BuyingLiabilities(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.BuyingLiabilities(childComplexity), true case "TrustlineBalance.code": - if e.complexity.TrustlineBalance.Code == nil { + if e.ComplexityRoot.TrustlineBalance.Code == nil { break } - return e.complexity.TrustlineBalance.Code(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.Code(childComplexity), true case "TrustlineBalance.isAuthorized": - if e.complexity.TrustlineBalance.IsAuthorized == nil { + if e.ComplexityRoot.TrustlineBalance.IsAuthorized == nil { break } - return e.complexity.TrustlineBalance.IsAuthorized(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.IsAuthorized(childComplexity), true case "TrustlineBalance.isAuthorizedToMaintainLiabilities": - if e.complexity.TrustlineBalance.IsAuthorizedToMaintainLiabilities == nil { + if e.ComplexityRoot.TrustlineBalance.IsAuthorizedToMaintainLiabilities == nil { break } - return e.complexity.TrustlineBalance.IsAuthorizedToMaintainLiabilities(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.IsAuthorizedToMaintainLiabilities(childComplexity), true case "TrustlineBalance.issuer": - if e.complexity.TrustlineBalance.Issuer == nil { + if e.ComplexityRoot.TrustlineBalance.Issuer == nil { break } - return e.complexity.TrustlineBalance.Issuer(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.Issuer(childComplexity), true case "TrustlineBalance.lastModifiedLedger": - if e.complexity.TrustlineBalance.LastModifiedLedger == nil { + if e.ComplexityRoot.TrustlineBalance.LastModifiedLedger == nil { break } - return e.complexity.TrustlineBalance.LastModifiedLedger(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.LastModifiedLedger(childComplexity), true case "TrustlineBalance.limit": - if e.complexity.TrustlineBalance.Limit == nil { + if e.ComplexityRoot.TrustlineBalance.Limit == nil { break } - return e.complexity.TrustlineBalance.Limit(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.Limit(childComplexity), true case "TrustlineBalance.sellingLiabilities": - if e.complexity.TrustlineBalance.SellingLiabilities == nil { + if e.ComplexityRoot.TrustlineBalance.SellingLiabilities == nil { break } - return e.complexity.TrustlineBalance.SellingLiabilities(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.SellingLiabilities(childComplexity), true case "TrustlineBalance.tokenId": - if e.complexity.TrustlineBalance.TokenID == nil { + if e.ComplexityRoot.TrustlineBalance.TokenID == nil { break } - return e.complexity.TrustlineBalance.TokenID(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.TokenID(childComplexity), true case "TrustlineBalance.tokenType": - if e.complexity.TrustlineBalance.TokenType == nil { + if e.ComplexityRoot.TrustlineBalance.TokenType == nil { break } - return e.complexity.TrustlineBalance.TokenType(childComplexity), true - + return e.ComplexityRoot.TrustlineBalance.TokenType(childComplexity), true case "TrustlineBalance.type": - if e.complexity.TrustlineBalance.Type == nil { + if e.ComplexityRoot.TrustlineBalance.Type == nil { break } - return e.complexity.TrustlineBalance.Type(childComplexity), true + return e.ComplexityRoot.TrustlineBalance.Type(childComplexity), true case "TrustlineChange.account": - if e.complexity.TrustlineChange.Account == nil { + if e.ComplexityRoot.TrustlineChange.Account == nil { break } - return e.complexity.TrustlineChange.Account(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.Account(childComplexity), true case "TrustlineChange.ingestedAt": - if e.complexity.TrustlineChange.IngestedAt == nil { + if e.ComplexityRoot.TrustlineChange.IngestedAt == nil { break } - return e.complexity.TrustlineChange.IngestedAt(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.IngestedAt(childComplexity), true case "TrustlineChange.ledgerCreatedAt": - if e.complexity.TrustlineChange.LedgerCreatedAt == nil { + if e.ComplexityRoot.TrustlineChange.LedgerCreatedAt == nil { break } - return e.complexity.TrustlineChange.LedgerCreatedAt(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.LedgerCreatedAt(childComplexity), true case "TrustlineChange.ledgerNumber": - if e.complexity.TrustlineChange.LedgerNumber == nil { + if e.ComplexityRoot.TrustlineChange.LedgerNumber == nil { break } - return e.complexity.TrustlineChange.LedgerNumber(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.LedgerNumber(childComplexity), true case "TrustlineChange.limit": - if e.complexity.TrustlineChange.Limit == nil { + if e.ComplexityRoot.TrustlineChange.Limit == nil { break } - return e.complexity.TrustlineChange.Limit(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.Limit(childComplexity), true case "TrustlineChange.liquidityPoolId": - if e.complexity.TrustlineChange.LiquidityPoolID == nil { + if e.ComplexityRoot.TrustlineChange.LiquidityPoolID == nil { break } - return e.complexity.TrustlineChange.LiquidityPoolID(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.LiquidityPoolID(childComplexity), true case "TrustlineChange.operation": - if e.complexity.TrustlineChange.Operation == nil { + if e.ComplexityRoot.TrustlineChange.Operation == nil { break } - return e.complexity.TrustlineChange.Operation(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.Operation(childComplexity), true case "TrustlineChange.reason": - if e.complexity.TrustlineChange.Reason == nil { + if e.ComplexityRoot.TrustlineChange.Reason == nil { break } - return e.complexity.TrustlineChange.Reason(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.Reason(childComplexity), true case "TrustlineChange.tokenId": - if e.complexity.TrustlineChange.TokenID == nil { + if e.ComplexityRoot.TrustlineChange.TokenID == nil { break } - return e.complexity.TrustlineChange.TokenID(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.TokenID(childComplexity), true case "TrustlineChange.transaction": - if e.complexity.TrustlineChange.Transaction == nil { + if e.ComplexityRoot.TrustlineChange.Transaction == nil { break } - return e.complexity.TrustlineChange.Transaction(childComplexity), true - + return e.ComplexityRoot.TrustlineChange.Transaction(childComplexity), true case "TrustlineChange.type": - if e.complexity.TrustlineChange.Type == nil { + if e.ComplexityRoot.TrustlineChange.Type == nil { break } - return e.complexity.TrustlineChange.Type(childComplexity), true + return e.ComplexityRoot.TrustlineChange.Type(childComplexity), true } return 0, false @@ -1767,7 +1600,7 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { opCtx := graphql.GetOperationContext(ctx) - ec := executionContext{opCtx, e, 0, 0, make(chan graphql.DeferredResult)} + ec := newExecutionContext(opCtx, e, make(chan graphql.DeferredResult)) inputUnmarshalMap := graphql.BuildUnmarshalerMap( ec.unmarshalInputAccountStateChangeFilterInput, ) @@ -1783,9 +1616,9 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) data = ec._Query(ctx, opCtx.Operation.SelectionSet) } else { - if atomic.LoadInt32(&ec.pendingDeferred) > 0 { - result := <-ec.deferredResults - atomic.AddInt32(&ec.pendingDeferred, -1) + if atomic.LoadInt32(&ec.PendingDeferred) > 0 { + result := <-ec.DeferredResults + atomic.AddInt32(&ec.PendingDeferred, -1) data = result.Result response.Path = result.Path response.Label = result.Label @@ -1797,8 +1630,8 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { var buf bytes.Buffer data.MarshalGQL(&buf) response.Data = buf.Bytes() - if atomic.LoadInt32(&ec.deferred) > 0 { - hasNext := atomic.LoadInt32(&ec.pendingDeferred) > 0 + if atomic.LoadInt32(&ec.Deferred) > 0 { + hasNext := atomic.LoadInt32(&ec.PendingDeferred) > 0 response.HasNext = &hasNext } @@ -1811,44 +1644,22 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { } type executionContext struct { - *graphql.OperationContext - *executableSchema - deferred int32 - pendingDeferred int32 - deferredResults chan graphql.DeferredResult -} - -func (ec *executionContext) processDeferredGroup(dg graphql.DeferredGroup) { - atomic.AddInt32(&ec.pendingDeferred, 1) - go func() { - ctx := graphql.WithFreshResponseContext(dg.Context) - dg.FieldSet.Dispatch(ctx) - ds := graphql.DeferredResult{ - Path: dg.Path, - Label: dg.Label, - Result: dg.FieldSet, - Errors: graphql.GetErrors(ctx), - } - // null fields should bubble up - if dg.FieldSet.Invalids > 0 { - ds.Result = graphql.Null - } - ec.deferredResults <- ds - }() -} - -func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { - if ec.DisableIntrospection { - return nil, errors.New("introspection disabled") - } - return introspection.WrapSchema(ec.Schema()), nil + *graphql.ExecutionContextState[ResolverRoot, DirectiveRoot, ComplexityRoot] } -func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { - if ec.DisableIntrospection { - return nil, errors.New("introspection disabled") +func newExecutionContext( + opCtx *graphql.OperationContext, + execSchema *executableSchema, + deferredResults chan graphql.DeferredResult, +) executionContext { + return executionContext{ + ExecutionContextState: graphql.NewExecutionContextState[ResolverRoot, DirectiveRoot, ComplexityRoot]( + opCtx, + (*graphql.ExecutableSchemaState[ResolverRoot, DirectiveRoot, ComplexityRoot])(execSchema), + parsedSchema, + deferredResults, + ), } - return introspection.WrapTypeFromDef(ec.Schema(), ec.Schema().Types[name]), nil } var sources = []*ast.Source{ @@ -2341,1082 +2152,385 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) func (ec *executionContext) field_Account_balances_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Account_balances_argsFirst(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg0 - arg1, err := ec.field_Account_balances_argsAfter(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg1 - arg2, err := ec.field_Account_balances_argsLast(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg2 - arg3, err := ec.field_Account_balances_argsBefore(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg3 return args, nil } -func (ec *executionContext) field_Account_balances_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Account_balances_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Account_balances_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Account_balances_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Account_operations_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Account_operations_argsSince(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "since", ec.unmarshalOTime2ᚖtimeᚐTime) if err != nil { return nil, err } args["since"] = arg0 - arg1, err := ec.field_Account_operations_argsUntil(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "until", ec.unmarshalOTime2ᚖtimeᚐTime) if err != nil { return nil, err } args["until"] = arg1 - arg2, err := ec.field_Account_operations_argsFirst(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg2 - arg3, err := ec.field_Account_operations_argsAfter(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg3 - arg4, err := ec.field_Account_operations_argsLast(ctx, rawArgs) + arg4, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg4 - arg5, err := ec.field_Account_operations_argsBefore(ctx, rawArgs) + arg5, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg5 return args, nil } -func (ec *executionContext) field_Account_operations_argsSince( - ctx context.Context, - rawArgs map[string]any, -) (*time.Time, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("since")) - if tmp, ok := rawArgs["since"]; ok { - return ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp) - } - - var zeroVal *time.Time - return zeroVal, nil -} - -func (ec *executionContext) field_Account_operations_argsUntil( - ctx context.Context, - rawArgs map[string]any, -) (*time.Time, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("until")) - if tmp, ok := rawArgs["until"]; ok { - return ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp) - } - - var zeroVal *time.Time - return zeroVal, nil -} - -func (ec *executionContext) field_Account_operations_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Account_operations_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Account_operations_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Account_operations_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Account_stateChanges_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Account_stateChanges_argsFilter(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "filter", ec.unmarshalOAccountStateChangeFilterInput2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐAccountStateChangeFilterInput) if err != nil { return nil, err } args["filter"] = arg0 - arg1, err := ec.field_Account_stateChanges_argsSince(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "since", ec.unmarshalOTime2ᚖtimeᚐTime) if err != nil { return nil, err } args["since"] = arg1 - arg2, err := ec.field_Account_stateChanges_argsUntil(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "until", ec.unmarshalOTime2ᚖtimeᚐTime) if err != nil { return nil, err } args["until"] = arg2 - arg3, err := ec.field_Account_stateChanges_argsFirst(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg3 - arg4, err := ec.field_Account_stateChanges_argsAfter(ctx, rawArgs) + arg4, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg4 - arg5, err := ec.field_Account_stateChanges_argsLast(ctx, rawArgs) + arg5, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg5 - arg6, err := ec.field_Account_stateChanges_argsBefore(ctx, rawArgs) + arg6, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg6 return args, nil } -func (ec *executionContext) field_Account_stateChanges_argsFilter( - ctx context.Context, - rawArgs map[string]any, -) (*AccountStateChangeFilterInput, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) - if tmp, ok := rawArgs["filter"]; ok { - return ec.unmarshalOAccountStateChangeFilterInput2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐAccountStateChangeFilterInput(ctx, tmp) - } - - var zeroVal *AccountStateChangeFilterInput - return zeroVal, nil -} - -func (ec *executionContext) field_Account_stateChanges_argsSince( - ctx context.Context, - rawArgs map[string]any, -) (*time.Time, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("since")) - if tmp, ok := rawArgs["since"]; ok { - return ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp) - } - - var zeroVal *time.Time - return zeroVal, nil -} - -func (ec *executionContext) field_Account_stateChanges_argsUntil( - ctx context.Context, - rawArgs map[string]any, -) (*time.Time, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("until")) - if tmp, ok := rawArgs["until"]; ok { - return ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp) - } - - var zeroVal *time.Time - return zeroVal, nil -} - -func (ec *executionContext) field_Account_stateChanges_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Account_stateChanges_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Account_stateChanges_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Account_stateChanges_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Account_transactions_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Account_transactions_argsSince(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "since", ec.unmarshalOTime2ᚖtimeᚐTime) if err != nil { return nil, err } args["since"] = arg0 - arg1, err := ec.field_Account_transactions_argsUntil(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "until", ec.unmarshalOTime2ᚖtimeᚐTime) if err != nil { return nil, err } args["until"] = arg1 - arg2, err := ec.field_Account_transactions_argsFirst(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg2 - arg3, err := ec.field_Account_transactions_argsAfter(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg3 - arg4, err := ec.field_Account_transactions_argsLast(ctx, rawArgs) + arg4, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg4 - arg5, err := ec.field_Account_transactions_argsBefore(ctx, rawArgs) + arg5, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg5 return args, nil } -func (ec *executionContext) field_Account_transactions_argsSince( - ctx context.Context, - rawArgs map[string]any, -) (*time.Time, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("since")) - if tmp, ok := rawArgs["since"]; ok { - return ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp) - } - - var zeroVal *time.Time - return zeroVal, nil -} - -func (ec *executionContext) field_Account_transactions_argsUntil( - ctx context.Context, - rawArgs map[string]any, -) (*time.Time, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("until")) - if tmp, ok := rawArgs["until"]; ok { - return ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp) - } - - var zeroVal *time.Time - return zeroVal, nil -} - -func (ec *executionContext) field_Account_transactions_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Account_transactions_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Account_transactions_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Account_transactions_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Operation_stateChanges_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Operation_stateChanges_argsFirst(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg0 - arg1, err := ec.field_Operation_stateChanges_argsAfter(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg1 - arg2, err := ec.field_Operation_stateChanges_argsLast(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg2 - arg3, err := ec.field_Operation_stateChanges_argsBefore(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg3 return args, nil } -func (ec *executionContext) field_Operation_stateChanges_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Operation_stateChanges_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Operation_stateChanges_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Operation_stateChanges_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query___type_argsName(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "name", ec.unmarshalNString2string) if err != nil { return nil, err } args["name"] = arg0 return args, nil } -func (ec *executionContext) field_Query___type_argsName( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - if tmp, ok := rawArgs["name"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Query_accountByAddress_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_accountByAddress_argsAddress(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "address", ec.unmarshalNString2string) if err != nil { return nil, err } args["address"] = arg0 return args, nil } -func (ec *executionContext) field_Query_accountByAddress_argsAddress( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("address")) - if tmp, ok := rawArgs["address"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Query_operationById_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_operationById_argsID(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNInt642int64) if err != nil { return nil, err } args["id"] = arg0 return args, nil } -func (ec *executionContext) field_Query_operationById_argsID( - ctx context.Context, - rawArgs map[string]any, -) (int64, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - if tmp, ok := rawArgs["id"]; ok { - return ec.unmarshalNInt642int64(ctx, tmp) - } - - var zeroVal int64 - return zeroVal, nil -} func (ec *executionContext) field_Query_operations_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_operations_argsFirst(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg0 - arg1, err := ec.field_Query_operations_argsAfter(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg1 - arg2, err := ec.field_Query_operations_argsLast(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg2 - arg3, err := ec.field_Query_operations_argsBefore(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg3 return args, nil } -func (ec *executionContext) field_Query_operations_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Query_operations_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Query_operations_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Query_operations_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Query_stateChanges_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_stateChanges_argsFirst(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg0 - arg1, err := ec.field_Query_stateChanges_argsAfter(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg1 - arg2, err := ec.field_Query_stateChanges_argsLast(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg2 - arg3, err := ec.field_Query_stateChanges_argsBefore(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg3 return args, nil } -func (ec *executionContext) field_Query_stateChanges_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Query_stateChanges_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Query_stateChanges_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Query_stateChanges_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Query_transactionByHash_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_transactionByHash_argsHash(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "hash", ec.unmarshalNString2string) if err != nil { return nil, err } args["hash"] = arg0 return args, nil } -func (ec *executionContext) field_Query_transactionByHash_argsHash( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("hash")) - if tmp, ok := rawArgs["hash"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Query_transactions_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_transactions_argsFirst(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg0 - arg1, err := ec.field_Query_transactions_argsAfter(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg1 - arg2, err := ec.field_Query_transactions_argsLast(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg2 - arg3, err := ec.field_Query_transactions_argsBefore(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg3 return args, nil } -func (ec *executionContext) field_Query_transactions_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Query_transactions_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Query_transactions_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Query_transactions_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Transaction_operations_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Transaction_operations_argsFirst(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg0 - arg1, err := ec.field_Transaction_operations_argsAfter(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg1 - arg2, err := ec.field_Transaction_operations_argsLast(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg2 - arg3, err := ec.field_Transaction_operations_argsBefore(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg3 return args, nil } -func (ec *executionContext) field_Transaction_operations_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Transaction_operations_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Transaction_operations_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Transaction_operations_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field_Transaction_stateChanges_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Transaction_stateChanges_argsFirst(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["first"] = arg0 - arg1, err := ec.field_Transaction_stateChanges_argsAfter(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["after"] = arg1 - arg2, err := ec.field_Transaction_stateChanges_argsLast(ctx, rawArgs) + arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", ec.unmarshalOInt2ᚖint32) if err != nil { return nil, err } args["last"] = arg2 - arg3, err := ec.field_Transaction_stateChanges_argsBefore(ctx, rawArgs) + arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["before"] = arg3 return args, nil } -func (ec *executionContext) field_Transaction_stateChanges_argsFirst( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) - if tmp, ok := rawArgs["first"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Transaction_stateChanges_argsAfter( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) - if tmp, ok := rawArgs["after"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Transaction_stateChanges_argsLast( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) - if tmp, ok := rawArgs["last"]; ok { - return ec.unmarshalOInt2ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} - -func (ec *executionContext) field_Transaction_stateChanges_argsBefore( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) - if tmp, ok := rawArgs["before"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} func (ec *executionContext) field___Directive_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field___Directive_args_argsIncludeDeprecated(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2ᚖbool) if err != nil { return nil, err } args["includeDeprecated"] = arg0 return args, nil } -func (ec *executionContext) field___Directive_args_argsIncludeDeprecated( - ctx context.Context, - rawArgs map[string]any, -) (*bool, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - if tmp, ok := rawArgs["includeDeprecated"]; ok { - return ec.unmarshalOBoolean2ᚖbool(ctx, tmp) - } - - var zeroVal *bool - return zeroVal, nil -} func (ec *executionContext) field___Field_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field___Field_args_argsIncludeDeprecated(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2ᚖbool) if err != nil { return nil, err } args["includeDeprecated"] = arg0 return args, nil } -func (ec *executionContext) field___Field_args_argsIncludeDeprecated( - ctx context.Context, - rawArgs map[string]any, -) (*bool, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - if tmp, ok := rawArgs["includeDeprecated"]; ok { - return ec.unmarshalOBoolean2ᚖbool(ctx, tmp) - } - - var zeroVal *bool - return zeroVal, nil -} func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field___Type_enumValues_argsIncludeDeprecated(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2bool) if err != nil { return nil, err } args["includeDeprecated"] = arg0 return args, nil } -func (ec *executionContext) field___Type_enumValues_argsIncludeDeprecated( - ctx context.Context, - rawArgs map[string]any, -) (bool, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - if tmp, ok := rawArgs["includeDeprecated"]; ok { - return ec.unmarshalOBoolean2bool(ctx, tmp) - } - - var zeroVal bool - return zeroVal, nil -} func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field___Type_fields_argsIncludeDeprecated(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2bool) if err != nil { return nil, err } args["includeDeprecated"] = arg0 return args, nil } -func (ec *executionContext) field___Type_fields_argsIncludeDeprecated( - ctx context.Context, - rawArgs map[string]any, -) (bool, error) { - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - if tmp, ok := rawArgs["includeDeprecated"]; ok { - return ec.unmarshalOBoolean2bool(ctx, tmp) - } - - var zeroVal bool - return zeroVal, nil -} // endregion ***************************** args.gotpl ***************************** @@ -3427,34 +2541,19 @@ func (ec *executionContext) field___Type_fields_argsIncludeDeprecated( // region **************************** field.gotpl ***************************** func (ec *executionContext) _Account_address(ctx context.Context, field graphql.CollectedField, obj *types.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Account_address(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Account().Address(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Account_address, + func(ctx context.Context) (any, error) { + return ec.Resolvers.Account().Address(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_Account_address(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3471,34 +2570,20 @@ func (ec *executionContext) fieldContext_Account_address(_ context.Context, fiel } func (ec *executionContext) _Account_balances(ctx context.Context, field graphql.CollectedField, obj *types.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Account_balances(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Account().Balances(rctx, obj, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*BalanceConnection) - fc.Result = res - return ec.marshalNBalanceConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Account_balances, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Account().Balances(ctx, obj, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalNBalanceConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceConnection, + true, + true, + ) } func (ec *executionContext) fieldContext_Account_balances(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3532,31 +2617,20 @@ func (ec *executionContext) fieldContext_Account_balances(ctx context.Context, f } func (ec *executionContext) _Account_transactions(ctx context.Context, field graphql.CollectedField, obj *types.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Account_transactions(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Account().Transactions(rctx, obj, fc.Args["since"].(*time.Time), fc.Args["until"].(*time.Time), fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*TransactionConnection) - fc.Result = res - return ec.marshalOTransactionConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Account_transactions, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Account().Transactions(ctx, obj, fc.Args["since"].(*time.Time), fc.Args["until"].(*time.Time), fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOTransactionConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Account_transactions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3590,31 +2664,20 @@ func (ec *executionContext) fieldContext_Account_transactions(ctx context.Contex } func (ec *executionContext) _Account_operations(ctx context.Context, field graphql.CollectedField, obj *types.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Account_operations(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Account().Operations(rctx, obj, fc.Args["since"].(*time.Time), fc.Args["until"].(*time.Time), fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*OperationConnection) - fc.Result = res - return ec.marshalOOperationConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Account_operations, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Account().Operations(ctx, obj, fc.Args["since"].(*time.Time), fc.Args["until"].(*time.Time), fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOOperationConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Account_operations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3648,31 +2711,20 @@ func (ec *executionContext) fieldContext_Account_operations(ctx context.Context, } func (ec *executionContext) _Account_stateChanges(ctx context.Context, field graphql.CollectedField, obj *types.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Account_stateChanges(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Account().StateChanges(rctx, obj, fc.Args["filter"].(*AccountStateChangeFilterInput), fc.Args["since"].(*time.Time), fc.Args["until"].(*time.Time), fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*StateChangeConnection) - fc.Result = res - return ec.marshalOStateChangeConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Account_stateChanges, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Account().StateChanges(ctx, obj, fc.Args["filter"].(*AccountStateChangeFilterInput), fc.Args["since"].(*time.Time), fc.Args["until"].(*time.Time), fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOStateChangeConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Account_stateChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3706,34 +2758,19 @@ func (ec *executionContext) fieldContext_Account_stateChanges(ctx context.Contex } func (ec *executionContext) _AccountChange_type(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.AccountChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_AccountChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3750,34 +2787,19 @@ func (ec *executionContext) fieldContext_AccountChange_type(_ context.Context, f } func (ec *executionContext) _AccountChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.AccountChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_AccountChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3794,34 +2816,19 @@ func (ec *executionContext) fieldContext_AccountChange_reason(_ context.Context, } func (ec *executionContext) _AccountChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_AccountChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3838,78 +2845,48 @@ func (ec *executionContext) fieldContext_AccountChange_ingestedAt(_ context.Cont } func (ec *executionContext) _AccountChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_AccountChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "AccountChange", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_AccountChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountChange", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Time does not have child fields") + }, } return fc, nil } func (ec *executionContext) _AccountChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_AccountChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3926,34 +2903,19 @@ func (ec *executionContext) fieldContext_AccountChange_ledgerNumber(_ context.Co } func (ec *executionContext) _AccountChange_account(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.AccountChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_AccountChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3982,31 +2944,19 @@ func (ec *executionContext) fieldContext_AccountChange_account(_ context.Context } func (ec *executionContext) _AccountChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.AccountChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_AccountChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4047,34 +2997,19 @@ func (ec *executionContext) fieldContext_AccountChange_operation(_ context.Conte } func (ec *executionContext) _AccountChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.AccountChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_AccountChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4113,31 +3048,19 @@ func (ec *executionContext) fieldContext_AccountChange_transaction(_ context.Con } func (ec *executionContext) _AccountChange_funderAddress(ctx context.Context, field graphql.CollectedField, obj *types.AccountStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountChange_funderAddress(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountChange().FunderAddress(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_AccountChange_funderAddress, + func(ctx context.Context) (any, error) { + return ec.Resolvers.AccountChange().FunderAddress(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_AccountChange_funderAddress(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4154,34 +3077,19 @@ func (ec *executionContext) fieldContext_AccountChange_funderAddress(_ context.C } func (ec *executionContext) _BalanceAuthorizationChange_type(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.BalanceAuthorizationChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.BalanceAuthorizationChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4198,34 +3106,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_type(_ conte } func (ec *executionContext) _BalanceAuthorizationChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.BalanceAuthorizationChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.BalanceAuthorizationChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4242,34 +3135,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_reason(_ con } func (ec *executionContext) _BalanceAuthorizationChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4286,34 +3164,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_ingestedAt(_ } func (ec *executionContext) _BalanceAuthorizationChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4330,34 +3193,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_ledgerCreate } func (ec *executionContext) _BalanceAuthorizationChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4374,34 +3222,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_ledgerNumber } func (ec *executionContext) _BalanceAuthorizationChange_account(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.BalanceAuthorizationChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.BalanceAuthorizationChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4430,31 +3263,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_account(_ co } func (ec *executionContext) _BalanceAuthorizationChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.BalanceAuthorizationChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.BalanceAuthorizationChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4495,34 +3316,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_operation(_ } func (ec *executionContext) _BalanceAuthorizationChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.BalanceAuthorizationChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.BalanceAuthorizationChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4561,72 +3367,48 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_transaction( } func (ec *executionContext) _BalanceAuthorizationChange_tokenId(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_tokenId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.BalanceAuthorizationChange().TokenID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_BalanceAuthorizationChange_tokenId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "BalanceAuthorizationChange", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_tokenId, + func(ctx context.Context) (any, error) { + return ec.Resolvers.BalanceAuthorizationChange().TokenID(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_BalanceAuthorizationChange_tokenId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "BalanceAuthorizationChange", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } return fc, nil } func (ec *executionContext) _BalanceAuthorizationChange_liquidityPoolId(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_liquidityPoolId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.BalanceAuthorizationChange().LiquidityPoolID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_liquidityPoolId, + func(ctx context.Context) (any, error) { + return ec.Resolvers.BalanceAuthorizationChange().LiquidityPoolID(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_liquidityPoolId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4643,34 +3425,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_liquidityPoo } func (ec *executionContext) _BalanceAuthorizationChange_flags(ctx context.Context, field graphql.CollectedField, obj *types.BalanceAuthorizationStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceAuthorizationChange_flags(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.BalanceAuthorizationChange().Flags(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]string) - fc.Result = res - return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceAuthorizationChange_flags, + func(ctx context.Context) (any, error) { + return ec.Resolvers.BalanceAuthorizationChange().Flags(ctx, obj) + }, + nil, + ec.marshalNString2ᚕstringᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceAuthorizationChange_flags(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4687,34 +3454,19 @@ func (ec *executionContext) fieldContext_BalanceAuthorizationChange_flags(_ cont } func (ec *executionContext) _BalanceConnection_edges(ctx context.Context, field graphql.CollectedField, obj *BalanceConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceConnection_edges(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Edges, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]*BalanceEdge) - fc.Result = res - return ec.marshalNBalanceEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceEdgeᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceConnection_edges, + func(ctx context.Context) (any, error) { + return obj.Edges, nil + }, + nil, + ec.marshalNBalanceEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceEdgeᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4737,34 +3489,19 @@ func (ec *executionContext) fieldContext_BalanceConnection_edges(_ context.Conte } func (ec *executionContext) _BalanceConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *BalanceConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceConnection_pageInfo(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*PageInfo) - fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceConnection_pageInfo, + func(ctx context.Context) (any, error) { + return obj.PageInfo, nil + }, + nil, + ec.marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4791,34 +3528,19 @@ func (ec *executionContext) fieldContext_BalanceConnection_pageInfo(_ context.Co } func (ec *executionContext) _BalanceEdge_node(ctx context.Context, field graphql.CollectedField, obj *BalanceEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceEdge_node(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Node, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(Balance) - fc.Result = res - return ec.marshalNBalance2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalance(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceEdge_node, + func(ctx context.Context) (any, error) { + return obj.Node, nil + }, + nil, + ec.marshalNBalance2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalance, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4835,34 +3557,19 @@ func (ec *executionContext) fieldContext_BalanceEdge_node(_ context.Context, fie } func (ec *executionContext) _BalanceEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *BalanceEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BalanceEdge_cursor(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_BalanceEdge_cursor, + func(ctx context.Context) (any, error) { + return obj.Cursor, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_BalanceEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4879,34 +3586,19 @@ func (ec *executionContext) fieldContext_BalanceEdge_cursor(_ context.Context, f } func (ec *executionContext) _FlagsChange_type(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.FlagsChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.FlagsChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_FlagsChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4923,34 +3615,19 @@ func (ec *executionContext) fieldContext_FlagsChange_type(_ context.Context, fie } func (ec *executionContext) _FlagsChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.FlagsChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.FlagsChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_FlagsChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -4967,34 +3644,19 @@ func (ec *executionContext) fieldContext_FlagsChange_reason(_ context.Context, f } func (ec *executionContext) _FlagsChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_FlagsChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5011,34 +3673,19 @@ func (ec *executionContext) fieldContext_FlagsChange_ingestedAt(_ context.Contex } func (ec *executionContext) _FlagsChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_FlagsChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5055,34 +3702,19 @@ func (ec *executionContext) fieldContext_FlagsChange_ledgerCreatedAt(_ context.C } func (ec *executionContext) _FlagsChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_FlagsChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5099,34 +3731,19 @@ func (ec *executionContext) fieldContext_FlagsChange_ledgerNumber(_ context.Cont } func (ec *executionContext) _FlagsChange_account(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.FlagsChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.FlagsChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_FlagsChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5155,31 +3772,19 @@ func (ec *executionContext) fieldContext_FlagsChange_account(_ context.Context, } func (ec *executionContext) _FlagsChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.FlagsChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.FlagsChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_FlagsChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5220,34 +3825,19 @@ func (ec *executionContext) fieldContext_FlagsChange_operation(_ context.Context } func (ec *executionContext) _FlagsChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.FlagsChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.FlagsChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_FlagsChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5286,34 +3876,19 @@ func (ec *executionContext) fieldContext_FlagsChange_transaction(_ context.Conte } func (ec *executionContext) _FlagsChange_flags(ctx context.Context, field graphql.CollectedField, obj *types.FlagsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FlagsChange_flags(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.FlagsChange().Flags(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]string) - fc.Result = res - return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FlagsChange_flags, + func(ctx context.Context) (any, error) { + return ec.Resolvers.FlagsChange().Flags(ctx, obj) + }, + nil, + ec.marshalNString2ᚕstringᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_FlagsChange_flags(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5330,34 +3905,19 @@ func (ec *executionContext) fieldContext_FlagsChange_flags(_ context.Context, fi } func (ec *executionContext) _MetadataChange_type(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.MetadataChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.MetadataChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_MetadataChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5374,34 +3934,19 @@ func (ec *executionContext) fieldContext_MetadataChange_type(_ context.Context, } func (ec *executionContext) _MetadataChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.MetadataChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.MetadataChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_MetadataChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5418,34 +3963,19 @@ func (ec *executionContext) fieldContext_MetadataChange_reason(_ context.Context } func (ec *executionContext) _MetadataChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_MetadataChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5462,34 +3992,19 @@ func (ec *executionContext) fieldContext_MetadataChange_ingestedAt(_ context.Con } func (ec *executionContext) _MetadataChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_MetadataChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5506,34 +4021,19 @@ func (ec *executionContext) fieldContext_MetadataChange_ledgerCreatedAt(_ contex } func (ec *executionContext) _MetadataChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_MetadataChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5550,34 +4050,19 @@ func (ec *executionContext) fieldContext_MetadataChange_ledgerNumber(_ context.C } func (ec *executionContext) _MetadataChange_account(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.MetadataChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.MetadataChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_MetadataChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5606,31 +4091,19 @@ func (ec *executionContext) fieldContext_MetadataChange_account(_ context.Contex } func (ec *executionContext) _MetadataChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.MetadataChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.MetadataChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_MetadataChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5671,34 +4144,19 @@ func (ec *executionContext) fieldContext_MetadataChange_operation(_ context.Cont } func (ec *executionContext) _MetadataChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.MetadataChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.MetadataChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_MetadataChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5737,34 +4195,19 @@ func (ec *executionContext) fieldContext_MetadataChange_transaction(_ context.Co } func (ec *executionContext) _MetadataChange_keyValue(ctx context.Context, field graphql.CollectedField, obj *types.MetadataStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MetadataChange_keyValue(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.MetadataChange().KeyValue(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_MetadataChange_keyValue, + func(ctx context.Context) (any, error) { + return ec.Resolvers.MetadataChange().KeyValue(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_MetadataChange_keyValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5781,34 +4224,19 @@ func (ec *executionContext) fieldContext_MetadataChange_keyValue(_ context.Conte } func (ec *executionContext) _NativeBalance_balance(ctx context.Context, field graphql.CollectedField, obj *NativeBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NativeBalance_balance(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Balance, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_NativeBalance_balance, + func(ctx context.Context) (any, error) { + return obj.Balance, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_NativeBalance_balance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5825,34 +4253,19 @@ func (ec *executionContext) fieldContext_NativeBalance_balance(_ context.Context } func (ec *executionContext) _NativeBalance_tokenId(ctx context.Context, field graphql.CollectedField, obj *NativeBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NativeBalance_tokenId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.TokenID, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_NativeBalance_tokenId, + func(ctx context.Context) (any, error) { + return obj.TokenID, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_NativeBalance_tokenId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5869,34 +4282,19 @@ func (ec *executionContext) fieldContext_NativeBalance_tokenId(_ context.Context } func (ec *executionContext) _NativeBalance_tokenType(ctx context.Context, field graphql.CollectedField, obj *NativeBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NativeBalance_tokenType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.TokenType, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(TokenType) - fc.Result = res - return ec.marshalNTokenType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTokenType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_NativeBalance_tokenType, + func(ctx context.Context) (any, error) { + return obj.TokenType, nil + }, + nil, + ec.marshalNTokenType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTokenType, + true, + true, + ) } func (ec *executionContext) fieldContext_NativeBalance_tokenType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5913,34 +4311,19 @@ func (ec *executionContext) fieldContext_NativeBalance_tokenType(_ context.Conte } func (ec *executionContext) _NativeBalance_minimumBalance(ctx context.Context, field graphql.CollectedField, obj *NativeBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NativeBalance_minimumBalance(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.MinimumBalance, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_NativeBalance_minimumBalance, + func(ctx context.Context) (any, error) { + return obj.MinimumBalance, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_NativeBalance_minimumBalance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5957,78 +4340,48 @@ func (ec *executionContext) fieldContext_NativeBalance_minimumBalance(_ context. } func (ec *executionContext) _NativeBalance_buyingLiabilities(ctx context.Context, field graphql.CollectedField, obj *NativeBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NativeBalance_buyingLiabilities(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.BuyingLiabilities, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_NativeBalance_buyingLiabilities(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "NativeBalance", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_NativeBalance_buyingLiabilities, + func(ctx context.Context) (any, error) { + return obj.BuyingLiabilities, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) +} + +func (ec *executionContext) fieldContext_NativeBalance_buyingLiabilities(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NativeBalance", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } return fc, nil } func (ec *executionContext) _NativeBalance_sellingLiabilities(ctx context.Context, field graphql.CollectedField, obj *NativeBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NativeBalance_sellingLiabilities(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.SellingLiabilities, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_NativeBalance_sellingLiabilities, + func(ctx context.Context) (any, error) { + return obj.SellingLiabilities, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_NativeBalance_sellingLiabilities(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6045,34 +4398,19 @@ func (ec *executionContext) fieldContext_NativeBalance_sellingLiabilities(_ cont } func (ec *executionContext) _NativeBalance_lastModifiedLedger(ctx context.Context, field graphql.CollectedField, obj *NativeBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NativeBalance_lastModifiedLedger(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LastModifiedLedger, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_NativeBalance_lastModifiedLedger, + func(ctx context.Context) (any, error) { + return obj.LastModifiedLedger, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_NativeBalance_lastModifiedLedger(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6089,34 +4427,19 @@ func (ec *executionContext) fieldContext_NativeBalance_lastModifiedLedger(_ cont } func (ec *executionContext) _Operation_id(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_id(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(int64) - fc.Result = res - return ec.marshalNInt642int64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_id, + func(ctx context.Context) (any, error) { + return obj.ID, nil + }, + nil, + ec.marshalNInt642int64, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6133,34 +4456,19 @@ func (ec *executionContext) fieldContext_Operation_id(_ context.Context, field g } func (ec *executionContext) _Operation_operationType(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_operationType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.OperationType, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.OperationType) - fc.Result = res - return ec.marshalNOperationType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperationType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_operationType, + func(ctx context.Context) (any, error) { + return obj.OperationType, nil + }, + nil, + ec.marshalNOperationType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperationType, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_operationType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6177,34 +4485,19 @@ func (ec *executionContext) fieldContext_Operation_operationType(_ context.Conte } func (ec *executionContext) _Operation_operationXdr(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_operationXdr(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Operation().OperationXdr(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_operationXdr, + func(ctx context.Context) (any, error) { + return ec.Resolvers.Operation().OperationXdr(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_operationXdr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6221,34 +4514,19 @@ func (ec *executionContext) fieldContext_Operation_operationXdr(_ context.Contex } func (ec *executionContext) _Operation_resultCode(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_resultCode(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.ResultCode, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_resultCode, + func(ctx context.Context) (any, error) { + return obj.ResultCode, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_resultCode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6265,34 +4543,19 @@ func (ec *executionContext) fieldContext_Operation_resultCode(_ context.Context, } func (ec *executionContext) _Operation_successful(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_successful(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Successful, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_successful, + func(ctx context.Context) (any, error) { + return obj.Successful, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_successful(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6309,34 +4572,19 @@ func (ec *executionContext) fieldContext_Operation_successful(_ context.Context, } func (ec *executionContext) _Operation_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6353,34 +4601,19 @@ func (ec *executionContext) fieldContext_Operation_ledgerNumber(_ context.Contex } func (ec *executionContext) _Operation_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6397,34 +4630,19 @@ func (ec *executionContext) fieldContext_Operation_ledgerCreatedAt(_ context.Con } func (ec *executionContext) _Operation_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6441,34 +4659,19 @@ func (ec *executionContext) fieldContext_Operation_ingestedAt(_ context.Context, } func (ec *executionContext) _Operation_transaction(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Operation().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.Operation().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6507,34 +4710,19 @@ func (ec *executionContext) fieldContext_Operation_transaction(_ context.Context } func (ec *executionContext) _Operation_accounts(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_accounts(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Operation().Accounts(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccountᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_accounts, + func(ctx context.Context) (any, error) { + return ec.Resolvers.Operation().Accounts(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccountᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_Operation_accounts(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6563,31 +4751,20 @@ func (ec *executionContext) fieldContext_Operation_accounts(_ context.Context, f } func (ec *executionContext) _Operation_stateChanges(ctx context.Context, field graphql.CollectedField, obj *types.Operation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Operation_stateChanges(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Operation().StateChanges(rctx, obj, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*StateChangeConnection) - fc.Result = res - return ec.marshalOStateChangeConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Operation_stateChanges, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Operation().StateChanges(ctx, obj, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOStateChangeConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Operation_stateChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6621,31 +4798,19 @@ func (ec *executionContext) fieldContext_Operation_stateChanges(ctx context.Cont } func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *OperationConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OperationConnection_edges(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Edges, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*OperationEdge) - fc.Result = res - return ec.marshalOOperationEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationEdgeᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_OperationConnection_edges, + func(ctx context.Context) (any, error) { + return obj.Edges, nil + }, + nil, + ec.marshalOOperationEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationEdgeᚄ, + true, + false, + ) } func (ec *executionContext) fieldContext_OperationConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6668,34 +4833,19 @@ func (ec *executionContext) fieldContext_OperationConnection_edges(_ context.Con } func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *OperationConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OperationConnection_pageInfo(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*PageInfo) - fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_OperationConnection_pageInfo, + func(ctx context.Context) (any, error) { + return obj.PageInfo, nil + }, + nil, + ec.marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo, + true, + true, + ) } func (ec *executionContext) fieldContext_OperationConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6722,31 +4872,19 @@ func (ec *executionContext) fieldContext_OperationConnection_pageInfo(_ context. } func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *OperationEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OperationEdge_node(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Node, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_OperationEdge_node, + func(ctx context.Context) (any, error) { + return obj.Node, nil + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_OperationEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6787,34 +4925,19 @@ func (ec *executionContext) fieldContext_OperationEdge_node(_ context.Context, f } func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *OperationEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OperationEdge_cursor(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_OperationEdge_cursor, + func(ctx context.Context) (any, error) { + return obj.Cursor, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_OperationEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6831,31 +4954,19 @@ func (ec *executionContext) fieldContext_OperationEdge_cursor(_ context.Context, } func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_startCursor(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.StartCursor, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_PageInfo_startCursor, + func(ctx context.Context) (any, error) { + return obj.StartCursor, nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_PageInfo_startCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6872,31 +4983,19 @@ func (ec *executionContext) fieldContext_PageInfo_startCursor(_ context.Context, } func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_PageInfo_endCursor, + func(ctx context.Context) (any, error) { + return obj.EndCursor, nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_PageInfo_endCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6913,34 +5012,19 @@ func (ec *executionContext) fieldContext_PageInfo_endCursor(_ context.Context, f } func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_PageInfo_hasNextPage, + func(ctx context.Context) (any, error) { + return obj.HasNextPage, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext_PageInfo_hasNextPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -6957,34 +5041,19 @@ func (ec *executionContext) fieldContext_PageInfo_hasNextPage(_ context.Context, } func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_PageInfo_hasPreviousPage, + func(ctx context.Context) (any, error) { + return obj.HasPreviousPage, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7001,31 +5070,20 @@ func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(_ context.Cont } func (ec *executionContext) _Query_transactionByHash(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_transactionByHash(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().TransactionByHash(rctx, fc.Args["hash"].(string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalOTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_transactionByHash, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Query().TransactionByHash(ctx, fc.Args["hash"].(string)) + }, + nil, + ec.marshalOTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + false, + ) } func (ec *executionContext) fieldContext_Query_transactionByHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7075,31 +5133,20 @@ func (ec *executionContext) fieldContext_Query_transactionByHash(ctx context.Con } func (ec *executionContext) _Query_transactions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_transactions(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Transactions(rctx, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*TransactionConnection) - fc.Result = res - return ec.marshalOTransactionConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_transactions, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Query().Transactions(ctx, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOTransactionConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Query_transactions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7133,31 +5180,20 @@ func (ec *executionContext) fieldContext_Query_transactions(ctx context.Context, } func (ec *executionContext) _Query_accountByAddress(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_accountByAddress(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().AccountByAddress(rctx, fc.Args["address"].(string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalOAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_accountByAddress, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Query().AccountByAddress(ctx, fc.Args["address"].(string)) + }, + nil, + ec.marshalOAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + false, + ) } func (ec *executionContext) fieldContext_Query_accountByAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7197,31 +5233,20 @@ func (ec *executionContext) fieldContext_Query_accountByAddress(ctx context.Cont } func (ec *executionContext) _Query_operations(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_operations(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Operations(rctx, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*OperationConnection) - fc.Result = res - return ec.marshalOOperationConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_operations, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Query().Operations(ctx, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOOperationConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Query_operations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7255,31 +5280,20 @@ func (ec *executionContext) fieldContext_Query_operations(ctx context.Context, f } func (ec *executionContext) _Query_operationById(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_operationById(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().OperationByID(rctx, fc.Args["id"].(int64)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_operationById, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Query().OperationByID(ctx, fc.Args["id"].(int64)) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_Query_operationById(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7331,31 +5345,20 @@ func (ec *executionContext) fieldContext_Query_operationById(ctx context.Context } func (ec *executionContext) _Query_stateChanges(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_stateChanges(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().StateChanges(rctx, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*StateChangeConnection) - fc.Result = res - return ec.marshalOStateChangeConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_stateChanges, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Query().StateChanges(ctx, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOStateChangeConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Query_stateChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7389,31 +5392,20 @@ func (ec *executionContext) fieldContext_Query_stateChanges(ctx context.Context, } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query___type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.introspectType(fc.Args["name"].(string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query___type, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.IntrospectType(fc.Args["name"].(string)) + }, + nil, + ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + true, + false, + ) } func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7465,31 +5457,19 @@ func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query___schema(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*introspection.Schema) - fc.Result = res - return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query___schema, + func(ctx context.Context) (any, error) { + return ec.IntrospectSchema() + }, + nil, + ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema, + true, + false, + ) } func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7520,34 +5500,19 @@ func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field } func (ec *executionContext) _ReservesChange_type(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_ReservesChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7564,34 +5529,19 @@ func (ec *executionContext) fieldContext_ReservesChange_type(_ context.Context, } func (ec *executionContext) _ReservesChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_ReservesChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7608,34 +5558,19 @@ func (ec *executionContext) fieldContext_ReservesChange_reason(_ context.Context } func (ec *executionContext) _ReservesChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_ReservesChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7652,34 +5587,19 @@ func (ec *executionContext) fieldContext_ReservesChange_ingestedAt(_ context.Con } func (ec *executionContext) _ReservesChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_ReservesChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7696,34 +5616,19 @@ func (ec *executionContext) fieldContext_ReservesChange_ledgerCreatedAt(_ contex } func (ec *executionContext) _ReservesChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_ReservesChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7740,34 +5645,19 @@ func (ec *executionContext) fieldContext_ReservesChange_ledgerNumber(_ context.C } func (ec *executionContext) _ReservesChange_account(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_ReservesChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7796,31 +5686,19 @@ func (ec *executionContext) fieldContext_ReservesChange_account(_ context.Contex } func (ec *executionContext) _ReservesChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_ReservesChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7861,34 +5739,19 @@ func (ec *executionContext) fieldContext_ReservesChange_operation(_ context.Cont } func (ec *executionContext) _ReservesChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_ReservesChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7927,31 +5790,19 @@ func (ec *executionContext) fieldContext_ReservesChange_transaction(_ context.Co } func (ec *executionContext) _ReservesChange_sponsoredAddress(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_sponsoredAddress(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().SponsoredAddress(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_sponsoredAddress, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().SponsoredAddress(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_ReservesChange_sponsoredAddress(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -7968,31 +5819,19 @@ func (ec *executionContext) fieldContext_ReservesChange_sponsoredAddress(_ conte } func (ec *executionContext) _ReservesChange_sponsorAddress(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_sponsorAddress(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().SponsorAddress(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_sponsorAddress, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().SponsorAddress(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_ReservesChange_sponsorAddress(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8009,31 +5848,19 @@ func (ec *executionContext) fieldContext_ReservesChange_sponsorAddress(_ context } func (ec *executionContext) _ReservesChange_liquidityPoolId(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_liquidityPoolId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().LiquidityPoolID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_liquidityPoolId, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().LiquidityPoolID(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_ReservesChange_liquidityPoolId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8050,31 +5877,19 @@ func (ec *executionContext) fieldContext_ReservesChange_liquidityPoolId(_ contex } func (ec *executionContext) _ReservesChange_claimableBalanceId(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_claimableBalanceId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().ClaimableBalanceID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_claimableBalanceId, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().ClaimableBalanceID(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_ReservesChange_claimableBalanceId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8091,31 +5906,19 @@ func (ec *executionContext) fieldContext_ReservesChange_claimableBalanceId(_ con } func (ec *executionContext) _ReservesChange_sponsoredTrustline(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_sponsoredTrustline(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().SponsoredTrustline(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_sponsoredTrustline, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().SponsoredTrustline(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_ReservesChange_sponsoredTrustline(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8132,31 +5935,19 @@ func (ec *executionContext) fieldContext_ReservesChange_sponsoredTrustline(_ con } func (ec *executionContext) _ReservesChange_sponsoredData(ctx context.Context, field graphql.CollectedField, obj *types.ReservesStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReservesChange_sponsoredData(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReservesChange().SponsoredData(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_ReservesChange_sponsoredData, + func(ctx context.Context) (any, error) { + return ec.Resolvers.ReservesChange().SponsoredData(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_ReservesChange_sponsoredData(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8173,34 +5964,19 @@ func (ec *executionContext) fieldContext_ReservesChange_sponsoredData(_ context. } func (ec *executionContext) _SACBalance_balance(ctx context.Context, field graphql.CollectedField, obj *SACBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SACBalance_balance(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Balance, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SACBalance_balance, + func(ctx context.Context) (any, error) { + return obj.Balance, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SACBalance_balance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8217,34 +5993,19 @@ func (ec *executionContext) fieldContext_SACBalance_balance(_ context.Context, f } func (ec *executionContext) _SACBalance_tokenId(ctx context.Context, field graphql.CollectedField, obj *SACBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SACBalance_tokenId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.TokenID, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SACBalance_tokenId, + func(ctx context.Context) (any, error) { + return obj.TokenID, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SACBalance_tokenId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8261,34 +6022,19 @@ func (ec *executionContext) fieldContext_SACBalance_tokenId(_ context.Context, f } func (ec *executionContext) _SACBalance_tokenType(ctx context.Context, field graphql.CollectedField, obj *SACBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SACBalance_tokenType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.TokenType, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(TokenType) - fc.Result = res - return ec.marshalNTokenType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTokenType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SACBalance_tokenType, + func(ctx context.Context) (any, error) { + return obj.TokenType, nil + }, + nil, + ec.marshalNTokenType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTokenType, + true, + true, + ) } func (ec *executionContext) fieldContext_SACBalance_tokenType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8305,34 +6051,19 @@ func (ec *executionContext) fieldContext_SACBalance_tokenType(_ context.Context, } func (ec *executionContext) _SACBalance_code(ctx context.Context, field graphql.CollectedField, obj *SACBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SACBalance_code(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Code, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SACBalance_code, + func(ctx context.Context) (any, error) { + return obj.Code, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SACBalance_code(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8349,34 +6080,19 @@ func (ec *executionContext) fieldContext_SACBalance_code(_ context.Context, fiel } func (ec *executionContext) _SACBalance_issuer(ctx context.Context, field graphql.CollectedField, obj *SACBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SACBalance_issuer(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Issuer, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SACBalance_issuer, + func(ctx context.Context) (any, error) { + return obj.Issuer, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SACBalance_issuer(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8393,34 +6109,19 @@ func (ec *executionContext) fieldContext_SACBalance_issuer(_ context.Context, fi } func (ec *executionContext) _SACBalance_decimals(ctx context.Context, field graphql.CollectedField, obj *SACBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SACBalance_decimals(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Decimals, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(int32) - fc.Result = res - return ec.marshalNInt2int32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SACBalance_decimals, + func(ctx context.Context) (any, error) { + return obj.Decimals, nil + }, + nil, + ec.marshalNInt2int32, + true, + true, + ) } func (ec *executionContext) fieldContext_SACBalance_decimals(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8437,34 +6138,19 @@ func (ec *executionContext) fieldContext_SACBalance_decimals(_ context.Context, } func (ec *executionContext) _SACBalance_isAuthorized(ctx context.Context, field graphql.CollectedField, obj *SACBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SACBalance_isAuthorized(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsAuthorized, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SACBalance_isAuthorized, + func(ctx context.Context) (any, error) { + return obj.IsAuthorized, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext_SACBalance_isAuthorized(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8481,34 +6167,19 @@ func (ec *executionContext) fieldContext_SACBalance_isAuthorized(_ context.Conte } func (ec *executionContext) _SACBalance_isClawbackEnabled(ctx context.Context, field graphql.CollectedField, obj *SACBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SACBalance_isClawbackEnabled(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsClawbackEnabled, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SACBalance_isClawbackEnabled, + func(ctx context.Context) (any, error) { + return obj.IsClawbackEnabled, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext_SACBalance_isClawbackEnabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8525,34 +6196,19 @@ func (ec *executionContext) fieldContext_SACBalance_isClawbackEnabled(_ context. } func (ec *executionContext) _SEP41Balance_balance(ctx context.Context, field graphql.CollectedField, obj *SEP41Balance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SEP41Balance_balance(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Balance, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SEP41Balance_balance, + func(ctx context.Context) (any, error) { + return obj.Balance, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SEP41Balance_balance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8569,34 +6225,19 @@ func (ec *executionContext) fieldContext_SEP41Balance_balance(_ context.Context, } func (ec *executionContext) _SEP41Balance_tokenId(ctx context.Context, field graphql.CollectedField, obj *SEP41Balance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SEP41Balance_tokenId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.TokenID, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SEP41Balance_tokenId, + func(ctx context.Context) (any, error) { + return obj.TokenID, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SEP41Balance_tokenId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8611,36 +6252,21 @@ func (ec *executionContext) fieldContext_SEP41Balance_tokenId(_ context.Context, } return fc, nil } - -func (ec *executionContext) _SEP41Balance_tokenType(ctx context.Context, field graphql.CollectedField, obj *SEP41Balance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SEP41Balance_tokenType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.TokenType, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(TokenType) - fc.Result = res - return ec.marshalNTokenType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTokenType(ctx, field.Selections, res) + +func (ec *executionContext) _SEP41Balance_tokenType(ctx context.Context, field graphql.CollectedField, obj *SEP41Balance) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SEP41Balance_tokenType, + func(ctx context.Context) (any, error) { + return obj.TokenType, nil + }, + nil, + ec.marshalNTokenType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTokenType, + true, + true, + ) } func (ec *executionContext) fieldContext_SEP41Balance_tokenType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8657,34 +6283,19 @@ func (ec *executionContext) fieldContext_SEP41Balance_tokenType(_ context.Contex } func (ec *executionContext) _SEP41Balance_name(ctx context.Context, field graphql.CollectedField, obj *SEP41Balance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SEP41Balance_name(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SEP41Balance_name, + func(ctx context.Context) (any, error) { + return obj.Name, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SEP41Balance_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8701,34 +6312,19 @@ func (ec *executionContext) fieldContext_SEP41Balance_name(_ context.Context, fi } func (ec *executionContext) _SEP41Balance_symbol(ctx context.Context, field graphql.CollectedField, obj *SEP41Balance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SEP41Balance_symbol(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Symbol, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SEP41Balance_symbol, + func(ctx context.Context) (any, error) { + return obj.Symbol, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SEP41Balance_symbol(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8745,34 +6341,19 @@ func (ec *executionContext) fieldContext_SEP41Balance_symbol(_ context.Context, } func (ec *executionContext) _SEP41Balance_decimals(ctx context.Context, field graphql.CollectedField, obj *SEP41Balance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SEP41Balance_decimals(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Decimals, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(int32) - fc.Result = res - return ec.marshalNInt2int32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SEP41Balance_decimals, + func(ctx context.Context) (any, error) { + return obj.Decimals, nil + }, + nil, + ec.marshalNInt2int32, + true, + true, + ) } func (ec *executionContext) fieldContext_SEP41Balance_decimals(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8789,34 +6370,19 @@ func (ec *executionContext) fieldContext_SEP41Balance_decimals(_ context.Context } func (ec *executionContext) _SignerChange_type(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8833,34 +6399,19 @@ func (ec *executionContext) fieldContext_SignerChange_type(_ context.Context, fi } func (ec *executionContext) _SignerChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8877,34 +6428,19 @@ func (ec *executionContext) fieldContext_SignerChange_reason(_ context.Context, } func (ec *executionContext) _SignerChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8921,34 +6457,19 @@ func (ec *executionContext) fieldContext_SignerChange_ingestedAt(_ context.Conte } func (ec *executionContext) _SignerChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -8965,34 +6486,19 @@ func (ec *executionContext) fieldContext_SignerChange_ledgerCreatedAt(_ context. } func (ec *executionContext) _SignerChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9009,34 +6515,19 @@ func (ec *executionContext) fieldContext_SignerChange_ledgerNumber(_ context.Con } func (ec *executionContext) _SignerChange_account(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9065,31 +6556,19 @@ func (ec *executionContext) fieldContext_SignerChange_account(_ context.Context, } func (ec *executionContext) _SignerChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_SignerChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9130,34 +6609,19 @@ func (ec *executionContext) fieldContext_SignerChange_operation(_ context.Contex } func (ec *executionContext) _SignerChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9196,31 +6660,19 @@ func (ec *executionContext) fieldContext_SignerChange_transaction(_ context.Cont } func (ec *executionContext) _SignerChange_signerAddress(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_signerAddress(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerChange().SignerAddress(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_signerAddress, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerChange().SignerAddress(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_SignerChange_signerAddress(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9237,31 +6689,19 @@ func (ec *executionContext) fieldContext_SignerChange_signerAddress(_ context.Co } func (ec *executionContext) _SignerChange_signerWeights(ctx context.Context, field graphql.CollectedField, obj *types.SignerStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerChange_signerWeights(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerChange().SignerWeights(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerChange_signerWeights, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerChange().SignerWeights(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_SignerChange_signerWeights(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9278,34 +6718,19 @@ func (ec *executionContext) fieldContext_SignerChange_signerWeights(_ context.Co } func (ec *executionContext) _SignerThresholdsChange_type(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerThresholdsChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerThresholdsChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9320,36 +6745,21 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_type(_ context.C } return fc, nil } - -func (ec *executionContext) _SignerThresholdsChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerThresholdsChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + +func (ec *executionContext) _SignerThresholdsChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerThresholdsChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9366,34 +6776,19 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_reason(_ context } func (ec *executionContext) _SignerThresholdsChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9410,34 +6805,19 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_ingestedAt(_ con } func (ec *executionContext) _SignerThresholdsChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9454,34 +6834,19 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_ledgerCreatedAt( } func (ec *executionContext) _SignerThresholdsChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9498,34 +6863,19 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_ledgerNumber(_ c } func (ec *executionContext) _SignerThresholdsChange_account(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerThresholdsChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerThresholdsChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9554,31 +6904,19 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_account(_ contex } func (ec *executionContext) _SignerThresholdsChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerThresholdsChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerThresholdsChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9619,34 +6957,19 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_operation(_ cont } func (ec *executionContext) _SignerThresholdsChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerThresholdsChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerThresholdsChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9685,34 +7008,19 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_transaction(_ co } func (ec *executionContext) _SignerThresholdsChange_thresholds(ctx context.Context, field graphql.CollectedField, obj *types.SignerThresholdsStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SignerThresholdsChange_thresholds(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SignerThresholdsChange().Thresholds(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_SignerThresholdsChange_thresholds, + func(ctx context.Context) (any, error) { + return ec.Resolvers.SignerThresholdsChange().Thresholds(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_SignerThresholdsChange_thresholds(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9729,34 +7037,19 @@ func (ec *executionContext) fieldContext_SignerThresholdsChange_thresholds(_ con } func (ec *executionContext) _StandardBalanceChange_type(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.StandardBalanceChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.StandardBalanceChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9773,34 +7066,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_type(_ context.Co } func (ec *executionContext) _StandardBalanceChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.StandardBalanceChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.StandardBalanceChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9817,34 +7095,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_reason(_ context. } func (ec *executionContext) _StandardBalanceChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9861,34 +7124,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_ingestedAt(_ cont } func (ec *executionContext) _StandardBalanceChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9905,34 +7153,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_ledgerCreatedAt(_ } func (ec *executionContext) _StandardBalanceChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -9949,34 +7182,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_ledgerNumber(_ co } func (ec *executionContext) _StandardBalanceChange_account(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.StandardBalanceChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.StandardBalanceChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10005,31 +7223,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_account(_ context } func (ec *executionContext) _StandardBalanceChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.StandardBalanceChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.StandardBalanceChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10069,35 +7275,20 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_operation(_ conte return fc, nil } -func (ec *executionContext) _StandardBalanceChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.StandardBalanceChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) +func (ec *executionContext) _StandardBalanceChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.StandardBalanceChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10136,34 +7327,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_transaction(_ con } func (ec *executionContext) _StandardBalanceChange_tokenId(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_tokenId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.StandardBalanceChange().TokenID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_tokenId, + func(ctx context.Context) (any, error) { + return ec.Resolvers.StandardBalanceChange().TokenID(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_tokenId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10180,34 +7356,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_tokenId(_ context } func (ec *executionContext) _StandardBalanceChange_amount(ctx context.Context, field graphql.CollectedField, obj *types.StandardBalanceStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StandardBalanceChange_amount(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.StandardBalanceChange().Amount(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StandardBalanceChange_amount, + func(ctx context.Context) (any, error) { + return ec.Resolvers.StandardBalanceChange().Amount(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_StandardBalanceChange_amount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10224,31 +7385,19 @@ func (ec *executionContext) fieldContext_StandardBalanceChange_amount(_ context. } func (ec *executionContext) _StateChangeConnection_edges(ctx context.Context, field graphql.CollectedField, obj *StateChangeConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StateChangeConnection_edges(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Edges, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*StateChangeEdge) - fc.Result = res - return ec.marshalOStateChangeEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeEdgeᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StateChangeConnection_edges, + func(ctx context.Context) (any, error) { + return obj.Edges, nil + }, + nil, + ec.marshalOStateChangeEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeEdgeᚄ, + true, + false, + ) } func (ec *executionContext) fieldContext_StateChangeConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10271,34 +7420,19 @@ func (ec *executionContext) fieldContext_StateChangeConnection_edges(_ context.C } func (ec *executionContext) _StateChangeConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *StateChangeConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StateChangeConnection_pageInfo(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*PageInfo) - fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StateChangeConnection_pageInfo, + func(ctx context.Context) (any, error) { + return obj.PageInfo, nil + }, + nil, + ec.marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo, + true, + true, + ) } func (ec *executionContext) fieldContext_StateChangeConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10325,31 +7459,19 @@ func (ec *executionContext) fieldContext_StateChangeConnection_pageInfo(_ contex } func (ec *executionContext) _StateChangeEdge_node(ctx context.Context, field graphql.CollectedField, obj *StateChangeEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StateChangeEdge_node(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Node, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(BaseStateChange) - fc.Result = res - return ec.marshalOBaseStateChange2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBaseStateChange(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StateChangeEdge_node, + func(ctx context.Context) (any, error) { + return obj.Node, nil + }, + nil, + ec.marshalOBaseStateChange2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBaseStateChange, + true, + false, + ) } func (ec *executionContext) fieldContext_StateChangeEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10366,34 +7488,19 @@ func (ec *executionContext) fieldContext_StateChangeEdge_node(_ context.Context, } func (ec *executionContext) _StateChangeEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *StateChangeEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StateChangeEdge_cursor(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_StateChangeEdge_cursor, + func(ctx context.Context) (any, error) { + return obj.Cursor, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_StateChangeEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10410,34 +7517,19 @@ func (ec *executionContext) fieldContext_StateChangeEdge_cursor(_ context.Contex } func (ec *executionContext) _Transaction_hash(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_hash(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Transaction().Hash(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_hash, + func(ctx context.Context) (any, error) { + return ec.Resolvers.Transaction().Hash(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_Transaction_hash(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10454,34 +7546,19 @@ func (ec *executionContext) fieldContext_Transaction_hash(_ context.Context, fie } func (ec *executionContext) _Transaction_feeCharged(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_feeCharged(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.FeeCharged, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(int64) - fc.Result = res - return ec.marshalNInt642int64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_feeCharged, + func(ctx context.Context) (any, error) { + return obj.FeeCharged, nil + }, + nil, + ec.marshalNInt642int64, + true, + true, + ) } func (ec *executionContext) fieldContext_Transaction_feeCharged(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10498,34 +7575,19 @@ func (ec *executionContext) fieldContext_Transaction_feeCharged(_ context.Contex } func (ec *executionContext) _Transaction_resultCode(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_resultCode(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.ResultCode, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_resultCode, + func(ctx context.Context) (any, error) { + return obj.ResultCode, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_Transaction_resultCode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10542,34 +7604,19 @@ func (ec *executionContext) fieldContext_Transaction_resultCode(_ context.Contex } func (ec *executionContext) _Transaction_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_Transaction_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10586,34 +7633,19 @@ func (ec *executionContext) fieldContext_Transaction_ledgerNumber(_ context.Cont } func (ec *executionContext) _Transaction_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_Transaction_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10630,34 +7662,19 @@ func (ec *executionContext) fieldContext_Transaction_ledgerCreatedAt(_ context.C } func (ec *executionContext) _Transaction_isFeeBump(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_isFeeBump(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsFeeBump, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_isFeeBump, + func(ctx context.Context) (any, error) { + return obj.IsFeeBump, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext_Transaction_isFeeBump(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10674,34 +7691,19 @@ func (ec *executionContext) fieldContext_Transaction_isFeeBump(_ context.Context } func (ec *executionContext) _Transaction_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_Transaction_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10718,31 +7720,20 @@ func (ec *executionContext) fieldContext_Transaction_ingestedAt(_ context.Contex } func (ec *executionContext) _Transaction_operations(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_operations(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Transaction().Operations(rctx, obj, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*OperationConnection) - fc.Result = res - return ec.marshalOOperationConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_operations, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Transaction().Operations(ctx, obj, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOOperationConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Transaction_operations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10775,37 +7766,22 @@ func (ec *executionContext) fieldContext_Transaction_operations(ctx context.Cont return fc, nil } -func (ec *executionContext) _Transaction_accounts(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_accounts(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Transaction().Accounts(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccountᚄ(ctx, field.Selections, res) -} - +func (ec *executionContext) _Transaction_accounts(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_accounts, + func(ctx context.Context) (any, error) { + return ec.Resolvers.Transaction().Accounts(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccountᚄ, + true, + true, + ) +} + func (ec *executionContext) fieldContext_Transaction_accounts(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Transaction", @@ -10832,31 +7808,20 @@ func (ec *executionContext) fieldContext_Transaction_accounts(_ context.Context, } func (ec *executionContext) _Transaction_stateChanges(ctx context.Context, field graphql.CollectedField, obj *types.Transaction) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Transaction_stateChanges(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Transaction().StateChanges(rctx, obj, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*StateChangeConnection) - fc.Result = res - return ec.marshalOStateChangeConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeConnection(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Transaction_stateChanges, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Transaction().StateChanges(ctx, obj, fc.Args["first"].(*int32), fc.Args["after"].(*string), fc.Args["last"].(*int32), fc.Args["before"].(*string)) + }, + nil, + ec.marshalOStateChangeConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeConnection, + true, + false, + ) } func (ec *executionContext) fieldContext_Transaction_stateChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10890,31 +7855,19 @@ func (ec *executionContext) fieldContext_Transaction_stateChanges(ctx context.Co } func (ec *executionContext) _TransactionConnection_edges(ctx context.Context, field graphql.CollectedField, obj *TransactionConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TransactionConnection_edges(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Edges, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*TransactionEdge) - fc.Result = res - return ec.marshalOTransactionEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionEdgeᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TransactionConnection_edges, + func(ctx context.Context) (any, error) { + return obj.Edges, nil + }, + nil, + ec.marshalOTransactionEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionEdgeᚄ, + true, + false, + ) } func (ec *executionContext) fieldContext_TransactionConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10937,34 +7890,19 @@ func (ec *executionContext) fieldContext_TransactionConnection_edges(_ context.C } func (ec *executionContext) _TransactionConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *TransactionConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TransactionConnection_pageInfo(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*PageInfo) - fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TransactionConnection_pageInfo, + func(ctx context.Context) (any, error) { + return obj.PageInfo, nil + }, + nil, + ec.marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo, + true, + true, + ) } func (ec *executionContext) fieldContext_TransactionConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10991,31 +7929,19 @@ func (ec *executionContext) fieldContext_TransactionConnection_pageInfo(_ contex } func (ec *executionContext) _TransactionEdge_node(ctx context.Context, field graphql.CollectedField, obj *TransactionEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TransactionEdge_node(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Node, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalOTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TransactionEdge_node, + func(ctx context.Context) (any, error) { + return obj.Node, nil + }, + nil, + ec.marshalOTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + false, + ) } func (ec *executionContext) fieldContext_TransactionEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11054,34 +7980,19 @@ func (ec *executionContext) fieldContext_TransactionEdge_node(_ context.Context, } func (ec *executionContext) _TransactionEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *TransactionEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TransactionEdge_cursor(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TransactionEdge_cursor, + func(ctx context.Context) (any, error) { + return obj.Cursor, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TransactionEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11098,34 +8009,19 @@ func (ec *executionContext) fieldContext_TransactionEdge_cursor(_ context.Contex } func (ec *executionContext) _TrustlineBalance_balance(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_balance(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Balance, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_balance, + func(ctx context.Context) (any, error) { + return obj.Balance, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_balance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11142,34 +8038,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_balance(_ context.Cont } func (ec *executionContext) _TrustlineBalance_tokenId(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_tokenId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.TokenID, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_tokenId, + func(ctx context.Context) (any, error) { + return obj.TokenID, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_tokenId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11186,34 +8067,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_tokenId(_ context.Cont } func (ec *executionContext) _TrustlineBalance_tokenType(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_tokenType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.TokenType, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(TokenType) - fc.Result = res - return ec.marshalNTokenType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTokenType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_tokenType, + func(ctx context.Context) (any, error) { + return obj.TokenType, nil + }, + nil, + ec.marshalNTokenType2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTokenType, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_tokenType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11230,34 +8096,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_tokenType(_ context.Co } func (ec *executionContext) _TrustlineBalance_code(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_code(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Code, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_code, + func(ctx context.Context) (any, error) { + return obj.Code, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_code(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11274,34 +8125,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_code(_ context.Context } func (ec *executionContext) _TrustlineBalance_issuer(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_issuer(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Issuer, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_issuer, + func(ctx context.Context) (any, error) { + return obj.Issuer, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_issuer(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11318,34 +8154,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_issuer(_ context.Conte } func (ec *executionContext) _TrustlineBalance_type(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_type, + func(ctx context.Context) (any, error) { + return obj.Type, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11362,34 +8183,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_type(_ context.Context } func (ec *executionContext) _TrustlineBalance_limit(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_limit(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Limit, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_limit, + func(ctx context.Context) (any, error) { + return obj.Limit, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_limit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11406,34 +8212,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_limit(_ context.Contex } func (ec *executionContext) _TrustlineBalance_buyingLiabilities(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_buyingLiabilities(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.BuyingLiabilities, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_buyingLiabilities, + func(ctx context.Context) (any, error) { + return obj.BuyingLiabilities, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_buyingLiabilities(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11450,34 +8241,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_buyingLiabilities(_ co } func (ec *executionContext) _TrustlineBalance_sellingLiabilities(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_sellingLiabilities(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.SellingLiabilities, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_sellingLiabilities, + func(ctx context.Context) (any, error) { + return obj.SellingLiabilities, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_sellingLiabilities(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11493,35 +8269,20 @@ func (ec *executionContext) fieldContext_TrustlineBalance_sellingLiabilities(_ c return fc, nil } -func (ec *executionContext) _TrustlineBalance_lastModifiedLedger(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_lastModifiedLedger(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LastModifiedLedger, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) +func (ec *executionContext) _TrustlineBalance_lastModifiedLedger(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_lastModifiedLedger, + func(ctx context.Context) (any, error) { + return obj.LastModifiedLedger, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_lastModifiedLedger(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11538,34 +8299,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_lastModifiedLedger(_ c } func (ec *executionContext) _TrustlineBalance_isAuthorized(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_isAuthorized(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsAuthorized, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_isAuthorized, + func(ctx context.Context) (any, error) { + return obj.IsAuthorized, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_isAuthorized(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11582,34 +8328,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_isAuthorized(_ context } func (ec *executionContext) _TrustlineBalance_isAuthorizedToMaintainLiabilities(ctx context.Context, field graphql.CollectedField, obj *TrustlineBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineBalance_isAuthorizedToMaintainLiabilities(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsAuthorizedToMaintainLiabilities, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineBalance_isAuthorizedToMaintainLiabilities, + func(ctx context.Context) (any, error) { + return obj.IsAuthorizedToMaintainLiabilities, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineBalance_isAuthorizedToMaintainLiabilities(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11626,34 +8357,19 @@ func (ec *executionContext) fieldContext_TrustlineBalance_isAuthorizedToMaintain } func (ec *executionContext) _TrustlineChange_type(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TrustlineChange().Type(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeCategory) - fc.Result = res - return ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_type, + func(ctx context.Context) (any, error) { + return ec.Resolvers.TrustlineChange().Type(ctx, obj) + }, + nil, + ec.marshalNStateChangeCategory2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeCategory, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineChange_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11670,34 +8386,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_type(_ context.Context, } func (ec *executionContext) _TrustlineChange_reason(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_reason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TrustlineChange().Reason(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(types.StateChangeReason) - fc.Result = res - return ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_reason, + func(ctx context.Context) (any, error) { + return ec.Resolvers.TrustlineChange().Reason(ctx, obj) + }, + nil, + ec.marshalNStateChangeReason2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐStateChangeReason, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineChange_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11714,34 +8415,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_reason(_ context.Contex } func (ec *executionContext) _TrustlineChange_ingestedAt(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_ingestedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IngestedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_ingestedAt, + func(ctx context.Context) (any, error) { + return obj.IngestedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineChange_ingestedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11758,34 +8444,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_ingestedAt(_ context.Co } func (ec *executionContext) _TrustlineChange_ledgerCreatedAt(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_ledgerCreatedAt(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerCreatedAt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_ledgerCreatedAt, + func(ctx context.Context) (any, error) { + return obj.LedgerCreatedAt, nil + }, + nil, + ec.marshalNTime2timeᚐTime, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineChange_ledgerCreatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11802,34 +8473,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_ledgerCreatedAt(_ conte } func (ec *executionContext) _TrustlineChange_ledgerNumber(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_ledgerNumber(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.LedgerNumber, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(uint32) - fc.Result = res - return ec.marshalNUInt322uint32(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_ledgerNumber, + func(ctx context.Context) (any, error) { + return obj.LedgerNumber, nil + }, + nil, + ec.marshalNUInt322uint32, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineChange_ledgerNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11846,34 +8502,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_ledgerNumber(_ context. } func (ec *executionContext) _TrustlineChange_account(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_account(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TrustlineChange().Account(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Account) - fc.Result = res - return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_account, + func(ctx context.Context) (any, error) { + return ec.Resolvers.TrustlineChange().Account(ctx, obj) + }, + nil, + ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineChange_account(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11902,31 +8543,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_account(_ context.Conte } func (ec *executionContext) _TrustlineChange_operation(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_operation(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TrustlineChange().Operation(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*types.Operation) - fc.Result = res - return ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_operation, + func(ctx context.Context) (any, error) { + return ec.Resolvers.TrustlineChange().Operation(ctx, obj) + }, + nil, + ec.marshalOOperation2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐOperation, + true, + false, + ) } func (ec *executionContext) fieldContext_TrustlineChange_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -11967,34 +8596,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_operation(_ context.Con } func (ec *executionContext) _TrustlineChange_transaction(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_transaction(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TrustlineChange().Transaction(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*types.Transaction) - fc.Result = res - return ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_transaction, + func(ctx context.Context) (any, error) { + return ec.Resolvers.TrustlineChange().Transaction(ctx, obj) + }, + nil, + ec.marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction, + true, + true, + ) } func (ec *executionContext) fieldContext_TrustlineChange_transaction(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12033,31 +8647,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_transaction(_ context.C } func (ec *executionContext) _TrustlineChange_tokenId(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_tokenId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TrustlineChange().TokenID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_tokenId, + func(ctx context.Context) (any, error) { + return ec.Resolvers.TrustlineChange().TokenID(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_TrustlineChange_tokenId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12074,31 +8676,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_tokenId(_ context.Conte } func (ec *executionContext) _TrustlineChange_limit(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_limit(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TrustlineChange().Limit(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_limit, + func(ctx context.Context) (any, error) { + return ec.Resolvers.TrustlineChange().Limit(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_TrustlineChange_limit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12115,31 +8705,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_limit(_ context.Context } func (ec *executionContext) _TrustlineChange_liquidityPoolId(ctx context.Context, field graphql.CollectedField, obj *types.TrustlineStateChangeModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TrustlineChange_liquidityPoolId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TrustlineChange().LiquidityPoolID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_TrustlineChange_liquidityPoolId, + func(ctx context.Context) (any, error) { + return ec.Resolvers.TrustlineChange().LiquidityPoolID(ctx, obj) + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext_TrustlineChange_liquidityPoolId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12156,34 +8734,19 @@ func (ec *executionContext) fieldContext_TrustlineChange_liquidityPoolId(_ conte } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_name(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Directive_name, + func(ctx context.Context) (any, error) { + return obj.Name, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext___Directive_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12194,37 +8757,25 @@ func (ec *executionContext) fieldContext___Directive_name(_ context.Context, fie IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_description(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 + }, } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return fc, nil +} + +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Directive_description, + func(ctx context.Context) (any, error) { + return obj.Description(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___Directive_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12241,34 +8792,19 @@ func (ec *executionContext) fieldContext___Directive_description(_ context.Conte } func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsRepeatable, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Directive_isRepeatable, + func(ctx context.Context) (any, error) { + return obj.IsRepeatable, nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12285,34 +8821,19 @@ func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Cont } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_locations(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]string) - fc.Result = res - return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Directive_locations, + func(ctx context.Context) (any, error) { + return obj.Locations, nil + }, + nil, + ec.marshalN__DirectiveLocation2ᚕstringᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext___Directive_locations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12329,34 +8850,19 @@ func (ec *executionContext) fieldContext___Directive_locations(_ context.Context } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_args(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.InputValue) - fc.Result = res - return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Directive_args, + func(ctx context.Context) (any, error) { + return obj.Args, nil + }, + nil, + ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12398,34 +8904,19 @@ func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, f } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_name(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___EnumValue_name, + func(ctx context.Context) (any, error) { + return obj.Name, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12442,31 +8933,19 @@ func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, fie } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_description(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___EnumValue_description, + func(ctx context.Context) (any, error) { + return obj.Description(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___EnumValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12483,34 +8962,19 @@ func (ec *executionContext) fieldContext___EnumValue_description(_ context.Conte } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___EnumValue_isDeprecated, + func(ctx context.Context) (any, error) { + return obj.IsDeprecated(), nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12527,31 +8991,19 @@ func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Cont } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___EnumValue_deprecationReason, + func(ctx context.Context) (any, error) { + return obj.DeprecationReason(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12568,34 +9020,19 @@ func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_name(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Field_name, + func(ctx context.Context) (any, error) { + return obj.Name, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext___Field_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12612,31 +9049,19 @@ func (ec *executionContext) fieldContext___Field_name(_ context.Context, field g } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_description(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Field_description, + func(ctx context.Context) (any, error) { + return obj.Description(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___Field_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12653,34 +9078,19 @@ func (ec *executionContext) fieldContext___Field_description(_ context.Context, } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_args(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.InputValue) - fc.Result = res - return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Field_args, + func(ctx context.Context) (any, error) { + return obj.Args, nil + }, + nil, + ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12722,34 +9132,19 @@ func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Field_type, + func(ctx context.Context) (any, error) { + return obj.Type, nil + }, + nil, + ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + true, + true, + ) } func (ec *executionContext) fieldContext___Field_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12790,34 +9185,19 @@ func (ec *executionContext) fieldContext___Field_type(_ context.Context, field g } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Field_isDeprecated, + func(ctx context.Context) (any, error) { + return obj.IsDeprecated(), nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12834,31 +9214,19 @@ func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Field_deprecationReason, + func(ctx context.Context) (any, error) { + return obj.DeprecationReason(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12875,34 +9243,19 @@ func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Con } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_name(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___InputValue_name, + func(ctx context.Context) (any, error) { + return obj.Name, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12918,32 +9271,20 @@ func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, fi return fc, nil } -func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_description(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___InputValue_description, + func(ctx context.Context) (any, error) { + return obj.Description(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___InputValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -12960,34 +9301,19 @@ func (ec *executionContext) fieldContext___InputValue_description(_ context.Cont } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___InputValue_type, + func(ctx context.Context) (any, error) { + return obj.Type, nil + }, + nil, + ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + true, + true, + ) } func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13028,31 +9354,19 @@ func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, fi } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___InputValue_defaultValue, + func(ctx context.Context) (any, error) { + return obj.DefaultValue, nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13069,34 +9383,19 @@ func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Con } func (ec *executionContext) ___InputValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_isDeprecated(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___InputValue_isDeprecated, + func(ctx context.Context) (any, error) { + return obj.IsDeprecated(), nil + }, + nil, + ec.marshalNBoolean2bool, + true, + true, + ) } func (ec *executionContext) fieldContext___InputValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13113,31 +9412,19 @@ func (ec *executionContext) fieldContext___InputValue_isDeprecated(_ context.Con } func (ec *executionContext) ___InputValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_deprecationReason(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___InputValue_deprecationReason, + func(ctx context.Context) (any, error) { + return obj.DeprecationReason(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___InputValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13154,31 +9441,19 @@ func (ec *executionContext) fieldContext___InputValue_deprecationReason(_ contex } func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_description(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Schema_description, + func(ctx context.Context) (any, error) { + return obj.Description(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___Schema_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13195,34 +9470,19 @@ func (ec *executionContext) fieldContext___Schema_description(_ context.Context, } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_types(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.Type) - fc.Result = res - return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Schema_types, + func(ctx context.Context) (any, error) { + return obj.Types(), nil + }, + nil, + ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13263,34 +9523,19 @@ func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_queryType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Schema_queryType, + func(ctx context.Context) (any, error) { + return obj.QueryType(), nil + }, + nil, + ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + true, + true, + ) } func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13331,31 +9576,19 @@ func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, f } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_mutationType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Schema_mutationType, + func(ctx context.Context) (any, error) { + return obj.MutationType(), nil + }, + nil, + ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + true, + false, + ) } func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13396,31 +9629,19 @@ func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Schema_subscriptionType, + func(ctx context.Context) (any, error) { + return obj.SubscriptionType(), nil + }, + nil, + ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + true, + false, + ) } func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13461,34 +9682,19 @@ func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Con } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_directives(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.Directive) - fc.Result = res - return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Schema_directives, + func(ctx context.Context) (any, error) { + return obj.Directives(), nil + }, + nil, + ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13517,34 +9723,19 @@ func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_kind(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalN__TypeKind2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_kind, + func(ctx context.Context) (any, error) { + return obj.Kind(), nil + }, + nil, + ec.marshalN__TypeKind2string, + true, + true, + ) } func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13561,31 +9752,19 @@ func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field gr } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_name(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_name, + func(ctx context.Context) (any, error) { + return obj.Name(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13602,31 +9781,19 @@ func (ec *executionContext) fieldContext___Type_name(_ context.Context, field gr } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_description(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_description, + func(ctx context.Context) (any, error) { + return obj.Description(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13643,72 +9810,49 @@ func (ec *executionContext) fieldContext___Type_description(_ context.Context, f } func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.SpecifiedByURL(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_specifiedByURL, + func(ctx context.Context) (any, error) { + return obj.SpecifiedByURL(), nil + }, + nil, + ec.marshalOString2ᚖstring, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_fields(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } - res := resTmp.([]introspection.Field) - fc.Result = res - return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) + return fc, nil +} + +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_fields, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil + }, + nil, + ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13750,31 +9894,19 @@ func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, fiel } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_interfaces(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.([]introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_interfaces, + func(ctx context.Context) (any, error) { + return obj.Interfaces(), nil + }, + nil, + ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13815,31 +9947,19 @@ func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, fi } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.([]introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_possibleTypes, + func(ctx context.Context) (any, error) { + return obj.PossibleTypes(), nil + }, + nil, + ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13880,31 +10000,20 @@ func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_enumValues(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]introspection.EnumValue) - fc.Result = res - return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_enumValues, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil + }, + nil, + ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13942,31 +10051,19 @@ func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_inputFields(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.([]introspection.InputValue) - fc.Result = res - return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_inputFields, + func(ctx context.Context) (any, error) { + return obj.InputFields(), nil + }, + nil, + ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13997,31 +10094,19 @@ func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, f } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_ofType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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 - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_ofType, + func(ctx context.Context) (any, error) { + return obj.OfType(), nil + }, + nil, + ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -14062,31 +10147,19 @@ func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field } func (ec *executionContext) ___Type_isOneOf(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_isOneOf(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsOneOf(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalOBoolean2bool(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext___Type_isOneOf, + func(ctx context.Context) (any, error) { + return obj.IsOneOf(), nil + }, + nil, + ec.marshalOBoolean2bool, + true, + false, + ) } func (ec *executionContext) fieldContext___Type_isOneOf(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -14108,6 +10181,10 @@ func (ec *executionContext) fieldContext___Type_isOneOf(_ context.Context, field func (ec *executionContext) unmarshalInputAccountStateChangeFilterInput(ctx context.Context, obj any) (AccountStateChangeFilterInput, error) { var it AccountStateChangeFilterInput + if obj == nil { + return it, nil + } + asMap := map[string]any{} for k, v := range obj.(map[string]any) { asMap[k] = v @@ -14150,7 +10227,6 @@ func (ec *executionContext) unmarshalInputAccountStateChangeFilterInput(ctx cont it.Reason = data } } - return it, nil } @@ -14191,7 +10267,11 @@ func (ec *executionContext) _Balance(ctx context.Context, sel ast.SelectionSet, } return ec._NativeBalance(ctx, sel, obj) default: - panic(fmt.Errorf("unexpected type %T", obj)) + if typedObj, ok := obj.(graphql.Marshaler); ok { + return typedObj + } else { + panic(fmt.Errorf("unexpected type %T; non-generated variants of Balance must implement graphql.Marshaler", obj)) + } } } @@ -14263,7 +10343,11 @@ func (ec *executionContext) _BaseStateChange(ctx context.Context, sel ast.Select } return ec._AccountChange(ctx, sel, obj) default: - panic(fmt.Errorf("unexpected type %T", obj)) + if typedObj, ok := obj.(graphql.Marshaler); ok { + return typedObj + } else { + panic(fmt.Errorf("unexpected type %T; non-generated variants of BaseStateChange must implement graphql.Marshaler", obj)) + } } } @@ -14462,10 +10546,10 @@ func (ec *executionContext) _Account(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -14721,10 +10805,10 @@ func (ec *executionContext) _AccountChange(ctx context.Context, sel ast.Selectio return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -15049,10 +11133,10 @@ func (ec *executionContext) _BalanceAuthorizationChange(ctx context.Context, sel return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -15093,10 +11177,10 @@ func (ec *executionContext) _BalanceConnection(ctx context.Context, sel ast.Sele return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -15137,10 +11221,10 @@ func (ec *executionContext) _BalanceEdge(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -15399,10 +11483,10 @@ func (ec *executionContext) _FlagsChange(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -15661,10 +11745,10 @@ func (ec *executionContext) _MetadataChange(ctx context.Context, sel ast.Selecti return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -15730,10 +11814,10 @@ func (ec *executionContext) _NativeBalance(ctx context.Context, sel ast.Selectio return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -15940,10 +12024,10 @@ func (ec *executionContext) _Operation(ctx context.Context, sel ast.SelectionSet return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -15981,10 +12065,10 @@ func (ec *executionContext) _OperationConnection(ctx context.Context, sel ast.Se return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -16022,10 +12106,10 @@ func (ec *executionContext) _OperationEdge(ctx context.Context, sel ast.Selectio return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -16070,10 +12154,10 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -16234,10 +12318,10 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -16658,10 +12742,10 @@ func (ec *executionContext) _ReservesChange(ctx context.Context, sel ast.Selecti return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -16732,10 +12816,10 @@ func (ec *executionContext) _SACBalance(ctx context.Context, sel ast.SelectionSe return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -16796,10 +12880,10 @@ func (ec *executionContext) _SEP41Balance(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -17088,10 +13172,10 @@ func (ec *executionContext) _SignerChange(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -17350,10 +13434,10 @@ func (ec *executionContext) _SignerThresholdsChange(ctx context.Context, sel ast return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -17648,10 +13732,10 @@ func (ec *executionContext) _StandardBalanceChange(ctx context.Context, sel ast. return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -17689,10 +13773,10 @@ func (ec *executionContext) _StateChangeConnection(ctx context.Context, sel ast. return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -17730,10 +13814,10 @@ func (ec *executionContext) _StateChangeEdge(ctx context.Context, sel ast.Select return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -17932,10 +14016,10 @@ func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -17973,10 +14057,10 @@ func (ec *executionContext) _TransactionConnection(ctx context.Context, sel ast. return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18014,10 +14098,10 @@ func (ec *executionContext) _TransactionEdge(ctx context.Context, sel ast.Select return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18108,10 +14192,10 @@ func (ec *executionContext) _TrustlineBalance(ctx context.Context, sel ast.Selec return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18433,10 +14517,10 @@ func (ec *executionContext) _TrustlineChange(ctx context.Context, sel ast.Select return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18489,10 +14573,10 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18537,10 +14621,10 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18595,10 +14679,10 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18650,10 +14734,10 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18705,10 +14789,10 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18764,10 +14848,10 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return graphql.Null } - atomic.AddInt32(&ec.deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(len(deferred))) for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ + ec.ProcessDeferredGroup(graphql.DeferredGroup{ Label: label, Path: graphql.GetPath(ctx), FieldSet: dfs, @@ -18787,39 +14871,11 @@ func (ec *executionContext) marshalNAccount2githubᚗcomᚋstellarᚋwalletᚑba } func (ec *executionContext) marshalNAccount2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccountᚄ(ctx context.Context, sel ast.SelectionSet, v []*types.Account) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -18833,7 +14889,7 @@ func (ec *executionContext) marshalNAccount2ᚕᚖgithubᚗcomᚋstellarᚋwalle func (ec *executionContext) marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐAccount(ctx context.Context, sel ast.SelectionSet, v *types.Account) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -18843,7 +14899,7 @@ func (ec *executionContext) marshalNAccount2ᚖgithubᚗcomᚋstellarᚋwallet func (ec *executionContext) marshalNBalance2githubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalance(ctx context.Context, sel ast.SelectionSet, v Balance) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -18857,7 +14913,7 @@ func (ec *executionContext) marshalNBalanceConnection2githubᚗcomᚋstellarᚋw func (ec *executionContext) marshalNBalanceConnection2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceConnection(ctx context.Context, sel ast.SelectionSet, v *BalanceConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -18865,39 +14921,11 @@ func (ec *executionContext) marshalNBalanceConnection2ᚖgithubᚗcomᚋstellar } func (ec *executionContext) marshalNBalanceEdge2ᚕᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*BalanceEdge) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalNBalanceEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceEdge(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNBalanceEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceEdge(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -18911,7 +14939,7 @@ func (ec *executionContext) marshalNBalanceEdge2ᚕᚖgithubᚗcomᚋstellarᚋw func (ec *executionContext) marshalNBalanceEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐBalanceEdge(ctx context.Context, sel ast.SelectionSet, v *BalanceEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -18928,7 +14956,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se res := graphql.MarshalBoolean(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -18944,7 +14972,7 @@ func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.Selec res := graphql.MarshalInt32(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -18960,7 +14988,7 @@ func (ec *executionContext) marshalNInt642int64(ctx context.Context, sel ast.Sel res := graphql.MarshalInt64(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -18969,7 +14997,7 @@ func (ec *executionContext) marshalNInt642int64(ctx context.Context, sel ast.Sel func (ec *executionContext) marshalNOperationEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationEdge(ctx context.Context, sel ast.SelectionSet, v *OperationEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -18987,7 +15015,7 @@ func (ec *executionContext) marshalNOperationType2githubᚗcomᚋstellarᚋwalle res := graphql.MarshalString(string(v)) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -18996,7 +15024,7 @@ func (ec *executionContext) marshalNOperationType2githubᚗcomᚋstellarᚋwalle func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *PageInfo) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -19014,7 +15042,7 @@ func (ec *executionContext) marshalNStateChangeCategory2githubᚗcomᚋstellar res := graphql.MarshalString(string(v)) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -19023,7 +15051,7 @@ func (ec *executionContext) marshalNStateChangeCategory2githubᚗcomᚋstellar func (ec *executionContext) marshalNStateChangeEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeEdge(ctx context.Context, sel ast.SelectionSet, v *StateChangeEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -19041,7 +15069,7 @@ func (ec *executionContext) marshalNStateChangeReason2githubᚗcomᚋstellarᚋw res := graphql.MarshalString(string(v)) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -19057,7 +15085,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -19103,7 +15131,7 @@ func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel as res := graphql.MarshalTime(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -19126,7 +15154,7 @@ func (ec *executionContext) marshalNTransaction2githubᚗcomᚋstellarᚋwallet func (ec *executionContext) marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋindexerᚋtypesᚐTransaction(ctx context.Context, sel ast.SelectionSet, v *types.Transaction) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -19136,7 +15164,7 @@ func (ec *executionContext) marshalNTransaction2ᚖgithubᚗcomᚋstellarᚋwall func (ec *executionContext) marshalNTransactionEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionEdge(ctx context.Context, sel ast.SelectionSet, v *TransactionEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -19153,7 +15181,7 @@ func (ec *executionContext) marshalNUInt322uint32(ctx context.Context, sel ast.S res := scalars.MarshalUInt32(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -19164,39 +15192,11 @@ func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlge } func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19217,7 +15217,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -19239,39 +15239,11 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx conte } func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19295,39 +15267,11 @@ func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlg } func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19343,39 +15287,11 @@ func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋg } func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19389,7 +15305,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -19406,7 +15322,7 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -19518,39 +15434,11 @@ func (ec *executionContext) marshalOOperationEdge2ᚕᚖgithubᚗcomᚋstellar if v == nil { return graphql.Null } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalNOperationEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationEdge(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNOperationEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐOperationEdge(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19572,39 +15460,11 @@ func (ec *executionContext) marshalOStateChangeEdge2ᚕᚖgithubᚗcomᚋstellar if v == nil { return graphql.Null } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalNStateChangeEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeEdge(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNStateChangeEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐStateChangeEdge(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19669,39 +15529,11 @@ func (ec *executionContext) marshalOTransactionEdge2ᚕᚖgithubᚗcomᚋstellar if v == nil { return graphql.Null } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalNTransactionEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionEdge(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNTransactionEdge2ᚖgithubᚗcomᚋstellarᚋwalletᚑbackendᚋinternalᚋserveᚋgraphqlᚋgeneratedᚐTransactionEdge(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19716,39 +15548,11 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq if v == nil { return graphql.Null } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19763,39 +15567,11 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen if v == nil { return graphql.Null } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19810,39 +15586,11 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg if v == nil { return graphql.Null } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { @@ -19864,39 +15612,11 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen if v == nil { return graphql.Null } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + }) for _, e := range ret { if e == graphql.Null { diff --git a/internal/serve/graphql/resolvers/account.resolvers.go b/internal/serve/graphql/resolvers/account.resolvers.go index 53ec8d65c..c3bd335a3 100644 --- a/internal/serve/graphql/resolvers/account.resolvers.go +++ b/internal/serve/graphql/resolvers/account.resolvers.go @@ -1,8 +1,9 @@ package resolvers -// This file will be automatically regenerated based on the schema, any resolver implementations +// This file will be automatically regenerated based on the schema, any resolver +// implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.76 +// Code generated by github.com/99designs/gqlgen version v0.17.88 import ( "context" @@ -10,11 +11,10 @@ import ( "strings" "time" - "github.com/vektah/gqlparser/v2/gqlerror" - "github.com/stellar/wallet-backend/internal/indexer/types" graphql1 "github.com/stellar/wallet-backend/internal/serve/graphql/generated" "github.com/stellar/wallet-backend/internal/utils" + "github.com/vektah/gqlparser/v2/gqlerror" ) // Address is the resolver for the address field. diff --git a/internal/serve/graphql/resolvers/operation.resolvers.go b/internal/serve/graphql/resolvers/operation.resolvers.go index 7b50133da..1debac4a6 100644 --- a/internal/serve/graphql/resolvers/operation.resolvers.go +++ b/internal/serve/graphql/resolvers/operation.resolvers.go @@ -1,8 +1,9 @@ package resolvers -// This file will be automatically regenerated based on the schema, any resolver implementations +// This file will be automatically regenerated based on the schema, any resolver +// implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.76 +// Code generated by github.com/99designs/gqlgen version v0.17.88 import ( "context" diff --git a/internal/serve/graphql/resolvers/queries.resolvers.go b/internal/serve/graphql/resolvers/queries.resolvers.go index 4f54282ea..6774ff1d0 100644 --- a/internal/serve/graphql/resolvers/queries.resolvers.go +++ b/internal/serve/graphql/resolvers/queries.resolvers.go @@ -1,19 +1,19 @@ package resolvers -// This file will be automatically regenerated based on the schema, any resolver implementations +// This file will be automatically regenerated based on the schema, any resolver +// implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.76 +// Code generated by github.com/99designs/gqlgen version v0.17.88 import ( "context" "fmt" "strings" - "github.com/vektah/gqlparser/v2/gqlerror" - "github.com/stellar/wallet-backend/internal/indexer/types" graphql1 "github.com/stellar/wallet-backend/internal/serve/graphql/generated" "github.com/stellar/wallet-backend/internal/utils" + "github.com/vektah/gqlparser/v2/gqlerror" ) // TransactionByHash is the resolver for the transactionByHash field. diff --git a/internal/serve/graphql/resolvers/statechange.resolvers.go b/internal/serve/graphql/resolvers/statechange.resolvers.go index 571833b6f..e6db05c6e 100644 --- a/internal/serve/graphql/resolvers/statechange.resolvers.go +++ b/internal/serve/graphql/resolvers/statechange.resolvers.go @@ -1,8 +1,9 @@ package resolvers -// This file will be automatically regenerated based on the schema, any resolver implementations +// This file will be automatically regenerated based on the schema, any resolver +// implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.76 +// Code generated by github.com/99designs/gqlgen version v0.17.88 import ( "context" diff --git a/internal/serve/graphql/resolvers/transaction.resolvers.go b/internal/serve/graphql/resolvers/transaction.resolvers.go index 553657679..6ffafc610 100644 --- a/internal/serve/graphql/resolvers/transaction.resolvers.go +++ b/internal/serve/graphql/resolvers/transaction.resolvers.go @@ -1,8 +1,9 @@ package resolvers -// This file will be automatically regenerated based on the schema, any resolver implementations +// This file will be automatically regenerated based on the schema, any resolver +// implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.76 +// Code generated by github.com/99designs/gqlgen version v0.17.88 import ( "context" From 0b56dbcce1de62aeefe010d81c7f5a827a4a61ab Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 11:41:56 -0400 Subject: [PATCH 18/20] fix(ci): restore indentation on the deadcode step in go.yaml When the `exhaustive` step was removed in an earlier commit, the leading whitespace of the following `deadcode` step's `- name:` line was trimmed to column 1, breaking the YAML at parse time. GitHub Actions treated the entire `Go` workflow as invalid and skipped it on this PR (the two checks that appeared were from a separate CodeQL workflow). Restore the 6-space indentation so the step nests correctly under `jobs.check.steps`. --- .github/workflows/go.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index ccfc4b9ec..e659730e3 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -36,7 +36,7 @@ jobs: go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.43.0 shadow ./... | { grep -v "generated.go" || true; } -- name: Run `deadcode@v0.43.0` + - name: Run `deadcode@v0.43.0` run: | go install golang.org/x/tools/cmd/deadcode@v0.43.0 output=$(deadcode -test ./... | { grep -v "UnmarshalUInt32" || true; } | { grep -v "isBalance" || true; }) From d7119889a14602c4baad10639810bf3e64101603 Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 11:47:06 -0400 Subject: [PATCH 19/20] chore(graphql): normalize gqlgen output with goimports -local gqlgen's raw output groups all imports in one block, which violates the repo's `github.com/stellar/wallet-backend` local-prefix convention. The `make tidy` target runs goimports with the local prefix to split the imports into third-party / local groups, but the CI workflow runs goimports as a standalone check step (not via `make tidy`), so it catches any post-regen imports that were not normalized. Apply `goimports -local github.com/stellar/wallet-backend -w` to the three regenerated files (generated.go, account.resolvers.go, queries.resolvers.go). --- internal/serve/graphql/generated/generated.go | 5 +++-- internal/serve/graphql/resolvers/account.resolvers.go | 3 ++- internal/serve/graphql/resolvers/queries.resolvers.go | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/serve/graphql/generated/generated.go b/internal/serve/graphql/generated/generated.go index 00cde9737..f618437b4 100644 --- a/internal/serve/graphql/generated/generated.go +++ b/internal/serve/graphql/generated/generated.go @@ -13,10 +13,11 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/stellar/wallet-backend/internal/indexer/types" - "github.com/stellar/wallet-backend/internal/serve/graphql/scalars" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" + + "github.com/stellar/wallet-backend/internal/indexer/types" + "github.com/stellar/wallet-backend/internal/serve/graphql/scalars" ) // region ************************** generated!.gotpl ************************** diff --git a/internal/serve/graphql/resolvers/account.resolvers.go b/internal/serve/graphql/resolvers/account.resolvers.go index c3bd335a3..a6bc51401 100644 --- a/internal/serve/graphql/resolvers/account.resolvers.go +++ b/internal/serve/graphql/resolvers/account.resolvers.go @@ -11,10 +11,11 @@ import ( "strings" "time" + "github.com/vektah/gqlparser/v2/gqlerror" + "github.com/stellar/wallet-backend/internal/indexer/types" graphql1 "github.com/stellar/wallet-backend/internal/serve/graphql/generated" "github.com/stellar/wallet-backend/internal/utils" - "github.com/vektah/gqlparser/v2/gqlerror" ) // Address is the resolver for the address field. diff --git a/internal/serve/graphql/resolvers/queries.resolvers.go b/internal/serve/graphql/resolvers/queries.resolvers.go index 6774ff1d0..9f9f46183 100644 --- a/internal/serve/graphql/resolvers/queries.resolvers.go +++ b/internal/serve/graphql/resolvers/queries.resolvers.go @@ -10,10 +10,11 @@ import ( "fmt" "strings" + "github.com/vektah/gqlparser/v2/gqlerror" + "github.com/stellar/wallet-backend/internal/indexer/types" graphql1 "github.com/stellar/wallet-backend/internal/serve/graphql/generated" "github.com/stellar/wallet-backend/internal/utils" - "github.com/vektah/gqlparser/v2/gqlerror" ) // TransactionByHash is the resolver for the transactionByHash field. From df8a953ef5445f27398a51d724517d647443db4d Mon Sep 17 00:00:00 2001 From: Aditya Vyas Date: Wed, 22 Apr 2026 12:16:17 -0400 Subject: [PATCH 20/20] ingest(streaming-loadtest): buffer and replay drained frames from archive checkpoint The constructor drains the pipe to unstick apply-load until the history archive publishes a checkpoint. Previously those drained frames were discarded, and the ingest loop then started at the archive checkpoint and hit a sequence mismatch because the pipe had already advanced past that ledger. Now the drain retains every frame it reads, trims the retained slice to start at the archive checkpoint once published, and GetLedger replays the buffered frames before resuming pipe reads. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../streaming_loadtest_ledger_backend.go | 46 +++++++++++++++++-- .../streaming_loadtest_ledger_backend_test.go | 14 +++--- 2 files changed, 48 insertions(+), 12 deletions(-) diff --git a/internal/ingest/streaming_loadtest_ledger_backend.go b/internal/ingest/streaming_loadtest_ledger_backend.go index b03a6cf3d..5a6293e89 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend.go +++ b/internal/ingest/streaming_loadtest_ledger_backend.go @@ -57,6 +57,18 @@ type StreamingLoadtestLedgerBackend struct { latestSeqSeen uint32 lastEmitTime time.Time done bool + + // pendingFrames holds frames drained from the pipe during constructor + // startup that GetLedger must replay before reading from the pipe again. + // + // The drain unsticks apply-load (see StreamingLoadtestBackendConfig.ArchiveURL) + // and stops once it has consumed a frame with seq >= archive checkpoint. + // Because the archive poll is asynchronous, the drain typically overshoots + // the checkpoint by a few ledgers. Rather than discard those frames (the + // ingest loop would start from the archive checkpoint and hit a sequence + // mismatch on the pipe), we buffer every frame from the archive checkpoint + // onward and replay them here. + pendingFrames []xdr.LedgerCloseMeta } // Verify interface implementation at compile time. @@ -154,6 +166,10 @@ func (b *StreamingLoadtestLedgerBackend) drainUntilArchiveReady(ctx context.Cont }() var archiveCheckpointLedger uint32 + // buffered holds every frame we have read, in order. Once the archive + // publishes a checkpoint C, we trim buffered to start at C and hand the + // remainder to GetLedger via pendingFrames. + var buffered []xdr.LedgerCloseMeta for { if archiveCheckpointLedger == 0 { select { @@ -176,6 +192,7 @@ func (b *StreamingLoadtestLedgerBackend) drainUntilArchiveReady(ctx context.Cont return fmt.Errorf("reading meta frame during drain: %w", err) } seq := lcm.LedgerSequence() + buffered = append(buffered, lcm) b.mu.Lock() if seq > b.latestSeqSeen { b.latestSeqSeen = seq @@ -183,7 +200,21 @@ func (b *StreamingLoadtestLedgerBackend) drainUntilArchiveReady(ctx context.Cont b.mu.Unlock() if archiveCheckpointLedger > 0 && seq >= archiveCheckpointLedger { - log.Ctx(ctx).Infof("streaming-loadtest: drain complete at ledger %d; handing off to GetLedger", seq) + // Trim buffered to start at the archive checkpoint so the caller + // can replay from there. If the checkpoint ledger was already + // discarded above (drain outran the archive poll), the earliest + // retained frame is our effective replay start. + start := 0 + for i, f := range buffered { + if f.LedgerSequence() >= archiveCheckpointLedger { + start = i + break + } + } + b.mu.Lock() + b.pendingFrames = buffered[start:] + b.mu.Unlock() + log.Ctx(ctx).Infof("streaming-loadtest: drain complete at ledger %d; buffered %d frame(s) starting at ledger %d for replay", seq, len(buffered)-start, buffered[start].LedgerSequence()) return nil } } @@ -284,11 +315,16 @@ func (b *StreamingLoadtestLedgerBackend) GetLedger(ctx context.Context, sequence } var lcm xdr.LedgerCloseMeta - if err := b.xdrStream.ReadOne(&lcm); err != nil { - if errors.Is(err, io.EOF) { - return xdr.LedgerCloseMeta{}, fmt.Errorf("meta stream ended: %w", io.EOF) + if len(b.pendingFrames) > 0 { + lcm = b.pendingFrames[0] + b.pendingFrames = b.pendingFrames[1:] + } else { + if err := b.xdrStream.ReadOne(&lcm); err != nil { + if errors.Is(err, io.EOF) { + return xdr.LedgerCloseMeta{}, fmt.Errorf("meta stream ended: %w", io.EOF) + } + return xdr.LedgerCloseMeta{}, fmt.Errorf("reading meta frame: %w", err) } - return xdr.LedgerCloseMeta{}, fmt.Errorf("reading meta frame: %w", err) } gotSeq := lcm.LedgerSequence() diff --git a/internal/ingest/streaming_loadtest_ledger_backend_test.go b/internal/ingest/streaming_loadtest_ledger_backend_test.go index 01019eb36..35dccab7c 100644 --- a/internal/ingest/streaming_loadtest_ledger_backend_test.go +++ b/internal/ingest/streaming_loadtest_ledger_backend_test.go @@ -337,20 +337,20 @@ func TestStreamingLoadtestBackend_DrainsUntilArchiveReady(t *testing.T) { require.NoError(t, err) defer backend.Close() - // The drain returns once it consumes a frame with seq >= archive's currentLedger. - // The exact handoff seq can be 7 or higher (archive reports 7, drain may have - // already overshot). Grab whatever the backend thinks is next via reading and - // asserting monotonic progress instead of pinning to a specific seq. + // The drain returns once it consumes a frame with seq >= archive's currentLedger (7). + // After drain, the backend buffers every frame from the archive checkpoint onward + // and replays them via GetLedger. The first replayed frame must be the archive + // checkpoint itself, since the drain retains every frame it consumes until the + // checkpoint is known, then trims to start at the checkpoint. lastSeen, err := backend.GetLatestLedgerSequence(context.Background()) require.NoError(t, err) assert.GreaterOrEqual(t, lastSeen, uint32(7), "drain should have consumed >= the archive checkpoint") - // Next GetLedger should read the ledger with seq = lastSeen + 1 from the pipe. ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() - lcm, err := backend.GetLedger(ctx, lastSeen+1) + lcm, err := backend.GetLedger(ctx, 7) require.NoError(t, err) - assert.Equal(t, lastSeen+1, lcm.LedgerSequence()) + assert.Equal(t, uint32(7), lcm.LedgerSequence(), "first replayed frame should be the archive checkpoint") writerCancel() <-writerDone