From 150d4a48a565be80b03c6004acb35380b94f605a Mon Sep 17 00:00:00 2001 From: Saad Ur Rahman Date: Thu, 27 Nov 2025 16:11:39 -0500 Subject: [PATCH 1/7] [Go] deps upgrade. --- go.mod | 87 +++++++++++------------ go.sum | 218 +++++++++++++++++++++++---------------------------------- 2 files changed, 129 insertions(+), 176 deletions(-) diff --git a/go.mod b/go.mod index c33d56e..b286402 100644 --- a/go.mod +++ b/go.mod @@ -1,31 +1,31 @@ module github.com/surahman/FTeX -go 1.24 +go 1.24.0 toolchain go1.24.2 require ( - github.com/99designs/gqlgen v0.17.76 - github.com/gin-gonic/gin v1.10.1 - github.com/go-playground/validator/v10 v10.27.0 + github.com/99designs/gqlgen v0.17.84 + github.com/gin-gonic/gin v1.11.0 + github.com/go-playground/validator/v10 v10.28.0 github.com/gofrs/uuid v4.4.0+incompatible - github.com/golang-jwt/jwt/v5 v5.2.2 + github.com/golang-jwt/jwt/v5 v5.3.0 github.com/golang/mock v1.6.0 - github.com/imroc/req/v3 v3.54.0 - github.com/jackc/pgx/v5 v5.7.5 - github.com/redis/go-redis/v9 v9.11.0 + github.com/imroc/req/v3 v3.56.0 + github.com/jackc/pgx/v5 v5.7.6 + github.com/redis/go-redis/v9 v9.17.1 github.com/rs/xid v1.6.0 github.com/shopspring/decimal v1.4.0 - github.com/spf13/afero v1.14.0 - github.com/spf13/viper v1.20.1 - github.com/stretchr/testify v1.10.0 + github.com/spf13/afero v1.15.0 + github.com/spf13/viper v1.21.0 + github.com/stretchr/testify v1.11.1 github.com/swaggo/files v1.0.1 - github.com/swaggo/gin-swagger v1.6.0 - github.com/swaggo/swag v1.16.4 - github.com/vektah/gqlparser/v2 v2.5.30 + github.com/swaggo/gin-swagger v1.6.1 + github.com/swaggo/swag v1.16.6 + github.com/vektah/gqlparser/v2 v2.5.31 go.uber.org/automaxprocs v1.6.0 - go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.39.0 + go.uber.org/zap v1.27.1 + golang.org/x/crypto v0.45.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -33,16 +33,15 @@ require ( github.com/KyleBanks/depth v1.2.1 // indirect github.com/agnivade/levenshtein v1.2.1 // indirect github.com/andybalholm/brotli v1.2.0 // indirect - github.com/bytedance/sonic v1.13.3 // indirect - github.com/bytedance/sonic/loader v0.2.4 // indirect + github.com/bytedance/sonic v1.14.0 // indirect + github.com/bytedance/sonic/loader v0.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudflare/circl v1.6.1 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/gabriel-vasile/mimetype v1.4.10 // indirect github.com/gin-contrib/sse v1.1.0 // indirect github.com/go-openapi/jsonpointer v0.21.1 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect @@ -50,10 +49,10 @@ require ( github.com/go-openapi/swag v0.23.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-task/slim-sprig/v3 v3.0.0 // indirect - github.com/go-viper/mapstructure/v2 v2.3.0 // indirect + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/pprof v0.0.0-20250501235452-c0086092b71a // indirect + github.com/goccy/go-yaml v1.18.0 // indirect + github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -65,38 +64,36 @@ require ( github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.18.0 // indirect - github.com/klauspost/cpuid/v2 v2.2.11 // indirect + github.com/klauspost/compress v1.18.1 // indirect + github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mailru/easyjson v0.9.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/onsi/ginkgo/v2 v2.23.4 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/quic-go/qpack v0.5.1 // indirect - github.com/quic-go/quic-go v0.53.0 // indirect - github.com/refraction-networking/utls v1.7.3 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/sagikazarmark/locafero v0.9.0 // indirect + github.com/quic-go/quic-go v0.56.0 // indirect + github.com/refraction-networking/utls v1.8.1 // indirect + github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/sosodev/duration v1.3.1 // indirect - github.com/sourcegraph/conc v0.3.0 // indirect - github.com/spf13/cast v1.9.2 // indirect - github.com/spf13/pflag v1.0.6 // indirect + github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect + github.com/spf13/cast v1.10.0 // indirect + github.com/spf13/pflag v1.0.10 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.3.0 // indirect - github.com/urfave/cli/v2 v2.27.7 // indirect - github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect - go.uber.org/mock v0.5.2 // indirect + github.com/urfave/cli/v3 v3.6.1 // indirect + go.uber.org/mock v0.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/arch v0.18.0 // indirect - golang.org/x/mod v0.25.0 // indirect - golang.org/x/net v0.41.0 // indirect - golang.org/x/sync v0.15.0 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/text v0.26.0 // indirect - golang.org/x/tools v0.34.0 // indirect - google.golang.org/protobuf v1.36.6 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/arch v0.20.0 // indirect + golang.org/x/mod v0.30.0 // indirect + golang.org/x/net v0.47.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/sys v0.38.0 // indirect + golang.org/x/text v0.31.0 // indirect + golang.org/x/tools v0.39.0 // indirect + google.golang.org/protobuf v1.36.10 // indirect ) diff --git a/go.sum b/go.sum index 17670eb..06fad83 100644 --- a/go.sum +++ b/go.sum @@ -1,17 +1,13 @@ -github.com/99designs/gqlgen v0.17.73 h1:A3Ki+rHWqKbAOlg5fxiZBnz6OjW3nwupDHEG15gEsrg= -github.com/99designs/gqlgen v0.17.73/go.mod h1:2RyGWjy2k7W9jxrs8MOQthXGkD3L3oGr0jXW3Pu8lGg= -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.84 h1:iVMdiStgUVx/BFkMb0J5GAXlqfqtQ7bqMCYK6v52kQ0= +github.com/99designs/gqlgen v0.17.84/go.mod h1:qjoUqzTeiejdo+bwUg8unqSpeYG42XrcrQboGIezmFA= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/PuerkitoBio/goquery v1.10.3 h1:pFYcNSqHxBD06Fpj/KsbStFRsgRATgnf3LeXiUkhzPo= -github.com/PuerkitoBio/goquery v1.10.3/go.mod h1:tMUX0zDMHXYlAQk6p35XxQMqMweEKB7iK7iLNd4RH4Y= +github.com/PuerkitoBio/goquery v1.11.0 h1:jZ7pwMQXIITcUXNH83LLk+txlaEy6NVOfTuP43xxfqw= +github.com/PuerkitoBio/goquery v1.11.0/go.mod h1:wQHgxUOU3JGuj3oD/QFfxUdlzW6xPHfqyHre6VMY4DQ= github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM= github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= -github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ= github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM= @@ -22,22 +18,16 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= -github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ= -github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= -github.com/bytedance/sonic v1.13.3 h1:MS8gmaH16Gtirygw7jV91pDCN33NyMrPbN7qiYhEsF0= -github.com/bytedance/sonic v1.13.3/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= -github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= +github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= +github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= +github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= -github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -50,16 +40,14 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0= +github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= @@ -74,29 +62,26 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k= -github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= -github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/go-viper/mapstructure/v2 v2.3.0 h1:27XbWsHIqhbdR5TIC911OfYvgSaW93HM+dX7970Q7jk= -github.com/go-viper/mapstructure/v2 v2.3.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688= +github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU= +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/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= +github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= -github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250501235452-c0086092b71a h1:rDA3FfmxwXR+BVKKdz55WwMJ1pD2hJQNW31d+l3mPk4= -github.com/google/pprof v0.0.0-20250501235452-c0086092b71a/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -110,16 +95,16 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/icholy/digest v1.1.0 h1:HfGg9Irj7i+IX1o1QAmPfIBNu/Q5A5Tu3n/MED9k9H4= github.com/icholy/digest v1.1.0/go.mod h1:QNrsSGQ5v7v9cReDI0+eyjsXGUoRSUZQHeQ5C4XLa0Y= -github.com/imroc/req/v3 v3.52.2 h1:xJocr1aIv0a2K9knfBQ4JnZHk+kWTITdjf0mgDg229I= -github.com/imroc/req/v3 v3.52.2/go.mod h1:dBGsDloOSZJcFs6PnTjZXYBJK70OXbZpizHBLNqcH2k= github.com/imroc/req/v3 v3.54.0 h1:kwWJSpT7OvjJ/Q8ykp+69Ye5H486RKDcgEoepw1Ren4= github.com/imroc/req/v3 v3.54.0/go.mod h1:P8gCJjG/XNUFeP6WOi40VAXfYwT+uPM00xvoBWiwzUQ= +github.com/imroc/req/v3 v3.56.0 h1:t6YdqqerYBXhZ9+VjqsQs5wlKxdUNEvsgBhxWc1AEEo= +github.com/imroc/req/v3 v3.56.0/go.mod h1:cUZSooE8hhzFNOrAbdxuemXDQxFXLQTnu3066jr7ZGk= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.7.5 h1:JHGfMnQY+IEtGM63d+NGMjoRpysB2JBwDr5fsngwmJs= -github.com/jackc/pgx/v5 v5.7.5/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M= +github.com/jackc/pgx/v5 v5.7.6 h1:rWQc5FwZSPX58r1OQmkuaNicxdmExaEz5A2DO2hUuTk= +github.com/jackc/pgx/v5 v5.7.6/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -128,12 +113,10 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= -github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/klauspost/cpuid/v2 v2.2.11 h1:0OwqZRYI2rFrjS4kvkDnqJkKHdHaRnCm68/DY4OxRzU= -github.com/klauspost/cpuid/v2 v2.2.11/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co= +github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0= +github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= +github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -149,10 +132,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= -github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= -github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU= -github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -162,42 +141,38 @@ github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4 github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= -github.com/quic-go/quic-go v0.52.0 h1:/SlHrCRElyaU6MaEPKqKr9z83sBg2v4FLLvWM+Z47pA= -github.com/quic-go/quic-go v0.52.0/go.mod h1:MFlGGpcpJqRAfmYi6NC2cptDPSxRWTOGNuP4wqrWmzQ= -github.com/quic-go/quic-go v0.53.0 h1:QHX46sISpG2S03dPeZBgVIZp8dGagIaiu2FiVYvpCZI= -github.com/quic-go/quic-go v0.53.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY= -github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI= -github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= -github.com/redis/go-redis/v9 v9.11.0 h1:E3S08Gl/nJNn5vkxd2i78wZxWAPNZgUNTp8WIJUAiIs= -github.com/redis/go-redis/v9 v9.11.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw= +github.com/quic-go/quic-go v0.54.0 h1:6s1YB9QotYI6Ospeiguknbp2Znb/jZYjZLRXn9kMQBg= +github.com/quic-go/quic-go v0.54.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY= +github.com/quic-go/quic-go v0.56.0 h1:q/TW+OLismmXAehgFLczhCDTYB3bFmua4D9lsNBWxvY= +github.com/quic-go/quic-go v0.56.0/go.mod h1:9gx5KsFQtw2oZ6GZTyh+7YEvOxWCL9WZAepnHxgAo6c= +github.com/redis/go-redis/v9 v9.17.1 h1:7tl732FjYPRT9H9aNfyTwKg9iTETjWjGKEJ2t/5iWTs= +github.com/redis/go-redis/v9 v9.17.1/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= github.com/refraction-networking/utls v1.7.3 h1:L0WRhHY7Oq1T0zkdzVZMR6zWZv+sXbHB9zcuvsAEqCo= github.com/refraction-networking/utls v1.7.3/go.mod h1:TUhh27RHMGtQvjQq+RyO11P6ZNQNBb3N0v7wsEjKAIQ= +github.com/refraction-networking/utls v1.8.1 h1:yNY1kapmQU8JeM1sSw2H2asfTIwWxIkrMJI0pRUOCAo= +github.com/refraction-networking/utls v1.8.1/go.mod h1:jkSOEkLqn+S/jtpEHPOsVv/4V4EVnelwbMQl4vCWXAM= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.9.0 h1:GbgQGNtTrEmddYDSAH9QLRyfAHY12md+8YFTqyMTC9k= -github.com/sagikazarmark/locafero v0.9.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk= +github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= +github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= 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/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.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA= -github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo= -github.com/spf13/cast v1.8.0 h1:gEN9K4b8Xws4EX0+a0reLmhq8moKn7ntRlQYgjPeCDk= -github.com/spf13/cast v1.8.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE= -github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= -github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= +github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= +github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= +github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= +github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -206,32 +181,24 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= -github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= -github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= -github.com/swaggo/swag v1.16.4 h1:clWJtd9LStiG3VeijiCfOVODP6VpHtKdQy9ELFG3s1A= -github.com/swaggo/swag v1.16.4/go.mod h1:VBsHJRsDvfYvqoiMKnsdwhNV9LEMHgEDZcyVYX0sxPg= +github.com/swaggo/gin-swagger v1.6.1 h1:Ri06G4gc9N4t4k8hekMigJ9zKTFSlqj/9paAQCQs7cY= +github.com/swaggo/gin-swagger v1.6.1/go.mod h1:LQ+hJStHakCWRiK/YNYtJOu4mR2FP+pxLnILT/qNiTw= +github.com/swaggo/swag v1.16.6 h1:qBNcx53ZaX+M5dxVyTrgQ0PJ/ACK+NzhwcbieTt+9yI= +github.com/swaggo/swag v1.16.6/go.mod h1:ngP2etMK5a0P3QBizic5MEwpRmluJZPHjXcMoj4Xesg= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= -github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g= -github.com/urfave/cli/v2 v2.27.6/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= -github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU= -github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4= -github.com/vektah/gqlparser/v2 v2.5.27 h1:RHPD3JOplpk5mP5JGX8RKZkt2/Vwj/PZv0HxTdwFp0s= -github.com/vektah/gqlparser/v2 v2.5.27/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo= -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/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= -github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= +github.com/urfave/cli/v3 v3.6.1 h1:j8Qq8NyUawj/7rTYdBGrxcH7A/j7/G8Q5LhWEW4G3Mo= +github.com/urfave/cli/v3 v3.6.1/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= +github.com/vektah/gqlparser/v2 v2.5.31 h1:YhWGA1mfTjID7qJhd1+Vxhpk5HTgydrGU9IgkWBTJ7k= +github.com/vektah/gqlparser/v2 v2.5.31/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts= github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -242,44 +209,37 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/arch v0.17.0 h1:4O3dfLzd+lQewptAHqjewQZQDyEdejz3VwgeYwkZneU= -golang.org/x/arch v0.17.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/arch v0.18.0 h1:WN9poc33zL4AzGxqf8VtpKUnGvMi8O9lhNyBMF/85qc= -golang.org/x/arch v0.18.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= +go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= +go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c= +golang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= 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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= -golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= -golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= -golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= -golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= +golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= -golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= -golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= -golang.org/x/sync v0.15.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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -290,8 +250,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +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.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -299,23 +259,20 @@ 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.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= -golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= -golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= -golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= -golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/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= @@ -324,4 +281,3 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= From d9f5cf46b8e8962a2711a39781beaa55c67599c9 Mon Sep 17 00:00:00 2001 From: Saad Ur Rahman Date: Thu, 27 Nov 2025 16:15:46 -0500 Subject: [PATCH 2/7] [GraphQL] regen after update. --- pkg/graphql/generated/auth.generated.go | 125 +- pkg/graphql/generated/common.generated.go | 447 ++--- pkg/graphql/generated/crypto.generated.go | 783 +++----- pkg/graphql/generated/fiat.generated.go | 1037 ++++------- .../generated/healthcheck.generated.go | 666 ++----- pkg/graphql/generated/prelude.generated.go | 1650 ++++++----------- pkg/graphql/generated/scalars.generated.go | 8 +- pkg/graphql/generated/user.generated.go | 651 ++----- pkg/graphql/resolvers/common.resolvers.go | 5 +- pkg/graphql/resolvers/crypto.resolvers.go | 5 +- pkg/graphql/resolvers/fiat.resolvers.go | 5 +- .../resolvers/healthcheck.resolvers.go | 5 +- pkg/graphql/resolvers/user.resolvers.go | 5 +- 13 files changed, 1633 insertions(+), 3759 deletions(-) diff --git a/pkg/graphql/generated/auth.generated.go b/pkg/graphql/generated/auth.generated.go index 5882dd8..21ecf4e 100644 --- a/pkg/graphql/generated/auth.generated.go +++ b/pkg/graphql/generated/auth.generated.go @@ -28,34 +28,19 @@ import ( // region **************************** field.gotpl ***************************** func (ec *executionContext) _JWTAuthResponse_token(ctx context.Context, field graphql.CollectedField, obj *models.JWTAuthResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_JWTAuthResponse_token(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.Token, 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_JWTAuthResponse_token, + func(ctx context.Context) (any, error) { + return obj.Token, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_JWTAuthResponse_token(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -72,34 +57,19 @@ func (ec *executionContext) fieldContext_JWTAuthResponse_token(_ context.Context } func (ec *executionContext) _JWTAuthResponse_expires(ctx context.Context, field graphql.CollectedField, obj *models.JWTAuthResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_JWTAuthResponse_expires(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.Expires, 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_JWTAuthResponse_expires, + func(ctx context.Context) (any, error) { + return obj.Expires, nil + }, + nil, + ec.marshalNInt642int64, + true, + true, + ) } func (ec *executionContext) fieldContext_JWTAuthResponse_expires(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -116,34 +86,19 @@ func (ec *executionContext) fieldContext_JWTAuthResponse_expires(_ context.Conte } func (ec *executionContext) _JWTAuthResponse_threshold(ctx context.Context, field graphql.CollectedField, obj *models.JWTAuthResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_JWTAuthResponse_threshold(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.Threshold, 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_JWTAuthResponse_threshold, + func(ctx context.Context) (any, error) { + return obj.Threshold, nil + }, + nil, + ec.marshalNInt642int64, + true, + true, + ) } func (ec *executionContext) fieldContext_JWTAuthResponse_threshold(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -231,7 +186,7 @@ func (ec *executionContext) marshalNJWTAuthResponse2githubᚗcomᚋsurahmanᚋFT func (ec *executionContext) marshalNJWTAuthResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐJWTAuthResponse(ctx context.Context, sel ast.SelectionSet, v *models.JWTAuthResponse) 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 } diff --git a/pkg/graphql/generated/common.generated.go b/pkg/graphql/generated/common.generated.go index 81e84dd..ceaf427 100644 --- a/pkg/graphql/generated/common.generated.go +++ b/pkg/graphql/generated/common.generated.go @@ -39,31 +39,19 @@ type PriceQuoteResolver interface { // region **************************** field.gotpl ***************************** func (ec *executionContext) _Links_nextPage(ctx context.Context, field graphql.CollectedField, obj *models.HTTPLinks) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Links_nextPage(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.NextPage, 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.marshalOString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Links_nextPage, + func(ctx context.Context) (any, error) { + return obj.NextPage, nil + }, + nil, + ec.marshalOString2string, + true, + false, + ) } func (ec *executionContext) fieldContext_Links_nextPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -80,31 +68,19 @@ func (ec *executionContext) fieldContext_Links_nextPage(_ context.Context, field } func (ec *executionContext) _Links_pageCursor(ctx context.Context, field graphql.CollectedField, obj *models.HTTPLinks) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Links_pageCursor(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.PageCursor, 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.marshalOString2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Links_pageCursor, + func(ctx context.Context) (any, error) { + return obj.PageCursor, nil + }, + nil, + ec.marshalOString2string, + true, + false, + ) } func (ec *executionContext) fieldContext_Links_pageCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -121,34 +97,19 @@ func (ec *executionContext) fieldContext_Links_pageCursor(_ context.Context, fie } func (ec *executionContext) _OfferResponse_priceQuote(ctx context.Context, field graphql.CollectedField, obj *models.HTTPExchangeOfferResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OfferResponse_priceQuote(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.PriceQuote, 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.(models.PriceQuote) - fc.Result = res - return ec.marshalNPriceQuote2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐPriceQuote(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_OfferResponse_priceQuote, + func(ctx context.Context) (any, error) { + return obj.PriceQuote, nil + }, + nil, + ec.marshalNPriceQuote2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐPriceQuote, + true, + true, + ) } func (ec *executionContext) fieldContext_OfferResponse_priceQuote(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -177,34 +138,19 @@ func (ec *executionContext) fieldContext_OfferResponse_priceQuote(_ context.Cont } func (ec *executionContext) _OfferResponse_debitAmount(ctx context.Context, field graphql.CollectedField, obj *models.HTTPExchangeOfferResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OfferResponse_debitAmount(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.OfferResponse().DebitAmount(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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_OfferResponse_debitAmount, + func(ctx context.Context) (any, error) { + return ec.resolvers.OfferResponse().DebitAmount(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_OfferResponse_debitAmount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -221,34 +167,19 @@ func (ec *executionContext) fieldContext_OfferResponse_debitAmount(_ context.Con } func (ec *executionContext) _OfferResponse_offerID(ctx context.Context, field graphql.CollectedField, obj *models.HTTPExchangeOfferResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OfferResponse_offerID(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.OfferID, 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_OfferResponse_offerID, + func(ctx context.Context) (any, error) { + return obj.OfferID, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_OfferResponse_offerID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -265,34 +196,19 @@ func (ec *executionContext) fieldContext_OfferResponse_offerID(_ context.Context } func (ec *executionContext) _OfferResponse_expires(ctx context.Context, field graphql.CollectedField, obj *models.HTTPExchangeOfferResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OfferResponse_expires(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.Expires, 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_OfferResponse_expires, + func(ctx context.Context) (any, error) { + return obj.Expires, nil + }, + nil, + ec.marshalNInt642int64, + true, + true, + ) } func (ec *executionContext) fieldContext_OfferResponse_expires(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -309,34 +225,19 @@ func (ec *executionContext) fieldContext_OfferResponse_expires(_ context.Context } func (ec *executionContext) _PriceQuote_clientID(ctx context.Context, field graphql.CollectedField, obj *models.PriceQuote) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceQuote_clientID(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.PriceQuote().ClientID(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.marshalNUUID2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_PriceQuote_clientID, + func(ctx context.Context) (any, error) { + return ec.resolvers.PriceQuote().ClientID(ctx, obj) + }, + nil, + ec.marshalNUUID2string, + true, + true, + ) } func (ec *executionContext) fieldContext_PriceQuote_clientID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -353,34 +254,19 @@ func (ec *executionContext) fieldContext_PriceQuote_clientID(_ context.Context, } func (ec *executionContext) _PriceQuote_sourceAcc(ctx context.Context, field graphql.CollectedField, obj *models.PriceQuote) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceQuote_sourceAcc(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.SourceAcc, 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_PriceQuote_sourceAcc, + func(ctx context.Context) (any, error) { + return obj.SourceAcc, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_PriceQuote_sourceAcc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -397,34 +283,19 @@ func (ec *executionContext) fieldContext_PriceQuote_sourceAcc(_ context.Context, } func (ec *executionContext) _PriceQuote_destinationAcc(ctx context.Context, field graphql.CollectedField, obj *models.PriceQuote) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceQuote_destinationAcc(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.DestinationAcc, 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_PriceQuote_destinationAcc, + func(ctx context.Context) (any, error) { + return obj.DestinationAcc, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_PriceQuote_destinationAcc(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -441,34 +312,19 @@ func (ec *executionContext) fieldContext_PriceQuote_destinationAcc(_ context.Con } func (ec *executionContext) _PriceQuote_rate(ctx context.Context, field graphql.CollectedField, obj *models.PriceQuote) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceQuote_rate(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.PriceQuote().Rate(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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_PriceQuote_rate, + func(ctx context.Context) (any, error) { + return ec.resolvers.PriceQuote().Rate(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_PriceQuote_rate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -485,34 +341,19 @@ func (ec *executionContext) fieldContext_PriceQuote_rate(_ context.Context, fiel } func (ec *executionContext) _PriceQuote_amount(ctx context.Context, field graphql.CollectedField, obj *models.PriceQuote) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceQuote_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.PriceQuote().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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_PriceQuote_amount, + func(ctx context.Context) (any, error) { + return ec.resolvers.PriceQuote().Amount(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_PriceQuote_amount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -830,7 +671,7 @@ func (ec *executionContext) marshalNOfferResponse2githubᚗcomᚋsurahmanᚋFTeX func (ec *executionContext) marshalNOfferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPExchangeOfferResponse(ctx context.Context, sel ast.SelectionSet, v *models.HTTPExchangeOfferResponse) 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 } diff --git a/pkg/graphql/generated/crypto.generated.go b/pkg/graphql/generated/crypto.generated.go index 7f36e9e..f568de1 100644 --- a/pkg/graphql/generated/crypto.generated.go +++ b/pkg/graphql/generated/crypto.generated.go @@ -52,34 +52,19 @@ type CryptoOfferRequestResolver interface { // region **************************** field.gotpl ***************************** func (ec *executionContext) _CryptoAccount_ticker(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoAccount_ticker(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.Ticker, 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_CryptoAccount_ticker, + func(ctx context.Context) (any, error) { + return obj.Ticker, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoAccount_ticker(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -96,34 +81,19 @@ func (ec *executionContext) fieldContext_CryptoAccount_ticker(_ context.Context, } func (ec *executionContext) _CryptoAccount_balance(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoAccount_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 ec.resolvers.CryptoAccount().Balance(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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoAccount_balance, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoAccount().Balance(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoAccount_balance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -140,34 +110,19 @@ func (ec *executionContext) fieldContext_CryptoAccount_balance(_ context.Context } func (ec *executionContext) _CryptoAccount_lastTx(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoAccount_lastTx(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.CryptoAccount().LastTx(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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoAccount_lastTx, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoAccount().LastTx(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoAccount_lastTx(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -184,34 +139,19 @@ func (ec *executionContext) fieldContext_CryptoAccount_lastTx(_ context.Context, } func (ec *executionContext) _CryptoAccount_lastTxTs(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoAccount_lastTxTs(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.CryptoAccount().LastTxTs(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_CryptoAccount_lastTxTs, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoAccount().LastTxTs(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoAccount_lastTxTs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -228,34 +168,19 @@ func (ec *executionContext) fieldContext_CryptoAccount_lastTxTs(_ context.Contex } func (ec *executionContext) _CryptoAccount_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoAccount_createdAt(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.CryptoAccount().CreatedAt(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_CryptoAccount_createdAt, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoAccount().CreatedAt(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoAccount_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -272,34 +197,19 @@ func (ec *executionContext) fieldContext_CryptoAccount_createdAt(_ context.Conte } func (ec *executionContext) _CryptoAccount_clientID(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoAccount_clientID(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.CryptoAccount().ClientID(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.marshalNUUID2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoAccount_clientID, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoAccount().ClientID(ctx, obj) + }, + nil, + ec.marshalNUUID2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoAccount_clientID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -316,34 +226,19 @@ func (ec *executionContext) fieldContext_CryptoAccount_clientID(_ context.Contex } func (ec *executionContext) _CryptoBalancesPaginated_accountBalances(ctx context.Context, field graphql.CollectedField, obj *models.HTTPCryptoDetailsPaginated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoBalancesPaginated_accountBalances(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.AccountBalances, 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.([]postgres.CryptoAccount) - fc.Result = res - return ec.marshalNCryptoAccount2ᚕgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoAccountᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoBalancesPaginated_accountBalances, + func(ctx context.Context) (any, error) { + return obj.AccountBalances, nil + }, + nil, + ec.marshalNCryptoAccount2ᚕgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoAccountᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoBalancesPaginated_accountBalances(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -374,34 +269,19 @@ func (ec *executionContext) fieldContext_CryptoBalancesPaginated_accountBalances } func (ec *executionContext) _CryptoBalancesPaginated_links(ctx context.Context, field graphql.CollectedField, obj *models.HTTPCryptoDetailsPaginated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoBalancesPaginated_links(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.Links, 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.(models.HTTPLinks) - fc.Result = res - return ec.marshalNLinks2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPLinks(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoBalancesPaginated_links, + func(ctx context.Context) (any, error) { + return obj.Links, nil + }, + nil, + ec.marshalNLinks2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPLinks, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoBalancesPaginated_links(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -424,34 +304,19 @@ func (ec *executionContext) fieldContext_CryptoBalancesPaginated_links(_ context } func (ec *executionContext) _CryptoJournal_ticker(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoJournal_ticker(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.Ticker, 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_CryptoJournal_ticker, + func(ctx context.Context) (any, error) { + return obj.Ticker, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoJournal_ticker(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -468,34 +333,19 @@ func (ec *executionContext) fieldContext_CryptoJournal_ticker(_ context.Context, } func (ec *executionContext) _CryptoJournal_amount(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoJournal_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.CryptoJournal().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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoJournal_amount, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoJournal().Amount(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoJournal_amount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -512,34 +362,19 @@ func (ec *executionContext) fieldContext_CryptoJournal_amount(_ context.Context, } func (ec *executionContext) _CryptoJournal_transactedAt(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoJournal_transactedAt(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.CryptoJournal().TransactedAt(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_CryptoJournal_transactedAt, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoJournal().TransactedAt(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoJournal_transactedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -556,34 +391,19 @@ func (ec *executionContext) fieldContext_CryptoJournal_transactedAt(_ context.Co } func (ec *executionContext) _CryptoJournal_clientID(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoJournal_clientID(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.CryptoJournal().ClientID(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.marshalNUUID2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoJournal_clientID, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoJournal().ClientID(ctx, obj) + }, + nil, + ec.marshalNUUID2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoJournal_clientID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -600,34 +420,19 @@ func (ec *executionContext) fieldContext_CryptoJournal_clientID(_ context.Contex } func (ec *executionContext) _CryptoJournal_txID(ctx context.Context, field graphql.CollectedField, obj *postgres.CryptoJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoJournal_txID(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.CryptoJournal().TxID(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.marshalNUUID2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoJournal_txID, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoJournal().TxID(ctx, obj) + }, + nil, + ec.marshalNUUID2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoJournal_txID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -644,34 +449,19 @@ func (ec *executionContext) fieldContext_CryptoJournal_txID(_ context.Context, f } func (ec *executionContext) _CryptoOpenAccountResponse_clientID(ctx context.Context, field graphql.CollectedField, obj *models.CryptoOpenAccountResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoOpenAccountResponse_clientID(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.ClientID, 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_CryptoOpenAccountResponse_clientID, + func(ctx context.Context) (any, error) { + return obj.ClientID, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoOpenAccountResponse_clientID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -688,34 +478,19 @@ func (ec *executionContext) fieldContext_CryptoOpenAccountResponse_clientID(_ co } func (ec *executionContext) _CryptoOpenAccountResponse_ticker(ctx context.Context, field graphql.CollectedField, obj *models.CryptoOpenAccountResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoOpenAccountResponse_ticker(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.Ticker, 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_CryptoOpenAccountResponse_ticker, + func(ctx context.Context) (any, error) { + return obj.Ticker, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoOpenAccountResponse_ticker(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -732,34 +507,19 @@ func (ec *executionContext) fieldContext_CryptoOpenAccountResponse_ticker(_ cont } func (ec *executionContext) _CryptoTransactionsPaginated_transactions(ctx context.Context, field graphql.CollectedField, obj *models.HTTPCryptoTransactionsPaginated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoTransactionsPaginated_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.CryptoTransactionsPaginated().Transactions(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.([]postgres.CryptoJournal) - fc.Result = res - return ec.marshalNCryptoJournal2ᚕgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoJournalᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoTransactionsPaginated_transactions, + func(ctx context.Context) (any, error) { + return ec.resolvers.CryptoTransactionsPaginated().Transactions(ctx, obj) + }, + nil, + ec.marshalNCryptoJournal2ᚕgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoJournalᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoTransactionsPaginated_transactions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -788,34 +548,19 @@ func (ec *executionContext) fieldContext_CryptoTransactionsPaginated_transaction } func (ec *executionContext) _CryptoTransactionsPaginated_links(ctx context.Context, field graphql.CollectedField, obj *models.HTTPCryptoTransactionsPaginated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoTransactionsPaginated_links(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.Links, 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.(models.HTTPLinks) - fc.Result = res - return ec.marshalNLinks2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPLinks(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoTransactionsPaginated_links, + func(ctx context.Context) (any, error) { + return obj.Links, nil + }, + nil, + ec.marshalNLinks2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPLinks, + true, + true, + ) } func (ec *executionContext) fieldContext_CryptoTransactionsPaginated_links(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -838,31 +583,19 @@ func (ec *executionContext) fieldContext_CryptoTransactionsPaginated_links(_ con } func (ec *executionContext) _CryptoTransferResponse_fiatTxReceipt(ctx context.Context, field graphql.CollectedField, obj *models.HTTPCryptoTransferResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoTransferResponse_fiatTxReceipt(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.FiatTxReceipt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*postgres.FiatJournal) - fc.Result = res - return ec.marshalOFiatJournal2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatJournal(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoTransferResponse_fiatTxReceipt, + func(ctx context.Context) (any, error) { + return obj.FiatTxReceipt, nil + }, + nil, + ec.marshalOFiatJournal2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatJournal, + true, + false, + ) } func (ec *executionContext) fieldContext_CryptoTransferResponse_fiatTxReceipt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -891,31 +624,19 @@ func (ec *executionContext) fieldContext_CryptoTransferResponse_fiatTxReceipt(_ } func (ec *executionContext) _CryptoTransferResponse_cryptoTxReceipt(ctx context.Context, field graphql.CollectedField, obj *models.HTTPCryptoTransferResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CryptoTransferResponse_cryptoTxReceipt(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.CryptoTxReceipt, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*postgres.CryptoJournal) - fc.Result = res - return ec.marshalOCryptoJournal2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoJournal(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_CryptoTransferResponse_cryptoTxReceipt, + func(ctx context.Context) (any, error) { + return obj.CryptoTxReceipt, nil + }, + nil, + ec.marshalOCryptoJournal2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoJournal, + true, + false, + ) } func (ec *executionContext) fieldContext_CryptoTransferResponse_cryptoTxReceipt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1725,7 +1446,7 @@ func (ec *executionContext) marshalNCryptoAccount2ᚕgithubᚗcomᚋsurahmanᚋF func (ec *executionContext) marshalNCryptoAccount2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoAccount(ctx context.Context, sel ast.SelectionSet, v *postgres.CryptoAccount) 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 } @@ -1739,7 +1460,7 @@ func (ec *executionContext) marshalNCryptoBalancesPaginated2githubᚗcomᚋsurah func (ec *executionContext) marshalNCryptoBalancesPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoDetailsPaginated(ctx context.Context, sel ast.SelectionSet, v *models.HTTPCryptoDetailsPaginated) 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 } @@ -1806,7 +1527,7 @@ func (ec *executionContext) marshalNCryptoOpenAccountResponse2githubᚗcomᚋsur func (ec *executionContext) marshalNCryptoOpenAccountResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐCryptoOpenAccountResponse(ctx context.Context, sel ast.SelectionSet, v *models.CryptoOpenAccountResponse) 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 } @@ -1825,7 +1546,7 @@ func (ec *executionContext) marshalNCryptoTransactionsPaginated2githubᚗcomᚋs func (ec *executionContext) marshalNCryptoTransactionsPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoTransactionsPaginated(ctx context.Context, sel ast.SelectionSet, v *models.HTTPCryptoTransactionsPaginated) 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 } @@ -1839,7 +1560,7 @@ func (ec *executionContext) marshalNCryptoTransferResponse2githubᚗcomᚋsurahm func (ec *executionContext) marshalNCryptoTransferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoTransferResponse(ctx context.Context, sel ast.SelectionSet, v *models.HTTPCryptoTransferResponse) 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 } diff --git a/pkg/graphql/generated/fiat.generated.go b/pkg/graphql/generated/fiat.generated.go index 7a9ba72..8873ea4 100644 --- a/pkg/graphql/generated/fiat.generated.go +++ b/pkg/graphql/generated/fiat.generated.go @@ -69,34 +69,19 @@ type FiatExchangeOfferRequestResolver interface { // region **************************** field.gotpl ***************************** func (ec *executionContext) _FiatAccount_currency(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatAccount_currency(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.FiatAccount().Currency(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_FiatAccount_currency, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatAccount().Currency(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatAccount_currency(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -113,34 +98,19 @@ func (ec *executionContext) fieldContext_FiatAccount_currency(_ context.Context, } func (ec *executionContext) _FiatAccount_balance(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatAccount_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 ec.resolvers.FiatAccount().Balance(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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatAccount_balance, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatAccount().Balance(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatAccount_balance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -157,34 +127,19 @@ func (ec *executionContext) fieldContext_FiatAccount_balance(_ context.Context, } func (ec *executionContext) _FiatAccount_lastTx(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatAccount_lastTx(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.FiatAccount().LastTx(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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatAccount_lastTx, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatAccount().LastTx(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatAccount_lastTx(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -201,34 +156,19 @@ func (ec *executionContext) fieldContext_FiatAccount_lastTx(_ context.Context, f } func (ec *executionContext) _FiatAccount_lastTxTs(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatAccount_lastTxTs(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.FiatAccount().LastTxTs(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_FiatAccount_lastTxTs, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatAccount().LastTxTs(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatAccount_lastTxTs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -245,34 +185,19 @@ func (ec *executionContext) fieldContext_FiatAccount_lastTxTs(_ context.Context, } func (ec *executionContext) _FiatAccount_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatAccount_createdAt(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.FiatAccount().CreatedAt(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_FiatAccount_createdAt, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatAccount().CreatedAt(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatAccount_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -289,34 +214,19 @@ func (ec *executionContext) fieldContext_FiatAccount_createdAt(_ context.Context } func (ec *executionContext) _FiatAccount_clientID(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatAccount_clientID(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.FiatAccount().ClientID(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.marshalNUUID2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatAccount_clientID, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatAccount().ClientID(ctx, obj) + }, + nil, + ec.marshalNUUID2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatAccount_clientID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -333,34 +243,19 @@ func (ec *executionContext) fieldContext_FiatAccount_clientID(_ context.Context, } func (ec *executionContext) _FiatBalancesPaginated_accountBalances(ctx context.Context, field graphql.CollectedField, obj *models.HTTPFiatDetailsPaginated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatBalancesPaginated_accountBalances(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.AccountBalances, 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.([]postgres.FiatAccount) - fc.Result = res - return ec.marshalNFiatAccount2ᚕgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatBalancesPaginated_accountBalances, + func(ctx context.Context) (any, error) { + return obj.AccountBalances, nil + }, + nil, + ec.marshalNFiatAccount2ᚕgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatBalancesPaginated_accountBalances(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -391,34 +286,19 @@ func (ec *executionContext) fieldContext_FiatBalancesPaginated_accountBalances(_ } func (ec *executionContext) _FiatBalancesPaginated_links(ctx context.Context, field graphql.CollectedField, obj *models.HTTPFiatDetailsPaginated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatBalancesPaginated_links(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.Links, 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.(models.HTTPLinks) - fc.Result = res - return ec.marshalNLinks2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPLinks(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatBalancesPaginated_links, + func(ctx context.Context) (any, error) { + return obj.Links, nil + }, + nil, + ec.marshalNLinks2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPLinks, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatBalancesPaginated_links(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -441,34 +321,19 @@ func (ec *executionContext) fieldContext_FiatBalancesPaginated_links(_ context.C } func (ec *executionContext) _FiatDepositResponse_txId(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccountTransferResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatDepositResponse_txId(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.FiatDepositResponse().TxID(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_FiatDepositResponse_txId, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatDepositResponse().TxID(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatDepositResponse_txId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -485,34 +350,19 @@ func (ec *executionContext) fieldContext_FiatDepositResponse_txId(_ context.Cont } func (ec *executionContext) _FiatDepositResponse_clientId(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccountTransferResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatDepositResponse_clientId(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.FiatDepositResponse().ClientID(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_FiatDepositResponse_clientId, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatDepositResponse().ClientID(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatDepositResponse_clientId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -529,34 +379,19 @@ func (ec *executionContext) fieldContext_FiatDepositResponse_clientId(_ context. } func (ec *executionContext) _FiatDepositResponse_txTimestamp(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccountTransferResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatDepositResponse_txTimestamp(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.FiatDepositResponse().TxTimestamp(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_FiatDepositResponse_txTimestamp, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatDepositResponse().TxTimestamp(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatDepositResponse_txTimestamp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -573,34 +408,19 @@ func (ec *executionContext) fieldContext_FiatDepositResponse_txTimestamp(_ conte } func (ec *executionContext) _FiatDepositResponse_balance(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccountTransferResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatDepositResponse_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 ec.resolvers.FiatDepositResponse().Balance(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_FiatDepositResponse_balance, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatDepositResponse().Balance(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatDepositResponse_balance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -617,34 +437,19 @@ func (ec *executionContext) fieldContext_FiatDepositResponse_balance(_ context.C } func (ec *executionContext) _FiatDepositResponse_lastTx(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccountTransferResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatDepositResponse_lastTx(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.FiatDepositResponse().LastTx(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_FiatDepositResponse_lastTx, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatDepositResponse().LastTx(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatDepositResponse_lastTx(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -661,34 +466,19 @@ func (ec *executionContext) fieldContext_FiatDepositResponse_lastTx(_ context.Co } func (ec *executionContext) _FiatDepositResponse_currency(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatAccountTransferResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatDepositResponse_currency(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.FiatDepositResponse().Currency(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_FiatDepositResponse_currency, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatDepositResponse().Currency(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatDepositResponse_currency(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -705,34 +495,19 @@ func (ec *executionContext) fieldContext_FiatDepositResponse_currency(_ context. } func (ec *executionContext) _FiatExchangeTransferResponse_sourceReceipt(ctx context.Context, field graphql.CollectedField, obj *models.HTTPFiatTransferResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatExchangeTransferResponse_sourceReceipt(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.FiatExchangeTransferResponse().SourceReceipt(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.(*postgres.FiatAccountTransferResult) - fc.Result = res - return ec.marshalNFiatDepositResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountTransferResult(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatExchangeTransferResponse_sourceReceipt, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatExchangeTransferResponse().SourceReceipt(ctx, obj) + }, + nil, + ec.marshalNFiatDepositResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountTransferResult, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatExchangeTransferResponse_sourceReceipt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -763,34 +538,19 @@ func (ec *executionContext) fieldContext_FiatExchangeTransferResponse_sourceRece } func (ec *executionContext) _FiatExchangeTransferResponse_destinationReceipt(ctx context.Context, field graphql.CollectedField, obj *models.HTTPFiatTransferResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatExchangeTransferResponse_destinationReceipt(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.FiatExchangeTransferResponse().DestinationReceipt(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.(*postgres.FiatAccountTransferResult) - fc.Result = res - return ec.marshalNFiatDepositResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountTransferResult(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatExchangeTransferResponse_destinationReceipt, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatExchangeTransferResponse().DestinationReceipt(ctx, obj) + }, + nil, + ec.marshalNFiatDepositResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountTransferResult, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatExchangeTransferResponse_destinationReceipt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -821,34 +581,19 @@ func (ec *executionContext) fieldContext_FiatExchangeTransferResponse_destinatio } func (ec *executionContext) _FiatJournal_currency(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatJournal_currency(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.FiatJournal().Currency(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_FiatJournal_currency, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatJournal().Currency(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatJournal_currency(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -865,34 +610,19 @@ func (ec *executionContext) fieldContext_FiatJournal_currency(_ context.Context, } func (ec *executionContext) _FiatJournal_amount(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatJournal_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.FiatJournal().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.(float64) - fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatJournal_amount, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatJournal().Amount(ctx, obj) + }, + nil, + ec.marshalNFloat2float64, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatJournal_amount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -909,34 +639,19 @@ func (ec *executionContext) fieldContext_FiatJournal_amount(_ context.Context, f } func (ec *executionContext) _FiatJournal_transactedAt(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatJournal_transactedAt(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.FiatJournal().TransactedAt(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_FiatJournal_transactedAt, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatJournal().TransactedAt(ctx, obj) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatJournal_transactedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -953,34 +668,19 @@ func (ec *executionContext) fieldContext_FiatJournal_transactedAt(_ context.Cont } func (ec *executionContext) _FiatJournal_clientID(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatJournal_clientID(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.FiatJournal().ClientID(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.marshalNUUID2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatJournal_clientID, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatJournal().ClientID(ctx, obj) + }, + nil, + ec.marshalNUUID2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatJournal_clientID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -997,34 +697,19 @@ func (ec *executionContext) fieldContext_FiatJournal_clientID(_ context.Context, } func (ec *executionContext) _FiatJournal_txID(ctx context.Context, field graphql.CollectedField, obj *postgres.FiatJournal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatJournal_txID(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.FiatJournal().TxID(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.marshalNUUID2string(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatJournal_txID, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatJournal().TxID(ctx, obj) + }, + nil, + ec.marshalNUUID2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatJournal_txID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1041,34 +726,19 @@ func (ec *executionContext) fieldContext_FiatJournal_txID(_ context.Context, fie } func (ec *executionContext) _FiatOpenAccountResponse_clientID(ctx context.Context, field graphql.CollectedField, obj *models.FiatOpenAccountResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatOpenAccountResponse_clientID(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.ClientID, 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_FiatOpenAccountResponse_clientID, + func(ctx context.Context) (any, error) { + return obj.ClientID, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatOpenAccountResponse_clientID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1085,34 +755,19 @@ func (ec *executionContext) fieldContext_FiatOpenAccountResponse_clientID(_ cont } func (ec *executionContext) _FiatOpenAccountResponse_currency(ctx context.Context, field graphql.CollectedField, obj *models.FiatOpenAccountResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatOpenAccountResponse_currency(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.Currency, 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_FiatOpenAccountResponse_currency, + func(ctx context.Context) (any, error) { + return obj.Currency, nil + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatOpenAccountResponse_currency(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1129,34 +784,19 @@ func (ec *executionContext) fieldContext_FiatOpenAccountResponse_currency(_ cont } func (ec *executionContext) _FiatTransactionsPaginated_transactions(ctx context.Context, field graphql.CollectedField, obj *models.HTTPFiatTransactionsPaginated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatTransactionsPaginated_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.FiatTransactionsPaginated().Transactions(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.([]postgres.FiatJournal) - fc.Result = res - return ec.marshalNFiatJournal2ᚕgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatJournalᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatTransactionsPaginated_transactions, + func(ctx context.Context) (any, error) { + return ec.resolvers.FiatTransactionsPaginated().Transactions(ctx, obj) + }, + nil, + ec.marshalNFiatJournal2ᚕgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatJournalᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatTransactionsPaginated_transactions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -1185,34 +825,19 @@ func (ec *executionContext) fieldContext_FiatTransactionsPaginated_transactions( } func (ec *executionContext) _FiatTransactionsPaginated_links(ctx context.Context, field graphql.CollectedField, obj *models.HTTPFiatTransactionsPaginated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FiatTransactionsPaginated_links(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.Links, 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.(models.HTTPLinks) - fc.Result = res - return ec.marshalNLinks2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPLinks(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_FiatTransactionsPaginated_links, + func(ctx context.Context) (any, error) { + return obj.Links, nil + }, + nil, + ec.marshalNLinks2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPLinks, + true, + true, + ) } func (ec *executionContext) fieldContext_FiatTransactionsPaginated_links(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -2425,7 +2050,7 @@ func (ec *executionContext) marshalNFiatAccount2ᚕgithubᚗcomᚋsurahmanᚋFTe func (ec *executionContext) marshalNFiatAccount2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccount(ctx context.Context, sel ast.SelectionSet, v *postgres.FiatAccount) 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 } @@ -2439,7 +2064,7 @@ func (ec *executionContext) marshalNFiatBalancesPaginated2githubᚗcomᚋsurahma func (ec *executionContext) marshalNFiatBalancesPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatDetailsPaginated(ctx context.Context, sel ast.SelectionSet, v *models.HTTPFiatDetailsPaginated) 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 } @@ -2458,7 +2083,7 @@ func (ec *executionContext) marshalNFiatDepositResponse2githubᚗcomᚋsurahman func (ec *executionContext) marshalNFiatDepositResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountTransferResult(ctx context.Context, sel ast.SelectionSet, v *postgres.FiatAccountTransferResult) 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 } @@ -2477,7 +2102,7 @@ func (ec *executionContext) marshalNFiatExchangeTransferResponse2githubᚗcomᚋ func (ec *executionContext) marshalNFiatExchangeTransferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatTransferResponse(ctx context.Context, sel ast.SelectionSet, v *models.HTTPFiatTransferResponse) 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 } @@ -2539,7 +2164,7 @@ func (ec *executionContext) marshalNFiatOpenAccountResponse2githubᚗcomᚋsurah func (ec *executionContext) marshalNFiatOpenAccountResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐFiatOpenAccountResponse(ctx context.Context, sel ast.SelectionSet, v *models.FiatOpenAccountResponse) 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 } @@ -2558,7 +2183,7 @@ func (ec *executionContext) marshalNFiatTransactionsPaginated2githubᚗcomᚋsur func (ec *executionContext) marshalNFiatTransactionsPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatTransactionsPaginated(ctx context.Context, sel ast.SelectionSet, v *models.HTTPFiatTransactionsPaginated) 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 } diff --git a/pkg/graphql/generated/healthcheck.generated.go b/pkg/graphql/generated/healthcheck.generated.go index 40cc7a8..79a64d3 100644 --- a/pkg/graphql/generated/healthcheck.generated.go +++ b/pkg/graphql/generated/healthcheck.generated.go @@ -10,7 +10,6 @@ import ( "sync/atomic" "github.com/99designs/gqlgen/graphql" - "github.com/99designs/gqlgen/graphql/introspection" "github.com/surahman/FTeX/pkg/models" "github.com/surahman/FTeX/pkg/postgres" "github.com/vektah/gqlparser/v2/ast" @@ -37,300 +36,111 @@ type QueryResolver interface { 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) { - if _, ok := rawArgs["name"]; !ok { - var zeroVal string - return zeroVal, nil - } - - 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_balanceAllCrypto_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_balanceAllCrypto_argsPageCursor(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "pageCursor", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["pageCursor"] = arg0 - arg1, err := ec.field_Query_balanceAllCrypto_argsPageSize(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "pageSize", ec.unmarshalOInt322ᚖint32) if err != nil { return nil, err } args["pageSize"] = arg1 return args, nil } -func (ec *executionContext) field_Query_balanceAllCrypto_argsPageCursor( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - if _, ok := rawArgs["pageCursor"]; !ok { - var zeroVal *string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pageCursor")) - if tmp, ok := rawArgs["pageCursor"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Query_balanceAllCrypto_argsPageSize( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - if _, ok := rawArgs["pageSize"]; !ok { - var zeroVal *int32 - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) - if tmp, ok := rawArgs["pageSize"]; ok { - return ec.unmarshalOInt322ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} func (ec *executionContext) field_Query_balanceAllFiat_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_balanceAllFiat_argsPageCursor(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "pageCursor", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["pageCursor"] = arg0 - arg1, err := ec.field_Query_balanceAllFiat_argsPageSize(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "pageSize", ec.unmarshalOInt322ᚖint32) if err != nil { return nil, err } args["pageSize"] = arg1 return args, nil } -func (ec *executionContext) field_Query_balanceAllFiat_argsPageCursor( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - if _, ok := rawArgs["pageCursor"]; !ok { - var zeroVal *string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pageCursor")) - if tmp, ok := rawArgs["pageCursor"]; ok { - return ec.unmarshalOString2ᚖstring(ctx, tmp) - } - - var zeroVal *string - return zeroVal, nil -} - -func (ec *executionContext) field_Query_balanceAllFiat_argsPageSize( - ctx context.Context, - rawArgs map[string]any, -) (*int32, error) { - if _, ok := rawArgs["pageSize"]; !ok { - var zeroVal *int32 - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) - if tmp, ok := rawArgs["pageSize"]; ok { - return ec.unmarshalOInt322ᚖint32(ctx, tmp) - } - - var zeroVal *int32 - return zeroVal, nil -} func (ec *executionContext) field_Query_balanceCrypto_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_balanceCrypto_argsTicker(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "ticker", ec.unmarshalNString2string) if err != nil { return nil, err } args["ticker"] = arg0 return args, nil } -func (ec *executionContext) field_Query_balanceCrypto_argsTicker( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - if _, ok := rawArgs["ticker"]; !ok { - var zeroVal string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("ticker")) - if tmp, ok := rawArgs["ticker"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Query_balanceFiat_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_balanceFiat_argsCurrencyCode(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "currencyCode", ec.unmarshalNString2string) if err != nil { return nil, err } args["currencyCode"] = arg0 return args, nil } -func (ec *executionContext) field_Query_balanceFiat_argsCurrencyCode( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - if _, ok := rawArgs["currencyCode"]; !ok { - var zeroVal string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("currencyCode")) - if tmp, ok := rawArgs["currencyCode"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Query_transactionDetailsAllCrypto_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_transactionDetailsAllCrypto_argsInput(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCryptoPaginatedTxDetailsRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐCryptoPaginatedTxDetailsRequest) if err != nil { return nil, err } args["input"] = arg0 return args, nil } -func (ec *executionContext) field_Query_transactionDetailsAllCrypto_argsInput( - ctx context.Context, - rawArgs map[string]any, -) (models.CryptoPaginatedTxDetailsRequest, error) { - if _, ok := rawArgs["input"]; !ok { - var zeroVal models.CryptoPaginatedTxDetailsRequest - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - if tmp, ok := rawArgs["input"]; ok { - return ec.unmarshalNCryptoPaginatedTxDetailsRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐCryptoPaginatedTxDetailsRequest(ctx, tmp) - } - - var zeroVal models.CryptoPaginatedTxDetailsRequest - return zeroVal, nil -} func (ec *executionContext) field_Query_transactionDetailsAllFiat_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_transactionDetailsAllFiat_argsInput(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNFiatPaginatedTxDetailsRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐFiatPaginatedTxDetailsRequest) if err != nil { return nil, err } args["input"] = arg0 return args, nil } -func (ec *executionContext) field_Query_transactionDetailsAllFiat_argsInput( - ctx context.Context, - rawArgs map[string]any, -) (models.FiatPaginatedTxDetailsRequest, error) { - if _, ok := rawArgs["input"]; !ok { - var zeroVal models.FiatPaginatedTxDetailsRequest - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - if tmp, ok := rawArgs["input"]; ok { - return ec.unmarshalNFiatPaginatedTxDetailsRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐFiatPaginatedTxDetailsRequest(ctx, tmp) - } - - var zeroVal models.FiatPaginatedTxDetailsRequest - return zeroVal, nil -} func (ec *executionContext) field_Query_transactionDetailsCrypto_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_transactionDetailsCrypto_argsTransactionID(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "transactionID", ec.unmarshalNString2string) if err != nil { return nil, err } args["transactionID"] = arg0 return args, nil } -func (ec *executionContext) field_Query_transactionDetailsCrypto_argsTransactionID( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - if _, ok := rawArgs["transactionID"]; !ok { - var zeroVal string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("transactionID")) - if tmp, ok := rawArgs["transactionID"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Query_transactionDetailsFiat_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Query_transactionDetailsFiat_argsTransactionID(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "transactionID", ec.unmarshalNString2string) if err != nil { return nil, err } args["transactionID"] = arg0 return args, nil } -func (ec *executionContext) field_Query_transactionDetailsFiat_argsTransactionID( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - if _, ok := rawArgs["transactionID"]; !ok { - var zeroVal string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("transactionID")) - if tmp, ok := rawArgs["transactionID"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} // endregion ***************************** args.gotpl ***************************** @@ -341,34 +151,19 @@ func (ec *executionContext) field_Query_transactionDetailsFiat_argsTransactionID // region **************************** field.gotpl ***************************** func (ec *executionContext) _Query_healthcheck(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_healthcheck(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().Healthcheck(rctx) - }) - 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_Query_healthcheck, + func(ctx context.Context) (any, error) { + return ec.resolvers.Query().Healthcheck(ctx) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_healthcheck(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -385,34 +180,20 @@ func (ec *executionContext) fieldContext_Query_healthcheck(_ context.Context, fi } func (ec *executionContext) _Query_balanceCrypto(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_balanceCrypto(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().BalanceCrypto(rctx, fc.Args["ticker"].(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.(*postgres.CryptoAccount) - fc.Result = res - return ec.marshalNCryptoAccount2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_balanceCrypto, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Query().BalanceCrypto(ctx, fc.Args["ticker"].(string)) + }, + nil, + ec.marshalNCryptoAccount2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐCryptoAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_balanceCrypto(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -454,34 +235,20 @@ func (ec *executionContext) fieldContext_Query_balanceCrypto(ctx context.Context } func (ec *executionContext) _Query_balanceAllCrypto(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_balanceAllCrypto(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().BalanceAllCrypto(rctx, fc.Args["pageCursor"].(*string), fc.Args["pageSize"].(*int32)) - }) - 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.(*models.HTTPCryptoDetailsPaginated) - fc.Result = res - return ec.marshalNCryptoBalancesPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoDetailsPaginated(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_balanceAllCrypto, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Query().BalanceAllCrypto(ctx, fc.Args["pageCursor"].(*string), fc.Args["pageSize"].(*int32)) + }, + nil, + ec.marshalNCryptoBalancesPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoDetailsPaginated, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_balanceAllCrypto(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -515,34 +282,20 @@ func (ec *executionContext) fieldContext_Query_balanceAllCrypto(ctx context.Cont } func (ec *executionContext) _Query_transactionDetailsCrypto(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_transactionDetailsCrypto(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().TransactionDetailsCrypto(rctx, fc.Args["transactionID"].(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.([]any) - fc.Result = res - return ec.marshalNAny2ᚕinterfaceᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_transactionDetailsCrypto, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Query().TransactionDetailsCrypto(ctx, fc.Args["transactionID"].(string)) + }, + nil, + ec.marshalNAny2ᚕinterfaceᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_transactionDetailsCrypto(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -570,34 +323,20 @@ func (ec *executionContext) fieldContext_Query_transactionDetailsCrypto(ctx cont } func (ec *executionContext) _Query_transactionDetailsAllCrypto(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_transactionDetailsAllCrypto(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().TransactionDetailsAllCrypto(rctx, fc.Args["input"].(models.CryptoPaginatedTxDetailsRequest)) - }) - 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.(*models.HTTPCryptoTransactionsPaginated) - fc.Result = res - return ec.marshalNCryptoTransactionsPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoTransactionsPaginated(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_transactionDetailsAllCrypto, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Query().TransactionDetailsAllCrypto(ctx, fc.Args["input"].(models.CryptoPaginatedTxDetailsRequest)) + }, + nil, + ec.marshalNCryptoTransactionsPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoTransactionsPaginated, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_transactionDetailsAllCrypto(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -631,34 +370,20 @@ func (ec *executionContext) fieldContext_Query_transactionDetailsAllCrypto(ctx c } func (ec *executionContext) _Query_balanceFiat(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_balanceFiat(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().BalanceFiat(rctx, fc.Args["currencyCode"].(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.(*postgres.FiatAccount) - fc.Result = res - return ec.marshalNFiatAccount2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccount(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_balanceFiat, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Query().BalanceFiat(ctx, fc.Args["currencyCode"].(string)) + }, + nil, + ec.marshalNFiatAccount2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccount, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_balanceFiat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -700,34 +425,20 @@ func (ec *executionContext) fieldContext_Query_balanceFiat(ctx context.Context, } func (ec *executionContext) _Query_balanceAllFiat(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_balanceAllFiat(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().BalanceAllFiat(rctx, fc.Args["pageCursor"].(*string), fc.Args["pageSize"].(*int32)) - }) - 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.(*models.HTTPFiatDetailsPaginated) - fc.Result = res - return ec.marshalNFiatBalancesPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatDetailsPaginated(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_balanceAllFiat, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Query().BalanceAllFiat(ctx, fc.Args["pageCursor"].(*string), fc.Args["pageSize"].(*int32)) + }, + nil, + ec.marshalNFiatBalancesPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatDetailsPaginated, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_balanceAllFiat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -761,34 +472,20 @@ func (ec *executionContext) fieldContext_Query_balanceAllFiat(ctx context.Contex } func (ec *executionContext) _Query_transactionDetailsFiat(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_transactionDetailsFiat(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().TransactionDetailsFiat(rctx, fc.Args["transactionID"].(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.([]any) - fc.Result = res - return ec.marshalNAny2ᚕinterfaceᚄ(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_transactionDetailsFiat, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Query().TransactionDetailsFiat(ctx, fc.Args["transactionID"].(string)) + }, + nil, + ec.marshalNAny2ᚕinterfaceᚄ, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_transactionDetailsFiat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -816,34 +513,20 @@ func (ec *executionContext) fieldContext_Query_transactionDetailsFiat(ctx contex } func (ec *executionContext) _Query_transactionDetailsAllFiat(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_transactionDetailsAllFiat(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().TransactionDetailsAllFiat(rctx, fc.Args["input"].(models.FiatPaginatedTxDetailsRequest)) - }) - 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.(*models.HTTPFiatTransactionsPaginated) - fc.Result = res - return ec.marshalNFiatTransactionsPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatTransactionsPaginated(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Query_transactionDetailsAllFiat, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Query().TransactionDetailsAllFiat(ctx, fc.Args["input"].(models.FiatPaginatedTxDetailsRequest)) + }, + nil, + ec.marshalNFiatTransactionsPaginated2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatTransactionsPaginated, + true, + true, + ) } func (ec *executionContext) fieldContext_Query_transactionDetailsAllFiat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -877,31 +560,20 @@ func (ec *executionContext) fieldContext_Query_transactionDetailsAllFiat(ctx con } 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) { @@ -953,31 +625,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) { diff --git a/pkg/graphql/generated/prelude.generated.go b/pkg/graphql/generated/prelude.generated.go index 74c682f..a323a6e 100644 --- a/pkg/graphql/generated/prelude.generated.go +++ b/pkg/graphql/generated/prelude.generated.go @@ -24,165 +24,62 @@ import ( func (ec *executionContext) dir_defer_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.dir_defer_argsIf(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "if", ec.unmarshalOBoolean2ᚖbool) if err != nil { return nil, err } args["if"] = arg0 - arg1, err := ec.dir_defer_argsLabel(ctx, rawArgs) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "label", ec.unmarshalOString2ᚖstring) if err != nil { return nil, err } args["label"] = arg1 return args, nil } -func (ec *executionContext) dir_defer_argsIf( - ctx context.Context, - rawArgs map[string]any, -) (*bool, error) { - if _, ok := rawArgs["if"]; !ok { - var zeroVal *bool - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("if")) - if tmp, ok := rawArgs["if"]; ok { - return ec.unmarshalOBoolean2ᚖbool(ctx, tmp) - } - - var zeroVal *bool - return zeroVal, nil -} - -func (ec *executionContext) dir_defer_argsLabel( - ctx context.Context, - rawArgs map[string]any, -) (*string, error) { - if _, ok := rawArgs["label"]; !ok { - var zeroVal *string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("label")) - if tmp, ok := rawArgs["label"]; 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) { - if _, ok := rawArgs["includeDeprecated"]; !ok { - var zeroVal *bool - return zeroVal, nil - } - - 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) { - if _, ok := rawArgs["includeDeprecated"]; !ok { - var zeroVal *bool - return zeroVal, nil - } - - 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) { - if _, ok := rawArgs["includeDeprecated"]; !ok { - var zeroVal bool - return zeroVal, nil - } - - 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) { - if _, ok := rawArgs["includeDeprecated"]; !ok { - var zeroVal bool - return zeroVal, nil - } - - 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 ***************************** @@ -193,34 +90,19 @@ func (ec *executionContext) field___Type_fields_argsIncludeDeprecated( // region **************************** field.gotpl ***************************** 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) { @@ -237,31 +119,19 @@ func (ec *executionContext) fieldContext___Directive_name(_ context.Context, fie } 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 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) { @@ -278,34 +148,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) { @@ -322,34 +177,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) { @@ -366,34 +206,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) { @@ -435,34 +260,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) { @@ -479,31 +289,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) { @@ -520,34 +318,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) { @@ -564,31 +347,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) { @@ -605,34 +376,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) { @@ -649,31 +405,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) { @@ -690,34 +434,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) { @@ -759,34 +488,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) { @@ -827,34 +541,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) { @@ -871,31 +570,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) { @@ -912,34 +599,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) { @@ -956,31 +628,19 @@ func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, fi } 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) + 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) { @@ -997,34 +657,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) { @@ -1065,31 +710,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) { @@ -1106,34 +739,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) { @@ -1150,72 +768,48 @@ 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) { fc = &graphql.FieldContext{ - Object: "__InputValue", - 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) ___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 + Object: "__InputValue", + 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") + }, } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return fc, nil +} + +func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + 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) { @@ -1232,34 +826,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) { @@ -1300,34 +879,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) { @@ -1368,31 +932,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) { @@ -1433,31 +985,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) { @@ -1498,34 +1038,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) { @@ -1554,34 +1079,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) { @@ -1598,31 +1108,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) { @@ -1639,31 +1137,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) { @@ -1680,31 +1166,19 @@ 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) { @@ -1721,31 +1195,20 @@ func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context } 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 - } - res := resTmp.([]introspection.Field) - fc.Result = res - return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) + 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) { @@ -1787,31 +1250,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) { @@ -1852,31 +1303,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) { @@ -1917,31 +1356,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) { @@ -1979,31 +1407,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) { @@ -2034,31 +1450,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) { @@ -2099,31 +1503,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) { @@ -2496,7 +1888,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 @@ -2510,7 +1902,7 @@ func (ec *executionContext) unmarshalNBoolean2ᚖbool(ctx context.Context, v any func (ec *executionContext) marshalNBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) 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 } @@ -2518,7 +1910,7 @@ func (ec *executionContext) marshalNBoolean2ᚖbool(ctx context.Context, sel ast 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 @@ -2534,7 +1926,7 @@ func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.S res := graphql.MarshalFloatContext(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 graphql.WrapContextMarshaler(ctx, res) @@ -2550,7 +1942,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 @@ -2614,7 +2006,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 @@ -2786,7 +2178,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 } @@ -2803,7 +2195,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 diff --git a/pkg/graphql/generated/scalars.generated.go b/pkg/graphql/generated/scalars.generated.go index f238eeb..c6540ed 100644 --- a/pkg/graphql/generated/scalars.generated.go +++ b/pkg/graphql/generated/scalars.generated.go @@ -47,7 +47,7 @@ func (ec *executionContext) unmarshalNAny2interface(ctx context.Context, v any) func (ec *executionContext) marshalNAny2interface(ctx context.Context, sel ast.SelectionSet, v any) 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 } @@ -55,7 +55,7 @@ func (ec *executionContext) marshalNAny2interface(ctx context.Context, sel ast.S res := graphql.MarshalAny(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 @@ -101,7 +101,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 @@ -117,7 +117,7 @@ func (ec *executionContext) marshalNUUID2string(ctx context.Context, sel ast.Sel 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 diff --git a/pkg/graphql/generated/user.generated.go b/pkg/graphql/generated/user.generated.go index 723c62a..e7fc00a 100644 --- a/pkg/graphql/generated/user.generated.go +++ b/pkg/graphql/generated/user.generated.go @@ -39,282 +39,112 @@ type MutationResolver interface { func (ec *executionContext) field_Mutation_deleteUser_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_deleteUser_argsInput(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNDeleteUserRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPDeleteUserRequest) if err != nil { return nil, err } args["input"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_deleteUser_argsInput( - ctx context.Context, - rawArgs map[string]any, -) (models1.HTTPDeleteUserRequest, error) { - if _, ok := rawArgs["input"]; !ok { - var zeroVal models1.HTTPDeleteUserRequest - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - if tmp, ok := rawArgs["input"]; ok { - return ec.unmarshalNDeleteUserRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPDeleteUserRequest(ctx, tmp) - } - - var zeroVal models1.HTTPDeleteUserRequest - return zeroVal, nil -} func (ec *executionContext) field_Mutation_depositFiat_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_depositFiat_argsInput(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNFiatDepositRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPDepositCurrencyRequest) if err != nil { return nil, err } args["input"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_depositFiat_argsInput( - ctx context.Context, - rawArgs map[string]any, -) (models1.HTTPDepositCurrencyRequest, error) { - if _, ok := rawArgs["input"]; !ok { - var zeroVal models1.HTTPDepositCurrencyRequest - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - if tmp, ok := rawArgs["input"]; ok { - return ec.unmarshalNFiatDepositRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPDepositCurrencyRequest(ctx, tmp) - } - - var zeroVal models1.HTTPDepositCurrencyRequest - return zeroVal, nil -} func (ec *executionContext) field_Mutation_exchangeCrypto_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_exchangeCrypto_argsOfferID(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "offerID", ec.unmarshalNString2string) if err != nil { return nil, err } args["offerID"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_exchangeCrypto_argsOfferID( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - if _, ok := rawArgs["offerID"]; !ok { - var zeroVal string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("offerID")) - if tmp, ok := rawArgs["offerID"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Mutation_exchangeOfferFiat_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_exchangeOfferFiat_argsInput(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNFiatExchangeOfferRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPExchangeOfferRequest) if err != nil { return nil, err } args["input"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_exchangeOfferFiat_argsInput( - ctx context.Context, - rawArgs map[string]any, -) (models1.HTTPExchangeOfferRequest, error) { - if _, ok := rawArgs["input"]; !ok { - var zeroVal models1.HTTPExchangeOfferRequest - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - if tmp, ok := rawArgs["input"]; ok { - return ec.unmarshalNFiatExchangeOfferRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPExchangeOfferRequest(ctx, tmp) - } - - var zeroVal models1.HTTPExchangeOfferRequest - return zeroVal, nil -} func (ec *executionContext) field_Mutation_exchangeTransferFiat_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_exchangeTransferFiat_argsOfferID(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "offerID", ec.unmarshalNString2string) if err != nil { return nil, err } args["offerID"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_exchangeTransferFiat_argsOfferID( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - if _, ok := rawArgs["offerID"]; !ok { - var zeroVal string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("offerID")) - if tmp, ok := rawArgs["offerID"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Mutation_loginUser_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_loginUser_argsInput(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNUserLoginCredentials2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚋpostgresᚐUserLoginCredentials) if err != nil { return nil, err } args["input"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_loginUser_argsInput( - ctx context.Context, - rawArgs map[string]any, -) (models.UserLoginCredentials, error) { - if _, ok := rawArgs["input"]; !ok { - var zeroVal models.UserLoginCredentials - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - if tmp, ok := rawArgs["input"]; ok { - return ec.unmarshalNUserLoginCredentials2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚋpostgresᚐUserLoginCredentials(ctx, tmp) - } - - var zeroVal models.UserLoginCredentials - return zeroVal, nil -} func (ec *executionContext) field_Mutation_offerCrypto_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_offerCrypto_argsInput(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCryptoOfferRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoOfferRequest) if err != nil { return nil, err } args["input"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_offerCrypto_argsInput( - ctx context.Context, - rawArgs map[string]any, -) (models1.HTTPCryptoOfferRequest, error) { - if _, ok := rawArgs["input"]; !ok { - var zeroVal models1.HTTPCryptoOfferRequest - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - if tmp, ok := rawArgs["input"]; ok { - return ec.unmarshalNCryptoOfferRequest2githubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoOfferRequest(ctx, tmp) - } - - var zeroVal models1.HTTPCryptoOfferRequest - return zeroVal, nil -} func (ec *executionContext) field_Mutation_openCrypto_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_openCrypto_argsTicker(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "ticker", ec.unmarshalNString2string) if err != nil { return nil, err } args["ticker"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_openCrypto_argsTicker( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - if _, ok := rawArgs["ticker"]; !ok { - var zeroVal string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("ticker")) - if tmp, ok := rawArgs["ticker"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Mutation_openFiat_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_openFiat_argsCurrency(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "currency", ec.unmarshalNString2string) if err != nil { return nil, err } args["currency"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_openFiat_argsCurrency( - ctx context.Context, - rawArgs map[string]any, -) (string, error) { - if _, ok := rawArgs["currency"]; !ok { - var zeroVal string - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("currency")) - if tmp, ok := rawArgs["currency"]; ok { - return ec.unmarshalNString2string(ctx, tmp) - } - - var zeroVal string - return zeroVal, nil -} func (ec *executionContext) field_Mutation_registerUser_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := ec.field_Mutation_registerUser_argsInput(ctx, rawArgs) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalOUserAccount2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚋpostgresᚐUserAccount) if err != nil { return nil, err } args["input"] = arg0 return args, nil } -func (ec *executionContext) field_Mutation_registerUser_argsInput( - ctx context.Context, - rawArgs map[string]any, -) (*models.UserAccount, error) { - if _, ok := rawArgs["input"]; !ok { - var zeroVal *models.UserAccount - return zeroVal, nil - } - - ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - if tmp, ok := rawArgs["input"]; ok { - return ec.unmarshalOUserAccount2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚋpostgresᚐUserAccount(ctx, tmp) - } - - var zeroVal *models.UserAccount - return zeroVal, nil -} // endregion ***************************** args.gotpl ***************************** @@ -325,34 +155,20 @@ func (ec *executionContext) field_Mutation_registerUser_argsInput( // region **************************** field.gotpl ***************************** func (ec *executionContext) _Mutation_registerUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_registerUser(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.Mutation().RegisterUser(rctx, fc.Args["input"].(*models.UserAccount)) - }) - 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.(*models1.JWTAuthResponse) - fc.Result = res - return ec.marshalNJWTAuthResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐJWTAuthResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_registerUser, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().RegisterUser(ctx, fc.Args["input"].(*models.UserAccount)) + }, + nil, + ec.marshalNJWTAuthResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐJWTAuthResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_registerUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -388,34 +204,20 @@ func (ec *executionContext) fieldContext_Mutation_registerUser(ctx context.Conte } func (ec *executionContext) _Mutation_deleteUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_deleteUser(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.Mutation().DeleteUser(rctx, fc.Args["input"].(models1.HTTPDeleteUserRequest)) - }) - 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_Mutation_deleteUser, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().DeleteUser(ctx, fc.Args["input"].(models1.HTTPDeleteUserRequest)) + }, + nil, + ec.marshalNString2string, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_deleteUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -443,34 +245,20 @@ func (ec *executionContext) fieldContext_Mutation_deleteUser(ctx context.Context } func (ec *executionContext) _Mutation_loginUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_loginUser(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.Mutation().LoginUser(rctx, fc.Args["input"].(models.UserLoginCredentials)) - }) - 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.(*models1.JWTAuthResponse) - fc.Result = res - return ec.marshalNJWTAuthResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐJWTAuthResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_loginUser, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().LoginUser(ctx, fc.Args["input"].(models.UserLoginCredentials)) + }, + nil, + ec.marshalNJWTAuthResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐJWTAuthResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_loginUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -506,34 +294,19 @@ func (ec *executionContext) fieldContext_Mutation_loginUser(ctx context.Context, } func (ec *executionContext) _Mutation_refreshToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_refreshToken(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.Mutation().RefreshToken(rctx) - }) - 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.(*models1.JWTAuthResponse) - fc.Result = res - return ec.marshalNJWTAuthResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐJWTAuthResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_refreshToken, + func(ctx context.Context) (any, error) { + return ec.resolvers.Mutation().RefreshToken(ctx) + }, + nil, + ec.marshalNJWTAuthResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐJWTAuthResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_refreshToken(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -558,34 +331,20 @@ func (ec *executionContext) fieldContext_Mutation_refreshToken(_ context.Context } func (ec *executionContext) _Mutation_openCrypto(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_openCrypto(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.Mutation().OpenCrypto(rctx, fc.Args["ticker"].(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.(*models1.CryptoOpenAccountResponse) - fc.Result = res - return ec.marshalNCryptoOpenAccountResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐCryptoOpenAccountResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_openCrypto, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().OpenCrypto(ctx, fc.Args["ticker"].(string)) + }, + nil, + ec.marshalNCryptoOpenAccountResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐCryptoOpenAccountResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_openCrypto(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -619,34 +378,20 @@ func (ec *executionContext) fieldContext_Mutation_openCrypto(ctx context.Context } func (ec *executionContext) _Mutation_offerCrypto(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_offerCrypto(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.Mutation().OfferCrypto(rctx, fc.Args["input"].(models1.HTTPCryptoOfferRequest)) - }) - 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.(*models1.HTTPExchangeOfferResponse) - fc.Result = res - return ec.marshalNOfferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPExchangeOfferResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_offerCrypto, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().OfferCrypto(ctx, fc.Args["input"].(models1.HTTPCryptoOfferRequest)) + }, + nil, + ec.marshalNOfferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPExchangeOfferResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_offerCrypto(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -684,34 +429,20 @@ func (ec *executionContext) fieldContext_Mutation_offerCrypto(ctx context.Contex } func (ec *executionContext) _Mutation_exchangeCrypto(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_exchangeCrypto(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.Mutation().ExchangeCrypto(rctx, fc.Args["offerID"].(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.(*models1.HTTPCryptoTransferResponse) - fc.Result = res - return ec.marshalNCryptoTransferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoTransferResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_exchangeCrypto, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().ExchangeCrypto(ctx, fc.Args["offerID"].(string)) + }, + nil, + ec.marshalNCryptoTransferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPCryptoTransferResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_exchangeCrypto(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -745,34 +476,20 @@ func (ec *executionContext) fieldContext_Mutation_exchangeCrypto(ctx context.Con } func (ec *executionContext) _Mutation_openFiat(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_openFiat(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.Mutation().OpenFiat(rctx, fc.Args["currency"].(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.(*models1.FiatOpenAccountResponse) - fc.Result = res - return ec.marshalNFiatOpenAccountResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐFiatOpenAccountResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_openFiat, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().OpenFiat(ctx, fc.Args["currency"].(string)) + }, + nil, + ec.marshalNFiatOpenAccountResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐFiatOpenAccountResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_openFiat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -806,34 +523,20 @@ func (ec *executionContext) fieldContext_Mutation_openFiat(ctx context.Context, } func (ec *executionContext) _Mutation_depositFiat(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_depositFiat(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.Mutation().DepositFiat(rctx, fc.Args["input"].(models1.HTTPDepositCurrencyRequest)) - }) - 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.(*postgres.FiatAccountTransferResult) - fc.Result = res - return ec.marshalNFiatDepositResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountTransferResult(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_depositFiat, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().DepositFiat(ctx, fc.Args["input"].(models1.HTTPDepositCurrencyRequest)) + }, + nil, + ec.marshalNFiatDepositResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋpostgresᚐFiatAccountTransferResult, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_depositFiat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -875,34 +578,20 @@ func (ec *executionContext) fieldContext_Mutation_depositFiat(ctx context.Contex } func (ec *executionContext) _Mutation_exchangeOfferFiat(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_exchangeOfferFiat(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.Mutation().ExchangeOfferFiat(rctx, fc.Args["input"].(models1.HTTPExchangeOfferRequest)) - }) - 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.(*models1.HTTPExchangeOfferResponse) - fc.Result = res - return ec.marshalNOfferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPExchangeOfferResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_exchangeOfferFiat, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().ExchangeOfferFiat(ctx, fc.Args["input"].(models1.HTTPExchangeOfferRequest)) + }, + nil, + ec.marshalNOfferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPExchangeOfferResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_exchangeOfferFiat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -940,34 +629,20 @@ func (ec *executionContext) fieldContext_Mutation_exchangeOfferFiat(ctx context. } func (ec *executionContext) _Mutation_exchangeTransferFiat(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_exchangeTransferFiat(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.Mutation().ExchangeTransferFiat(rctx, fc.Args["offerID"].(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.(*models1.HTTPFiatTransferResponse) - fc.Result = res - return ec.marshalNFiatExchangeTransferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatTransferResponse(ctx, field.Selections, res) + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_Mutation_exchangeTransferFiat, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.resolvers.Mutation().ExchangeTransferFiat(ctx, fc.Args["offerID"].(string)) + }, + nil, + ec.marshalNFiatExchangeTransferResponse2ᚖgithubᚗcomᚋsurahmanᚋFTeXᚋpkgᚋmodelsᚐHTTPFiatTransferResponse, + true, + true, + ) } func (ec *executionContext) fieldContext_Mutation_exchangeTransferFiat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { diff --git a/pkg/graphql/resolvers/common.resolvers.go b/pkg/graphql/resolvers/common.resolvers.go index 978dde3..d9d1118 100644 --- a/pkg/graphql/resolvers/common.resolvers.go +++ b/pkg/graphql/resolvers/common.resolvers.go @@ -1,8 +1,9 @@ package graphql -// 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.73 +// Code generated by github.com/99designs/gqlgen version v0.17.84 import ( "context" diff --git a/pkg/graphql/resolvers/crypto.resolvers.go b/pkg/graphql/resolvers/crypto.resolvers.go index 42d098b..29ef2c6 100644 --- a/pkg/graphql/resolvers/crypto.resolvers.go +++ b/pkg/graphql/resolvers/crypto.resolvers.go @@ -1,8 +1,9 @@ package graphql -// 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.73 +// Code generated by github.com/99designs/gqlgen version v0.17.84 import ( "context" diff --git a/pkg/graphql/resolvers/fiat.resolvers.go b/pkg/graphql/resolvers/fiat.resolvers.go index 1baa9a5..70e88c3 100644 --- a/pkg/graphql/resolvers/fiat.resolvers.go +++ b/pkg/graphql/resolvers/fiat.resolvers.go @@ -1,8 +1,9 @@ package graphql -// 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.73 +// Code generated by github.com/99designs/gqlgen version v0.17.84 import ( "context" diff --git a/pkg/graphql/resolvers/healthcheck.resolvers.go b/pkg/graphql/resolvers/healthcheck.resolvers.go index b143249..545988c 100644 --- a/pkg/graphql/resolvers/healthcheck.resolvers.go +++ b/pkg/graphql/resolvers/healthcheck.resolvers.go @@ -1,8 +1,9 @@ package graphql -// 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.73 +// Code generated by github.com/99designs/gqlgen version v0.17.84 import ( "context" diff --git a/pkg/graphql/resolvers/user.resolvers.go b/pkg/graphql/resolvers/user.resolvers.go index 0f87feb..11ed6a8 100644 --- a/pkg/graphql/resolvers/user.resolvers.go +++ b/pkg/graphql/resolvers/user.resolvers.go @@ -1,8 +1,9 @@ package graphql -// 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.73 +// Code generated by github.com/99designs/gqlgen version v0.17.84 import ( "context" From 16ffb507e18f0a152ae62470e6dc951a2e6ef9f8 Mon Sep 17 00:00:00 2001 From: Saad Ur Rahman Date: Thu, 27 Nov 2025 16:16:55 -0500 Subject: [PATCH 3/7] [REST] regen after upgrade. --- docs/docs.go | 2 +- docs/swagger.json | 2 +- docs/swagger.yaml | 2 +- pkg/rest/rest.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index d6d4495..5c8efb4 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1462,7 +1462,7 @@ const docTemplate = `{ // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ - Version: "1.2.9", + Version: "1.2.10", Host: "localhost:33723", BasePath: "/api/rest/v1", Schemes: []string{"http"}, diff --git a/docs/swagger.json b/docs/swagger.json index 01207a2..65d91a9 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -21,7 +21,7 @@ "name": "GPL-3.0", "url": "https://opensource.org/licenses/GPL-3.0" }, - "version": "1.2.9" + "version": "1.2.10" }, "host": "localhost:33723", "basePath": "/api/rest/v1", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index bc487af..5852fbc 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -149,7 +149,7 @@ info: name: GPL-3.0 url: https://opensource.org/licenses/GPL-3.0 title: FTeX, Inc. (Formerly Crypto-Bro's Bank, Inc.) - version: 1.2.9 + version: 1.2.10 paths: /crypto/exchange/: post: diff --git a/pkg/rest/rest.go b/pkg/rest/rest.go index 39f073c..e3ffc2b 100644 --- a/pkg/rest/rest.go +++ b/pkg/rest/rest.go @@ -118,7 +118,7 @@ func (s *Server) initialize() { s.router = gin.Default() // @title FTeX, Inc. (Formerly Crypto-Bro's Bank, Inc.) - // @version 1.2.9 + // @version 1.2.10 // @description FTeX Fiat and Cryptocurrency Banking API. // @description Bank, buy, and sell Fiat and Cryptocurrencies. Prices for all currencies are retrieved from real-time quote providers. // From 72c3010e013a2876820549b7f06a81b4f9d2a617 Mon Sep 17 00:00:00 2001 From: Saad Ur Rahman Date: Thu, 27 Nov 2025 16:20:59 -0500 Subject: [PATCH 4/7] [Quotes] api no longer returns error on failure just status code. --- pkg/quotes/quotes_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/quotes/quotes_test.go b/pkg/quotes/quotes_test.go index 194510f..19159d5 100644 --- a/pkg/quotes/quotes_test.go +++ b/pkg/quotes/quotes_test.go @@ -114,7 +114,6 @@ func TestQuotesImpl_FiatQuote(t *testing.T) { if err != nil { require.NotEqual(t, 200, result.Error.Code, "received valid response code on error.") - require.NotEmpty(t, result.Error.Type, "received no type on error.") return } From 712afd3c58a575b21e21b4fb7c6682898e2c3193 Mon Sep 17 00:00:00 2001 From: Saad Ur Rahman Date: Thu, 27 Nov 2025 18:07:21 -0500 Subject: [PATCH 5/7] [Config] removing unneeded omits. --- pkg/auth/auth.go | 2 +- pkg/auth/config.go | 4 ++-- pkg/graphql/config.go | 4 ++-- pkg/logger/config.go | 4 ++-- pkg/models/http.go | 4 ++-- pkg/models/quotes.go | 2 +- pkg/postgres/config.go | 8 +++----- pkg/quotes/config.go | 6 +++--- pkg/redis/config.go | 6 ++---- pkg/rest/config.go | 4 ++-- 10 files changed, 20 insertions(+), 24 deletions(-) diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index e66b37a..df8b826 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -152,7 +152,7 @@ func (a *authImpl) GenerateJWT(clientID uuid.UUID) (*models.JWTAuthResponse, err // ValidateJWT will validate a signed JWT and extracts the Client ID and unix expiration timestamp from it. func (a *authImpl) ValidateJWT(signedToken string) (uuid.UUID, int64, error) { - token, err := jwt.ParseWithClaims(signedToken, &jwtClaim{}, func(token *jwt.Token) (interface{}, error) { + token, err := jwt.ParseWithClaims(signedToken, &jwtClaim{}, func(token *jwt.Token) (any, error) { return []byte(a.conf.JWTConfig.Key), nil }) if err != nil { diff --git a/pkg/auth/config.go b/pkg/auth/config.go index e667aa8..2ff8042 100644 --- a/pkg/auth/config.go +++ b/pkg/auth/config.go @@ -10,8 +10,8 @@ import ( // Config contains all the configurations for authentication. type config struct { - JWTConfig jwtConfig `json:"jwt,omitempty" mapstructure:"jwt" validate:"required" yaml:"jwt,omitempty"` - General generalConfig `json:"general,omitempty" mapstructure:"general" validate:"required" yaml:"general,omitempty"` + JWTConfig jwtConfig `json:"jwt" mapstructure:"jwt" validate:"required" yaml:"jwt"` + General generalConfig `json:"general" mapstructure:"general" validate:"required" yaml:"general"` } // jwtConfig contains the configurations for JWT creation and verification. diff --git a/pkg/graphql/config.go b/pkg/graphql/config.go index 91714fb..133c6c8 100644 --- a/pkg/graphql/config.go +++ b/pkg/graphql/config.go @@ -13,8 +13,8 @@ import ( // //nolint:lll type config struct { - Server serverConfig `json:"server,omitempty" mapstructure:"server" validate:"required" yaml:"server,omitempty"` - Authorization authorizationConfig `json:"authorization,omitempty" mapstructure:"authorization" validate:"required" yaml:"authorization,omitempty"` + Server serverConfig `json:"server" mapstructure:"server" validate:"required" yaml:"server"` + Authorization authorizationConfig `json:"authorization" mapstructure:"authorization" validate:"required" yaml:"authorization"` } // serverConfig contains the configurations for the HTTP REST server. diff --git a/pkg/logger/config.go b/pkg/logger/config.go index d73dae3..526496c 100644 --- a/pkg/logger/config.go +++ b/pkg/logger/config.go @@ -14,8 +14,8 @@ import ( type config struct { BuiltinConfig string `json:"builtinConfig,omitempty" mapstructure:"builtinConfig" validate:"oneof='Production' 'production' 'Development' 'development'" yaml:"builtinConfig,omitempty"` BuiltinEncoderConfig string `json:"builtinEncoderConfig,omitempty" mapstructure:"builtinEncoderConfig" validate:"oneof='Production' 'production' 'Development' 'development'" yaml:"builtinEncoderConfig,omitempty"` - GeneralConfig *generalConfig `json:"generalConfig,omitempty" mapstructure:"generalConfig" yaml:"generalConfig,omitempty"` - EncoderConfig *encoderConfig `json:"encoderConfig,omitempty" mapstructure:"encoderConfig" yaml:"encoderConfig,omitempty"` + GeneralConfig *generalConfig `json:"generalConfig,omitempty" mapstructure:"generalConfig" yaml:"generalConfig"` + EncoderConfig *encoderConfig `json:"encoderConfig,omitempty" mapstructure:"encoderConfig" yaml:"encoderConfig"` } // generalConfig contains all the general logger configurations. diff --git a/pkg/models/http.go b/pkg/models/http.go index bbd6fa8..80d3eb5 100644 --- a/pkg/models/http.go +++ b/pkg/models/http.go @@ -100,7 +100,7 @@ type HTTPFiatDetailsPaginated struct { // next page of information. type HTTPFiatTransactionsPaginated struct { TransactionDetails []postgres.FiatJournal `json:"transactionDetails"` - Links HTTPLinks `json:"links,omitempty"` + Links HTTPLinks `json:"links"` } // HTTPLinks are links used in HTTP responses to retrieve pages of information. @@ -120,5 +120,5 @@ type HTTPCryptoDetailsPaginated struct { // next page of information. type HTTPCryptoTransactionsPaginated struct { TransactionDetails []postgres.CryptoJournal `json:"transactionDetails"` - Links HTTPLinks `json:"links,omitempty"` + Links HTTPLinks `json:"links"` } diff --git a/pkg/models/quotes.go b/pkg/models/quotes.go index 38d84d9..2c9ef8d 100644 --- a/pkg/models/quotes.go +++ b/pkg/models/quotes.go @@ -8,7 +8,7 @@ import ( type FiatQuote struct { Info FiatInfo `json:"info"` Query FiatQuery `json:"query"` - Error FiatError `json:"error,omitempty"` + Error FiatError `json:"error"` Date string `json:"date"` Result decimal.Decimal `json:"result"` Success bool `json:"success"` diff --git a/pkg/postgres/config.go b/pkg/postgres/config.go index c9b1183..3a93e24 100644 --- a/pkg/postgres/config.go +++ b/pkg/postgres/config.go @@ -10,12 +10,10 @@ import ( ) // config contains the configurations loaded from the configuration file. -// -//nolint:lll type config struct { - Authentication authenticationConfig `json:"authentication,omitempty" mapstructure:"authentication" yaml:"authentication,omitempty"` - Connection connectionConfig `json:"connection,omitempty" mapstructure:"connection" yaml:"connection,omitempty"` - Pool poolConfig `json:"pool,omitempty" mapstructure:"pool" yaml:"pool,omitempty"` + Authentication authenticationConfig `json:"authentication" mapstructure:"authentication" yaml:"authentication"` + Connection connectionConfig `json:"connection" mapstructure:"connection" yaml:"connection"` + Pool poolConfig `json:"pool" mapstructure:"pool" yaml:"pool"` } // authenticationConfig contains the Postgres session authentication information. diff --git a/pkg/quotes/config.go b/pkg/quotes/config.go index 976bb49..c326cc0 100644 --- a/pkg/quotes/config.go +++ b/pkg/quotes/config.go @@ -13,9 +13,9 @@ import ( // //nolint:lll type config struct { - FiatCurrency apiConfig `json:"fiatCurrency,omitempty" mapstructure:"fiatCurrency" validate:"required" yaml:"fiatCurrency,omitempty"` - CryptoCurrency apiConfig `json:"cryptoCurrency,omitempty" mapstructure:"cryptoCurrency" validate:"required" yaml:"cryptoCurrency,omitempty"` - Connection connectionConfig `json:"connection,omitempty" mapstructure:"connection" yaml:"connection,omitempty"` + FiatCurrency apiConfig `json:"fiatCurrency" mapstructure:"fiatCurrency" validate:"required" yaml:"fiatCurrency"` + CryptoCurrency apiConfig `json:"cryptoCurrency" mapstructure:"cryptoCurrency" validate:"required" yaml:"cryptoCurrency"` + Connection connectionConfig `json:"connection" mapstructure:"connection" yaml:"connection"` } // apiConfig contains the API Key and URL information for a currency exchange endpoint. diff --git a/pkg/redis/config.go b/pkg/redis/config.go index 0baa654..909dc79 100644 --- a/pkg/redis/config.go +++ b/pkg/redis/config.go @@ -9,11 +9,9 @@ import ( ) // config is the configuration container for connecting to the Redis database. -// -//nolint:lll type config struct { - Authentication authenticationConfig `json:"authentication,omitempty" mapstructure:"authentication" yaml:"authentication,omitempty"` - Connection connectionConfig `json:"connection,omitempty" mapstructure:"connection" yaml:"connection,omitempty"` + Authentication authenticationConfig `json:"authentication" mapstructure:"authentication" yaml:"authentication"` + Connection connectionConfig `json:"connection" mapstructure:"connection" yaml:"connection"` } // authenticationConfig contains the Redis session authentication information. diff --git a/pkg/rest/config.go b/pkg/rest/config.go index 26031e1..1bd61d9 100644 --- a/pkg/rest/config.go +++ b/pkg/rest/config.go @@ -13,8 +13,8 @@ import ( // //nolint:lll type config struct { - Server serverConfig `json:"server,omitempty" mapstructure:"server" validate:"required" yaml:"server,omitempty"` - Authorization authorizationConfig `json:"authorization,omitempty" mapstructure:"authorization" validate:"required" yaml:"authorization,omitempty"` + Server serverConfig `json:"server" mapstructure:"server" validate:"required" yaml:"server"` + Authorization authorizationConfig `json:"authorization" mapstructure:"authorization" validate:"required" yaml:"authorization"` } // serverConfig contains the configurations for the HTTP REST server. From 3fae7e435da928b3344e9b3efd41c5852189b395 Mon Sep 17 00:00:00 2001 From: Saad Ur Rahman Date: Thu, 27 Nov 2025 18:27:50 -0500 Subject: [PATCH 6/7] [Go] language cleanup. --- pkg/common/common.go | 6 +++--- pkg/logger/logger_test.go | 5 +++-- pkg/logger/main_test.go | 2 +- pkg/postgres/config_test.go | 3 +-- pkg/quotes/quotes.go | 2 +- pkg/rest/handlers/crypto_test.go | 12 ++++++------ pkg/rest/handlers/fiat_test.go | 14 +++++++------- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pkg/common/common.go b/pkg/common/common.go index f7b1513..22a2b9c 100644 --- a/pkg/common/common.go +++ b/pkg/common/common.go @@ -96,7 +96,7 @@ func HTTPTransactionInfoPaginatedRequest(auth auth.Auth, monthStr, yearStr, time endYear = startYear endMonth = startMonth + 1 - if endMonth == 13 { //nolint:mnd,gomnd + if endMonth == 13 { //nolint:mnd endMonth = 1 endYear++ } @@ -133,7 +133,7 @@ func HTTPTransactionInfoPaginatedRequest(auth auth.Auth, monthStr, yearStr, time //nolint:wrapcheck func HTTPTransactionGeneratePageCursor(auth auth.Auth, periodStartStr, periodEndStr string, offset int32) ( string, error) { - return auth.EncryptToString([]byte(fmt.Sprintf("%s,%s,%d", periodStartStr, periodEndStr, offset))) + return auth.EncryptToString(fmt.Appendf([]byte{}, "%s,%s,%d", periodStartStr, periodEndStr, offset)) } // HTTPTransactionUnpackPageCursor will unpack an encrypted page cursor to its component parts. @@ -150,7 +150,7 @@ func HTTPTransactionUnpackPageCursor(auth auth.Auth, pageCursor string) ( } components := strings.Split(string(buffer), ",") - if len(components) != 3 { //nolint:mnd,gomnd + if len(components) != 3 { //nolint:mnd return startPGTS, "", endPGTS, "", -1, errors.New("decrypted page curror is invalid") } diff --git a/pkg/logger/logger_test.go b/pkg/logger/logger_test.go index b77965c..a414a9a 100644 --- a/pkg/logger/logger_test.go +++ b/pkg/logger/logger_test.go @@ -14,13 +14,14 @@ import ( ) func TestNewLogger(t *testing.T) { - require.Equal(t, reflect.TypeOf(NewLogger()), reflect.TypeOf(&Logger{}), "creates new logger successfully") + require.Equal(t, reflect.TypeFor[*Logger](), reflect.TypeOf(NewLogger()), "creates new logger successfully") } func TestNewTestLogger(t *testing.T) { testLogger, err := NewTestLogger() require.NoError(t, err, "failed to create new logger for use in test suites") - require.Equal(t, reflect.TypeOf(testLogger), reflect.TypeOf(&Logger{}), "creates new logger successfully") + //nolint:modernize + require.Equal(t, reflect.TypeFor[*Logger](), reflect.TypeOf(testLogger), "creates new logger successfully") } func TestMergeConfig_General(t *testing.T) { diff --git a/pkg/logger/main_test.go b/pkg/logger/main_test.go index 1f2c527..7eb790e 100644 --- a/pkg/logger/main_test.go +++ b/pkg/logger/main_test.go @@ -38,7 +38,7 @@ func (t *testLogSpy) FailNow() { t.TB.FailNow() } -func (t *testLogSpy) Logf(format string, args ...interface{}) { +func (t *testLogSpy) Logf(format string, args ...any) { // Log messages are in the format, // // 2017-10-27T13:03:01.000-0700 DEBUG your message here {data here} diff --git a/pkg/postgres/config_test.go b/pkg/postgres/config_test.go index 6dd3c8f..1420783 100644 --- a/pkg/postgres/config_test.go +++ b/pkg/postgres/config_test.go @@ -16,8 +16,7 @@ import ( ) func TestNewConfig(t *testing.T) { - cfg := newConfig() - require.Equal(t, reflect.TypeOf(config{}), reflect.TypeOf(cfg), "new config type mismatch") + require.Equal(t, reflect.TypeOf(newConfig()), reflect.TypeFor[config](), "new config type mismatch") } func TestConfigLoader(t *testing.T) { diff --git a/pkg/quotes/quotes.go b/pkg/quotes/quotes.go index 7875440..f7e24ff 100644 --- a/pkg/quotes/quotes.go +++ b/pkg/quotes/quotes.go @@ -227,7 +227,7 @@ func (q *quotesImpl) cryptoQuote(source, destination string) (models.CryptoQuote if !resp.IsSuccessState() { // Invalid cryptocurrency codes. - if resp.StatusCode == 550 { //nolint:mnd,gomnd + if resp.StatusCode == 550 { //nolint:mnd return result, NewError("invalid Crypto currency code").SetStatus(http.StatusBadRequest) } diff --git a/pkg/rest/handlers/crypto_test.go b/pkg/rest/handlers/crypto_test.go index aac6ec6..56c677c 100644 --- a/pkg/rest/handlers/crypto_test.go +++ b/pkg/rest/handlers/crypto_test.go @@ -465,7 +465,7 @@ func TestHandlers_OfferCrypto(t *testing.T) { //nolint:maintidx // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -679,7 +679,7 @@ func TestHandlers_ExchangeCrypto(t *testing.T) { // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -794,7 +794,7 @@ func TestHandler_BalanceCrypto(t *testing.T) { //nolint:dupl // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -904,7 +904,7 @@ func TestHandler_TxDetailsCrypto(t *testing.T) { // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -1117,7 +1117,7 @@ func TestHandler_BalanceCurrencyCryptoPaginated(t *testing.T) { //nolint:dupl // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -1315,7 +1315,7 @@ func TestHandler_TxDetailsCryptoPaginated(t *testing.T) { // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") diff --git a/pkg/rest/handlers/fiat_test.go b/pkg/rest/handlers/fiat_test.go index 0f812e4..7c87f47 100644 --- a/pkg/rest/handlers/fiat_test.go +++ b/pkg/rest/handlers/fiat_test.go @@ -264,7 +264,7 @@ func TestHandlers_DepositFiat(t *testing.T) { // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack success response.") @@ -526,7 +526,7 @@ func TestHandlers_ExchangeOfferFiat(t *testing.T) { //nolint:maintidx // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -888,7 +888,7 @@ func TestHandler_ExchangeTransferFiat(t *testing.T) { //nolint:maintidx // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -1003,7 +1003,7 @@ func TestHandler_BalanceFiat(t *testing.T) { //nolint:dupl // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -1157,7 +1157,7 @@ func TestHandler_TxDetailsFiat(t *testing.T) { // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -1370,7 +1370,7 @@ func TestHandler_BalanceFiatPaginated(t *testing.T) { //nolint:dupl // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") @@ -1584,7 +1584,7 @@ func TestHandler_TxDetailsFiatPaginated(t *testing.T) { // Verify responses require.Equal(t, test.expectedStatus, recorder.Code, "expected status codes do not match") - var resp map[string]interface{} + var resp map[string]any require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &resp), "failed to unpack response.") From 9b26714e9234f96a5d0c7922bc11930556e34605 Mon Sep 17 00:00:00 2001 From: Saad Ur Rahman Date: Thu, 27 Nov 2025 18:31:19 -0500 Subject: [PATCH 7/7] [CI] precommit upgrade. --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90f0988..b5f9444 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -10,6 +10,6 @@ repos: - id: check-added-large-files - repo: https://github.com/golangci/golangci-lint - rev: v1.51.2 + rev: v2.6.2 hooks: - id: golangci-lint