From 894c158afdf316b28ebcaa90108120feee9d8341 Mon Sep 17 00:00:00 2001 From: Adam French Date: Sat, 12 Sep 2026 18:10:41 +0100 Subject: [PATCH] Add places / things-to-do list with admin management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backend: new Place GORM model (title, location, notes, image, category, cost, priority, done) with auto-migration, a place.graphql schema, and resolvers for the places query plus admin-only create/update/delete. Regenerate gqlgen output against gqlgen v0.17.95, which requires Go 1.26 — bump go.mod and the builder image to match. Frontend: a places Pinia store, a CreatePlace admin form, and a PlacesTable rendered as a new tab in the Collage cell, with inline done-toggle and delete for admins. Rework the Admin page into a sidebar-navigated panel layout (picking up the previously unreachable CreateBookmark form) and give Login proper field labels, submit state, and error feedback. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KcFtkisHcKJuTZAnv3fVzA --- backend/Dockerfile | 2 +- backend/go.mod | 26 +- backend/go.sum | 73 +- backend/gqlgen.yml | 6 + backend/graph/activity.resolvers.go | 2 +- backend/graph/auth.resolvers.go | 2 +- backend/graph/bookmark.resolvers.go | 2 +- backend/graph/favorite.resolvers.go | 2 +- backend/graph/generated.go | 6020 +++++++++--------- backend/graph/gitea.resolvers.go | 2 +- backend/graph/job_app_reference.resolvers.go | 2 +- backend/graph/job_application.resolvers.go | 2 +- backend/graph/message.resolvers.go | 2 +- backend/graph/model/models_gen.go | 22 + backend/graph/place.resolvers.go | 116 + backend/graph/post.resolvers.go | 2 +- backend/graph/rowing.resolvers.go | 2 +- backend/graph/schema.resolvers.go | 8 +- backend/graph/schema/place.graphql | 45 + backend/graph/spotify.resolvers.go | 2 +- backend/graph/steam.resolvers.go | 2 +- backend/graph/user.resolvers.go | 2 +- backend/models/models.go | 15 + backend/services/database.go | 1 + vue/src/stores/places.js | 85 + vue/src/views/admin/Admin.vue | 142 +- vue/src/views/admin/CreatePlace.vue | 99 + vue/src/views/admin/Login.vue | 145 +- vue/src/views/home/Collage.vue | 136 +- vue/src/views/home/PlacesTable.vue | 178 + 30 files changed, 4170 insertions(+), 2975 deletions(-) create mode 100644 backend/graph/place.resolvers.go create mode 100644 backend/graph/schema/place.graphql create mode 100644 vue/src/stores/places.js create mode 100644 vue/src/views/admin/CreatePlace.vue create mode 100644 vue/src/views/home/PlacesTable.vue diff --git a/backend/Dockerfile b/backend/Dockerfile index 84b4558..6389717 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.25 AS builder +FROM golang:1.26 AS builder WORKDIR /backend diff --git a/backend/go.mod b/backend/go.mod index d783028..cf18806 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -1,17 +1,17 @@ module adam-french.co.uk/backend -go 1.25 +go 1.26 require ( - github.com/99designs/gqlgen v0.17.88 + github.com/99designs/gqlgen v0.17.95 github.com/anthropics/anthropic-sdk-go v1.26.0 github.com/gin-gonic/gin v1.11.0 github.com/golang-jwt/jwt/v5 v5.3.0 github.com/gorilla/websocket v1.5.3 github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd - github.com/vektah/gqlparser/v2 v2.5.32 + github.com/vektah/gqlparser/v2 v2.5.37 github.com/zmb3/spotify/v2 v2.4.3 - golang.org/x/crypto v0.48.0 + golang.org/x/crypto v0.55.0 golang.org/x/oauth2 v0.30.0 gorm.io/driver/postgres v1.6.0 gorm.io/gorm v1.31.1 @@ -22,7 +22,7 @@ require ( github.com/bytedance/sonic v1.14.0 // indirect github.com/bytedance/sonic/loader v0.3.0 // indirect github.com/cloudwego/base64x v0.1.6 // indirect - github.com/emersion/go-sasl v0.0.0-20241020182733-b788ff22d5a6 // indirect + github.com/coder/websocket v1.8.15 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/gin-contrib/sse v1.1.0 // indirect github.com/go-playground/locales v0.14.1 // indirect @@ -42,7 +42,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-isatty v0.0.24 // indirect github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect @@ -57,11 +57,11 @@ require ( github.com/ugorji/go/codec v1.3.0 // indirect go.uber.org/mock v0.5.0 // indirect golang.org/x/arch v0.20.0 // indirect - golang.org/x/mod v0.33.0 // indirect - golang.org/x/net v0.50.0 // indirect - golang.org/x/sync v0.19.0 // indirect - golang.org/x/sys v0.41.0 // indirect - golang.org/x/text v0.34.0 // indirect - golang.org/x/tools v0.42.0 // indirect - google.golang.org/protobuf v1.36.11 // indirect + golang.org/x/mod v0.40.0 // indirect + golang.org/x/net v0.58.0 // indirect + golang.org/x/sync v0.22.0 // indirect + golang.org/x/sys v0.47.0 // indirect + golang.org/x/text v0.41.0 // indirect + golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.12 // indirect ) diff --git a/backend/go.sum b/backend/go.sum index b33ebea..387e026 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -31,18 +31,12 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/99designs/gqlgen v0.17.88 h1:neMQDgehMwT1vYIOx/w5ZYPUU/iMNAJzRO44I5Intoc= -github.com/99designs/gqlgen v0.17.88/go.mod h1:qeqYFEgOeSKqWedOjogPizimp2iu4E23bdPvl4jTYic= +github.com/99designs/gqlgen v0.17.95 h1:882h7F5iJImgtyUVttc4MOK2NbzbMYc2oyNeHqkjpP4= +github.com/99designs/gqlgen v0.17.95/go.mod h1:kHYPrpwOXDU1OQyxIg3Z7nVXSnlUoHVWBY7CMJCAM4M= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -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/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM= -github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA= github.com/anthropics/anthropic-sdk-go v1.26.0 h1:oUTzFaUpAevfuELAP1sjL6CQJ9HHAfT7CoSYSac11PY= github.com/anthropics/anthropic-sdk-go v1.26.0/go.mod h1:qUKmaW+uuPB64iy1l+4kOSvaLqPXnHTTBKH6RVZ7q5Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= @@ -59,6 +53,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA= +github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -66,15 +62,6 @@ github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7c github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/emersion/go-imap v1.2.1 h1:+s9ZjMEjOB8NzZMVTM3cCenz2JrQIGGo5j1df19WjTA= -github.com/emersion/go-imap v1.2.1/go.mod h1:Qlx1FSx2FTxjnjWpIlVNEuX+ylerZQNFE5NsmKFSejY= -github.com/emersion/go-message v0.15.0/go.mod h1:wQUEfE+38+7EW8p8aZ96ptg6bAb1iwdgej19uXASlE4= -github.com/emersion/go-message v0.18.2 h1:rl55SQdjd9oJcIoQNhubD2Acs1E6IzlZISRTK7x/Lpg= -github.com/emersion/go-message v0.18.2/go.mod h1:XpJyL70LwRvq2a8rVbHXikPgKj8+aI0kGdHlg16ibYA= -github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ= -github.com/emersion/go-sasl v0.0.0-20241020182733-b788ff22d5a6 h1:oP4q0fw+fOSWn3DfFi4EXdT+B+gTtzx8GC9xsc26Znk= -github.com/emersion/go-sasl v0.0.0-20241020182733-b788ff22d5a6/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ= -github.com/emersion/go-textwrapper v0.0.0-20200911093747-65d896831594/go.mod h1:aqO8z8wPrjkscevZJFVE1wXJrLpC5LtJG7fqLOsPb2U= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -188,15 +175,14 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= +github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/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/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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= @@ -206,8 +192,6 @@ github.com/quic-go/quic-go v0.54.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= -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/sosodev/duration v1.4.0 h1:35ed0KiVFriGHHzZZJaZLgmTEEICIyt8Sx0RQfj9IjE= github.com/sosodev/duration v1.4.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -219,8 +203,8 @@ 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.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -235,8 +219,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= 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/vektah/gqlparser/v2 v2.5.32 h1:k9QPJd4sEDTL+qB4ncPLflqTJ3MmjB9SrVzJrawpFSc= -github.com/vektah/gqlparser/v2 v2.5.32/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts= +github.com/vektah/gqlparser/v2 v2.5.37 h1:jbb1Ilv+xBklV6653tKb4oVUupPNTLb5LmrnBKVI12Y= +github.com/vektah/gqlparser/v2 v2.5.37/go.mod h1:9O4Ox6Ngd3Y12bMD3w6i3CRQXh8W1oC1q0m6olCymDM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -250,6 +234,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= 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= @@ -260,8 +246,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= -golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= +golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M= +golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -294,8 +280,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/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.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= -golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= +golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -328,8 +314,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= -golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= +golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= +golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -348,8 +334,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= -golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -380,12 +366,11 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= -golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= +golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= 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= @@ -397,13 +382,12 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/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.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= -golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= +golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -449,8 +433,8 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= -golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= +golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= 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= @@ -532,8 +516,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= -google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -541,7 +525,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/postgres v1.6.0 h1:2dxzU8xJ+ivvqTRph34QX+WrRaJlmfyPqXmoGVjMBa4= gorm.io/driver/postgres v1.6.0/go.mod h1:vUw0mrGgrTK+uPHEhAdV4sfFELrByKVGnaVRkXDhtWo= diff --git a/backend/gqlgen.yml b/backend/gqlgen.yml index fb3a2dd..423cf9f 100644 --- a/backend/gqlgen.yml +++ b/backend/gqlgen.yml @@ -75,3 +75,9 @@ models: fields: deletedAt: resolver: false + Place: + model: + - adam-french.co.uk/backend/models.Place + fields: + deletedAt: + resolver: false diff --git a/backend/graph/activity.resolvers.go b/backend/graph/activity.resolvers.go index 8aeac6a..f3e3c61 100644 --- a/backend/graph/activity.resolvers.go +++ b/backend/graph/activity.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/auth.resolvers.go b/backend/graph/auth.resolvers.go index 90d8a47..6ad9acb 100644 --- a/backend/graph/auth.resolvers.go +++ b/backend/graph/auth.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/bookmark.resolvers.go b/backend/graph/bookmark.resolvers.go index 92c6b00..dc1c117 100644 --- a/backend/graph/bookmark.resolvers.go +++ b/backend/graph/bookmark.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/favorite.resolvers.go b/backend/graph/favorite.resolvers.go index c39fad5..79e7010 100644 --- a/backend/graph/favorite.resolvers.go +++ b/backend/graph/favorite.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/generated.go b/backend/graph/generated.go index f8a0227..95c754a 100644 --- a/backend/graph/generated.go +++ b/backend/graph/generated.go @@ -8,6 +8,7 @@ import ( "embed" "errors" "fmt" + "math" "strconv" "sync/atomic" "time" @@ -20,7 +21,7 @@ import ( "github.com/vektah/gqlparser/v2/ast" ) -// region ************************** generated!.gotpl ************************** +// region ***************************** api!.gotpl ***************************** // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { @@ -37,6 +38,7 @@ type ResolverRoot interface { JobApplication() JobApplicationResolver Message() MessageResolver Mutation() MutationResolver + Place() PlaceResolver Post() PostResolver Query() QueryResolver Rowing() RowingResolver @@ -124,11 +126,13 @@ type ComplexityRoot struct { CreateFavorite func(childComplexity int, input model.CreateFavoriteInput) int CreateJobAppReference func(childComplexity int, input model.CreateJobAppReferenceInput) int CreateJobApplication func(childComplexity int, input model.CreateJobApplicationInput) int + CreatePlace func(childComplexity int, input model.CreatePlaceInput) int CreatePost func(childComplexity int, input model.CreatePostInput) int CreateUser func(childComplexity int, input model.CreateUserInput) int DeleteBookmark func(childComplexity int, id int) int DeleteJobAppReference func(childComplexity int, id int) int DeleteJobApplication func(childComplexity int, id int) int + DeletePlace func(childComplexity int, id int) int DeletePost func(childComplexity int, id int) int DeleteUser func(childComplexity int, id int) int Login func(childComplexity int, input model.LoginInput) int @@ -137,9 +141,24 @@ type ComplexityRoot struct { SetUserAdmin func(childComplexity int, id int, admin bool) int UpdateJobAppReference func(childComplexity int, id int, input model.UpdateJobAppReferenceInput) int UpdateJobApplication func(childComplexity int, id int, input model.UpdateJobApplicationInput) int + UpdatePlace func(childComplexity int, id int, input model.UpdatePlaceInput) int UpdatePost func(childComplexity int, id int, input model.UpdatePostInput) int } + Place struct { + Category func(childComplexity int) int + Cost func(childComplexity int) int + CreatedAt func(childComplexity int) int + Done func(childComplexity int) int + ID func(childComplexity int) int + ImageURL func(childComplexity int) int + Location func(childComplexity int) int + Notes func(childComplexity int) int + Priority func(childComplexity int) int + Title func(childComplexity int) int + UpdatedAt func(childComplexity int) int + } + Post struct { Author func(childComplexity int) int Content func(childComplexity int) int @@ -159,6 +178,7 @@ type ComplexityRoot struct { JobApplications func(childComplexity int) int Me func(childComplexity int) int Messages func(childComplexity int) int + Places func(childComplexity int) int Post func(childComplexity int, id int) int Posts func(childComplexity int) int RowingSessions func(childComplexity int) int @@ -230,6 +250,10 @@ type ComplexityRoot struct { } } +// endregion ***************************** api!.gotpl ***************************** + +// region ************************** generated!.gotpl ************************** + type ActivityResolver interface { ID(ctx context.Context, obj *models.Activity) (int, error) } @@ -264,6 +288,9 @@ type MutationResolver interface { CreateJobApplication(ctx context.Context, input model.CreateJobApplicationInput) (*models.JobApplication, error) UpdateJobApplication(ctx context.Context, id int, input model.UpdateJobApplicationInput) (*models.JobApplication, error) DeleteJobApplication(ctx context.Context, id int) (bool, error) + CreatePlace(ctx context.Context, input model.CreatePlaceInput) (*models.Place, error) + UpdatePlace(ctx context.Context, id int, input model.UpdatePlaceInput) (*models.Place, error) + DeletePlace(ctx context.Context, id int) (*models.Place, error) CreatePost(ctx context.Context, input model.CreatePostInput) (*models.Post, error) UpdatePost(ctx context.Context, id int, input model.UpdatePostInput) (*models.Post, error) DeletePost(ctx context.Context, id int) (*models.Post, error) @@ -271,6 +298,9 @@ type MutationResolver interface { DeleteUser(ctx context.Context, id int) (*models.User, error) SetUserAdmin(ctx context.Context, id int, admin bool) (*models.User, error) } +type PlaceResolver interface { + ID(ctx context.Context, obj *models.Place) (int, error) +} type PostResolver interface { ID(ctx context.Context, obj *models.Post) (int, error) } @@ -284,6 +314,7 @@ type QueryResolver interface { JobApplications(ctx context.Context) ([]*models.JobApplication, error) JobApplication(ctx context.Context, id int) (*models.JobApplication, error) Messages(ctx context.Context) ([]*models.Message, error) + Places(ctx context.Context) ([]*models.Place, error) Posts(ctx context.Context) ([]*models.Post, error) Post(ctx context.Context, id int) (*models.Post, error) RowingSessions(ctx context.Context) ([]*models.Rowing, error) @@ -303,6 +334,10 @@ type UserResolver interface { ID(ctx context.Context, obj *models.User) (int, error) } +// endregion ************************** generated!.gotpl ************************** + +// region ************************** internal!.gotpl *************************** + type executableSchema graphql.ExecutableSchemaState[ResolverRoot, DirectiveRoot, ComplexityRoot] func (e *executableSchema) Schema() *ast.Schema { @@ -662,6 +697,17 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin } return e.ComplexityRoot.Mutation.CreateJobApplication(childComplexity, args["input"].(model.CreateJobApplicationInput)), true + case "Mutation.createPlace": + if e.ComplexityRoot.Mutation.CreatePlace == nil { + break + } + + args, err := ec.field_Mutation_createPlace_args(ctx, rawArgs) + if err != nil { + return 0, false + } + + return e.ComplexityRoot.Mutation.CreatePlace(childComplexity, args["input"].(model.CreatePlaceInput)), true case "Mutation.createPost": if e.ComplexityRoot.Mutation.CreatePost == nil { break @@ -717,6 +763,17 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin } return e.ComplexityRoot.Mutation.DeleteJobApplication(childComplexity, args["id"].(int)), true + case "Mutation.deletePlace": + if e.ComplexityRoot.Mutation.DeletePlace == nil { + break + } + + args, err := ec.field_Mutation_deletePlace_args(ctx, rawArgs) + if err != nil { + return 0, false + } + + return e.ComplexityRoot.Mutation.DeletePlace(childComplexity, args["id"].(int)), true case "Mutation.deletePost": if e.ComplexityRoot.Mutation.DeletePost == nil { break @@ -795,6 +852,17 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin } return e.ComplexityRoot.Mutation.UpdateJobApplication(childComplexity, args["id"].(int), args["input"].(model.UpdateJobApplicationInput)), true + case "Mutation.updatePlace": + if e.ComplexityRoot.Mutation.UpdatePlace == nil { + break + } + + args, err := ec.field_Mutation_updatePlace_args(ctx, rawArgs) + if err != nil { + return 0, false + } + + return e.ComplexityRoot.Mutation.UpdatePlace(childComplexity, args["id"].(int), args["input"].(model.UpdatePlaceInput)), true case "Mutation.updatePost": if e.ComplexityRoot.Mutation.UpdatePost == nil { break @@ -807,6 +875,73 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.Mutation.UpdatePost(childComplexity, args["id"].(int), args["input"].(model.UpdatePostInput)), true + case "Place.category": + if e.ComplexityRoot.Place.Category == nil { + break + } + + return e.ComplexityRoot.Place.Category(childComplexity), true + case "Place.cost": + if e.ComplexityRoot.Place.Cost == nil { + break + } + + return e.ComplexityRoot.Place.Cost(childComplexity), true + case "Place.createdAt": + if e.ComplexityRoot.Place.CreatedAt == nil { + break + } + + return e.ComplexityRoot.Place.CreatedAt(childComplexity), true + case "Place.done": + if e.ComplexityRoot.Place.Done == nil { + break + } + + return e.ComplexityRoot.Place.Done(childComplexity), true + case "Place.id": + if e.ComplexityRoot.Place.ID == nil { + break + } + + return e.ComplexityRoot.Place.ID(childComplexity), true + case "Place.imageUrl": + if e.ComplexityRoot.Place.ImageURL == nil { + break + } + + return e.ComplexityRoot.Place.ImageURL(childComplexity), true + case "Place.location": + if e.ComplexityRoot.Place.Location == nil { + break + } + + return e.ComplexityRoot.Place.Location(childComplexity), true + case "Place.notes": + if e.ComplexityRoot.Place.Notes == nil { + break + } + + return e.ComplexityRoot.Place.Notes(childComplexity), true + case "Place.priority": + if e.ComplexityRoot.Place.Priority == nil { + break + } + + return e.ComplexityRoot.Place.Priority(childComplexity), true + case "Place.title": + if e.ComplexityRoot.Place.Title == nil { + break + } + + return e.ComplexityRoot.Place.Title(childComplexity), true + case "Place.updatedAt": + if e.ComplexityRoot.Place.UpdatedAt == nil { + break + } + + return e.ComplexityRoot.Place.UpdatedAt(childComplexity), true + case "Post.author": if e.ComplexityRoot.Post.Author == nil { break @@ -904,6 +1039,12 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin } return e.ComplexityRoot.Query.Messages(childComplexity), true + case "Query.places": + if e.ComplexityRoot.Query.Places == nil { + break + } + + return e.ComplexityRoot.Query.Places(childComplexity), true case "Query.post": if e.ComplexityRoot.Query.Post == nil { break @@ -1166,11 +1307,13 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputCreateFavoriteInput, ec.unmarshalInputCreateJobAppReferenceInput, ec.unmarshalInputCreateJobApplicationInput, + ec.unmarshalInputCreatePlaceInput, ec.unmarshalInputCreatePostInput, ec.unmarshalInputCreateUserInput, ec.unmarshalInputLoginInput, ec.unmarshalInputUpdateJobAppReferenceInput, ec.unmarshalInputUpdateJobApplicationInput, + ec.unmarshalInputUpdatePlaceInput, ec.unmarshalInputUpdatePostInput, ) first := true @@ -1235,8 +1378,8 @@ func newExecutionContext( opCtx *graphql.OperationContext, execSchema *executableSchema, deferredResults chan graphql.DeferredResult, -) executionContext { - return executionContext{ +) *executionContext { + return &executionContext{ ExecutionContextState: graphql.NewExecutionContextState[ResolverRoot, DirectiveRoot, ComplexityRoot]( opCtx, (*graphql.ExecutableSchemaState[ResolverRoot, DirectiveRoot, ComplexityRoot])(execSchema), @@ -1246,7 +1389,7 @@ func newExecutionContext( } } -//go:embed "schema/activity.graphql" "schema/auth.graphql" "schema/bookmark.graphql" "schema/favorite.graphql" "schema/gitea.graphql" "schema/job_app_reference.graphql" "schema/job_application.graphql" "schema/message.graphql" "schema/post.graphql" "schema/rowing.graphql" "schema/schema.graphql" "schema/spotify.graphql" "schema/steam.graphql" "schema/user.graphql" +//go:embed "schema/activity.graphql" "schema/auth.graphql" "schema/bookmark.graphql" "schema/favorite.graphql" "schema/gitea.graphql" "schema/job_app_reference.graphql" "schema/job_application.graphql" "schema/message.graphql" "schema/place.graphql" "schema/post.graphql" "schema/rowing.graphql" "schema/schema.graphql" "schema/spotify.graphql" "schema/steam.graphql" "schema/user.graphql" var sourcesFS embed.FS func sourceData(filename string) string { @@ -1266,6 +1409,7 @@ var sources = []*ast.Source{ {Name: "schema/job_app_reference.graphql", Input: sourceData("schema/job_app_reference.graphql"), BuiltIn: false}, {Name: "schema/job_application.graphql", Input: sourceData("schema/job_application.graphql"), BuiltIn: false}, {Name: "schema/message.graphql", Input: sourceData("schema/message.graphql"), BuiltIn: false}, + {Name: "schema/place.graphql", Input: sourceData("schema/place.graphql"), BuiltIn: false}, {Name: "schema/post.graphql", Input: sourceData("schema/post.graphql"), BuiltIn: false}, {Name: "schema/rowing.graphql", Input: sourceData("schema/rowing.graphql"), BuiltIn: false}, {Name: "schema/schema.graphql", Input: sourceData("schema/schema.graphql"), BuiltIn: false}, @@ -1275,14 +1419,441 @@ var sources = []*ast.Source{ } var parsedSchema = gqlparser.MustLoadSchema(sources...) -// endregion ************************** generated!.gotpl ************************** +// childFields_* functions provide shared child field context lookups. +// Each function is generated once per unique object type, deduplicating the +// switch statements that were previously inlined in every fieldContext_* function. + +func (ec *executionContext) childFields_Activity(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Activity_id(ctx, field) + case "createdAt": + return ec.fieldContext_Activity_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_Activity_updatedAt(ctx, field) + case "type": + return ec.fieldContext_Activity_type(ctx, field) + case "name": + return ec.fieldContext_Activity_name(ctx, field) + case "link": + return ec.fieldContext_Activity_link(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Activity", field.Name) +} + +func (ec *executionContext) childFields_AuthPayload(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "user": + return ec.fieldContext_AuthPayload_user(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AuthPayload", field.Name) +} + +func (ec *executionContext) childFields_Bookmark(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Bookmark_id(ctx, field) + case "createdAt": + return ec.fieldContext_Bookmark_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_Bookmark_updatedAt(ctx, field) + case "category": + return ec.fieldContext_Bookmark_category(ctx, field) + case "name": + return ec.fieldContext_Bookmark_name(ctx, field) + case "link": + return ec.fieldContext_Bookmark_link(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Bookmark", field.Name) +} + +func (ec *executionContext) childFields_Favorite(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Favorite_id(ctx, field) + case "createdAt": + return ec.fieldContext_Favorite_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_Favorite_updatedAt(ctx, field) + case "type": + return ec.fieldContext_Favorite_type(ctx, field) + case "name": + return ec.fieldContext_Favorite_name(ctx, field) + case "link": + return ec.fieldContext_Favorite_link(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Favorite", field.Name) +} + +func (ec *executionContext) childFields_GiteaFeedItem(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "avatarUrl": + return ec.fieldContext_GiteaFeedItem_avatarUrl(ctx, field) + case "repoUrl": + return ec.fieldContext_GiteaFeedItem_repoUrl(ctx, field) + case "repoName": + return ec.fieldContext_GiteaFeedItem_repoName(ctx, field) + case "opType": + return ec.fieldContext_GiteaFeedItem_opType(ctx, field) + case "commitMessage": + return ec.fieldContext_GiteaFeedItem_commitMessage(ctx, field) + case "createdAt": + return ec.fieldContext_GiteaFeedItem_createdAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type GiteaFeedItem", field.Name) +} + +func (ec *executionContext) childFields_JobAppReference(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_JobAppReference_id(ctx, field) + case "createdAt": + return ec.fieldContext_JobAppReference_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_JobAppReference_updatedAt(ctx, field) + case "category": + return ec.fieldContext_JobAppReference_category(ctx, field) + case "label": + return ec.fieldContext_JobAppReference_label(ctx, field) + case "value": + return ec.fieldContext_JobAppReference_value(ctx, field) + case "sortOrder": + return ec.fieldContext_JobAppReference_sortOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type JobAppReference", field.Name) +} + +func (ec *executionContext) childFields_JobApplication(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_JobApplication_id(ctx, field) + case "createdAt": + return ec.fieldContext_JobApplication_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_JobApplication_updatedAt(ctx, field) + case "jobTitle": + return ec.fieldContext_JobApplication_jobTitle(ctx, field) + case "company": + return ec.fieldContext_JobApplication_company(ctx, field) + case "location": + return ec.fieldContext_JobApplication_location(ctx, field) + case "url": + return ec.fieldContext_JobApplication_url(ctx, field) + case "status": + return ec.fieldContext_JobApplication_status(ctx, field) + case "notes": + return ec.fieldContext_JobApplication_notes(ctx, field) + case "appliedAt": + return ec.fieldContext_JobApplication_appliedAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type JobApplication", field.Name) +} + +func (ec *executionContext) childFields_Message(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Message_id(ctx, field) + case "content": + return ec.fieldContext_Message_content(ctx, field) + case "authorId": + return ec.fieldContext_Message_authorId(ctx, field) + case "fileUrl": + return ec.fieldContext_Message_fileUrl(ctx, field) + case "createdAt": + return ec.fieldContext_Message_createdAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Message", field.Name) +} + +func (ec *executionContext) childFields_Place(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Place_id(ctx, field) + case "createdAt": + return ec.fieldContext_Place_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_Place_updatedAt(ctx, field) + case "title": + return ec.fieldContext_Place_title(ctx, field) + case "location": + return ec.fieldContext_Place_location(ctx, field) + case "notes": + return ec.fieldContext_Place_notes(ctx, field) + case "imageUrl": + return ec.fieldContext_Place_imageUrl(ctx, field) + case "category": + return ec.fieldContext_Place_category(ctx, field) + case "cost": + return ec.fieldContext_Place_cost(ctx, field) + case "priority": + return ec.fieldContext_Place_priority(ctx, field) + case "done": + return ec.fieldContext_Place_done(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Place", field.Name) +} + +func (ec *executionContext) childFields_Post(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Post_id(ctx, field) + case "createdAt": + return ec.fieldContext_Post_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_Post_updatedAt(ctx, field) + case "title": + return ec.fieldContext_Post_title(ctx, field) + case "author": + return ec.fieldContext_Post_author(ctx, field) + case "content": + return ec.fieldContext_Post_content(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Post", field.Name) +} + +func (ec *executionContext) childFields_Rowing(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Rowing_id(ctx, field) + case "createdAt": + return ec.fieldContext_Rowing_createdAt(ctx, field) + case "date": + return ec.fieldContext_Rowing_date(ctx, field) + case "time": + return ec.fieldContext_Rowing_time(ctx, field) + case "distance": + return ec.fieldContext_Rowing_distance(ctx, field) + case "timePer500m": + return ec.fieldContext_Rowing_timePer500m(ctx, field) + case "calories": + return ec.fieldContext_Rowing_calories(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Rowing", field.Name) +} + +func (ec *executionContext) childFields_SpotifyAlbum(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext_SpotifyAlbum_name(ctx, field) + case "images": + return ec.fieldContext_SpotifyAlbum_images(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SpotifyAlbum", field.Name) +} + +func (ec *executionContext) childFields_SpotifyArtist(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext_SpotifyArtist_name(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SpotifyArtist", field.Name) +} + +func (ec *executionContext) childFields_SpotifyImage(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "url": + return ec.fieldContext_SpotifyImage_url(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SpotifyImage", field.Name) +} + +func (ec *executionContext) childFields_SpotifyPlaying(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "playing": + return ec.fieldContext_SpotifyPlaying_playing(ctx, field) + case "track": + return ec.fieldContext_SpotifyPlaying_track(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SpotifyPlaying", field.Name) +} + +func (ec *executionContext) childFields_SpotifyRecentItem(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "track": + return ec.fieldContext_SpotifyRecentItem_track(ctx, field) + case "playedAt": + return ec.fieldContext_SpotifyRecentItem_playedAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SpotifyRecentItem", field.Name) +} + +func (ec *executionContext) childFields_SpotifyTrack(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext_SpotifyTrack_name(ctx, field) + case "artists": + return ec.fieldContext_SpotifyTrack_artists(ctx, field) + case "album": + return ec.fieldContext_SpotifyTrack_album(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SpotifyTrack", field.Name) +} + +func (ec *executionContext) childFields_SteamGame(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "appId": + return ec.fieldContext_SteamGame_appId(ctx, field) + case "name": + return ec.fieldContext_SteamGame_name(ctx, field) + case "playtime2Weeks": + return ec.fieldContext_SteamGame_playtime2Weeks(ctx, field) + case "playtimeForever": + return ec.fieldContext_SteamGame_playtimeForever(ctx, field) + case "headerImageUrl": + return ec.fieldContext_SteamGame_headerImageUrl(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SteamGame", field.Name) +} + +func (ec *executionContext) childFields_SteamStatus(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "online": + return ec.fieldContext_SteamStatus_online(ctx, field) + case "recentGames": + return ec.fieldContext_SteamStatus_recentGames(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SteamStatus", field.Name) +} + +func (ec *executionContext) childFields_User(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_User_id(ctx, field) + case "createdAt": + return ec.fieldContext_User_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_User_updatedAt(ctx, field) + case "username": + return ec.fieldContext_User_username(ctx, field) + case "admin": + return ec.fieldContext_User_admin(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type User", field.Name) +} + +func (ec *executionContext) childFields___Directive(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Directive_name(ctx, field) + case "description": + return ec.fieldContext___Directive_description(ctx, field) + case "isRepeatable": + return ec.fieldContext___Directive_isRepeatable(ctx, field) + case "locations": + return ec.fieldContext___Directive_locations(ctx, field) + case "args": + return ec.fieldContext___Directive_args(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) +} + +func (ec *executionContext) childFields___EnumValue(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___EnumValue_name(ctx, field) + case "description": + return ec.fieldContext___EnumValue_description(ctx, field) + case "isDeprecated": + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) +} + +func (ec *executionContext) childFields___Field(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Field_name(ctx, field) + case "description": + return ec.fieldContext___Field_description(ctx, field) + case "args": + return ec.fieldContext___Field_args(ctx, field) + case "type": + return ec.fieldContext___Field_type(ctx, field) + case "isDeprecated": + return ec.fieldContext___Field_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___Field_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) +} + +func (ec *executionContext) childFields___InputValue(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + case "isDeprecated": + return ec.fieldContext___InputValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___InputValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) +} + +func (ec *executionContext) childFields___Schema(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) +} + +func (ec *executionContext) childFields___Type(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "isOneOf": + return ec.fieldContext___Type_isOneOf(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) +} + +// endregion ************************** internal!.gotpl *************************** // region ***************************** args.gotpl ***************************** func (ec *executionContext) field_Mutation_createActivity_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCreateActivityInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateActivityInput) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.CreateActivityInput, error) { + return ec.unmarshalNCreateActivityInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateActivityInput(ctx, v) + }) if err != nil { return nil, err } @@ -1293,7 +1864,10 @@ func (ec *executionContext) field_Mutation_createActivity_args(ctx context.Conte func (ec *executionContext) field_Mutation_createBookmark_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCreateBookmarkInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateBookmarkInput) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.CreateBookmarkInput, error) { + return ec.unmarshalNCreateBookmarkInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateBookmarkInput(ctx, v) + }) if err != nil { return nil, err } @@ -1304,7 +1878,10 @@ func (ec *executionContext) field_Mutation_createBookmark_args(ctx context.Conte func (ec *executionContext) field_Mutation_createFavorite_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCreateFavoriteInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateFavoriteInput) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.CreateFavoriteInput, error) { + return ec.unmarshalNCreateFavoriteInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateFavoriteInput(ctx, v) + }) if err != nil { return nil, err } @@ -1315,7 +1892,10 @@ func (ec *executionContext) field_Mutation_createFavorite_args(ctx context.Conte func (ec *executionContext) field_Mutation_createJobAppReference_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCreateJobAppReferenceInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateJobAppReferenceInput) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.CreateJobAppReferenceInput, error) { + return ec.unmarshalNCreateJobAppReferenceInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateJobAppReferenceInput(ctx, v) + }) if err != nil { return nil, err } @@ -1326,7 +1906,24 @@ func (ec *executionContext) field_Mutation_createJobAppReference_args(ctx contex func (ec *executionContext) field_Mutation_createJobApplication_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCreateJobApplicationInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateJobApplicationInput) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.CreateJobApplicationInput, error) { + return ec.unmarshalNCreateJobApplicationInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateJobApplicationInput(ctx, v) + }) + if err != nil { + return nil, err + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_createPlace_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.CreatePlaceInput, error) { + return ec.unmarshalNCreatePlaceInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreatePlaceInput(ctx, v) + }) if err != nil { return nil, err } @@ -1337,7 +1934,10 @@ func (ec *executionContext) field_Mutation_createJobApplication_args(ctx context func (ec *executionContext) field_Mutation_createPost_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCreatePostInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreatePostInput) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.CreatePostInput, error) { + return ec.unmarshalNCreatePostInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreatePostInput(ctx, v) + }) if err != nil { return nil, err } @@ -1348,7 +1948,10 @@ func (ec *executionContext) field_Mutation_createPost_args(ctx context.Context, func (ec *executionContext) field_Mutation_createUser_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCreateUserInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateUserInput) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.CreateUserInput, error) { + return ec.unmarshalNCreateUserInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreateUserInput(ctx, v) + }) if err != nil { return nil, err } @@ -1359,7 +1962,10 @@ func (ec *executionContext) field_Mutation_createUser_args(ctx context.Context, func (ec *executionContext) field_Mutation_deleteBookmark_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } @@ -1370,7 +1976,10 @@ func (ec *executionContext) field_Mutation_deleteBookmark_args(ctx context.Conte func (ec *executionContext) field_Mutation_deleteJobAppReference_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } @@ -1381,7 +1990,24 @@ func (ec *executionContext) field_Mutation_deleteJobAppReference_args(ctx contex func (ec *executionContext) field_Mutation_deleteJobApplication_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) + if err != nil { + return nil, err + } + args["id"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_deletePlace_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } @@ -1392,7 +2018,10 @@ func (ec *executionContext) field_Mutation_deleteJobApplication_args(ctx context func (ec *executionContext) field_Mutation_deletePost_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } @@ -1403,7 +2032,10 @@ func (ec *executionContext) field_Mutation_deletePost_args(ctx context.Context, 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 := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } @@ -1414,7 +2046,10 @@ func (ec *executionContext) field_Mutation_deleteUser_args(ctx context.Context, func (ec *executionContext) field_Mutation_login_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNLoginInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐLoginInput) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.LoginInput, error) { + return ec.unmarshalNLoginInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐLoginInput(ctx, v) + }) if err != nil { return nil, err } @@ -1425,12 +2060,18 @@ func (ec *executionContext) field_Mutation_login_args(ctx context.Context, rawAr func (ec *executionContext) field_Mutation_setUserAdmin_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } args["id"] = arg0 - arg1, err := graphql.ProcessArgField(ctx, rawArgs, "admin", ec.unmarshalNBoolean2bool) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "admin", + func(ctx context.Context, v any) (bool, error) { + return ec.unmarshalNBoolean2bool(ctx, v) + }) if err != nil { return nil, err } @@ -1441,12 +2082,18 @@ func (ec *executionContext) field_Mutation_setUserAdmin_args(ctx context.Context func (ec *executionContext) field_Mutation_updateJobAppReference_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } args["id"] = arg0 - arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNUpdateJobAppReferenceInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdateJobAppReferenceInput) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.UpdateJobAppReferenceInput, error) { + return ec.unmarshalNUpdateJobAppReferenceInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdateJobAppReferenceInput(ctx, v) + }) if err != nil { return nil, err } @@ -1457,12 +2104,40 @@ func (ec *executionContext) field_Mutation_updateJobAppReference_args(ctx contex func (ec *executionContext) field_Mutation_updateJobApplication_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } args["id"] = arg0 - arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNUpdateJobApplicationInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdateJobApplicationInput) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.UpdateJobApplicationInput, error) { + return ec.unmarshalNUpdateJobApplicationInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdateJobApplicationInput(ctx, v) + }) + if err != nil { + return nil, err + } + args["input"] = arg1 + return args, nil +} + +func (ec *executionContext) field_Mutation_updatePlace_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) + if err != nil { + return nil, err + } + args["id"] = arg0 + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.UpdatePlaceInput, error) { + return ec.unmarshalNUpdatePlaceInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdatePlaceInput(ctx, v) + }) if err != nil { return nil, err } @@ -1473,12 +2148,18 @@ func (ec *executionContext) field_Mutation_updateJobApplication_args(ctx context func (ec *executionContext) field_Mutation_updatePost_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } args["id"] = arg0 - arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNUpdatePostInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdatePostInput) + arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", + func(ctx context.Context, v any) (model.UpdatePostInput, error) { + return ec.unmarshalNUpdatePostInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdatePostInput(ctx, v) + }) if err != nil { return nil, err } @@ -1489,7 +2170,10 @@ func (ec *executionContext) field_Mutation_updatePost_args(ctx context.Context, 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 := graphql.ProcessArgField(ctx, rawArgs, "name", ec.unmarshalNString2string) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "name", + func(ctx context.Context, v any) (string, error) { + return ec.unmarshalNString2string(ctx, v) + }) if err != nil { return nil, err } @@ -1500,7 +2184,10 @@ func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs func (ec *executionContext) field_Query_jobApplication_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } @@ -1511,7 +2198,10 @@ func (ec *executionContext) field_Query_jobApplication_args(ctx context.Context, func (ec *executionContext) field_Query_post_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } @@ -1522,7 +2212,10 @@ func (ec *executionContext) field_Query_post_args(ctx context.Context, rawArgs m func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2int) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", + func(ctx context.Context, v any) (int, error) { + return ec.unmarshalNID2int(ctx, v) + }) if err != nil { return nil, err } @@ -1533,7 +2226,10 @@ func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs m 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 := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2ᚖbool) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", + func(ctx context.Context, v any) (*bool, error) { + return ec.unmarshalOBoolean2ᚖbool(ctx, v) + }) if err != nil { return nil, err } @@ -1544,7 +2240,10 @@ func (ec *executionContext) field___Directive_args_args(ctx context.Context, raw 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 := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2ᚖbool) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", + func(ctx context.Context, v any) (*bool, error) { + return ec.unmarshalOBoolean2ᚖbool(ctx, v) + }) if err != nil { return nil, err } @@ -1555,7 +2254,10 @@ func (ec *executionContext) field___Field_args_args(ctx context.Context, rawArgs 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 := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2bool) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", + func(ctx context.Context, v any) (bool, error) { + return ec.unmarshalOBoolean2bool(ctx, v) + }) if err != nil { return nil, err } @@ -1566,7 +2268,10 @@ func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, ra 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 := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2bool) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", + func(ctx context.Context, v any) (bool, error) { + return ec.unmarshalOBoolean2bool(ctx, v) + }) if err != nil { return nil, err } @@ -1576,10 +2281,6 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // endregion ***************************** args.gotpl ***************************** -// region ************************** directives.gotpl ************************** - -// endregion ************************** directives.gotpl ************************** - // region **************************** field.gotpl ***************************** func (ec *executionContext) _Activity_id(ctx context.Context, field graphql.CollectedField, obj *models.Activity) (ret graphql.Marshaler) { @@ -1587,28 +2288,22 @@ func (ec *executionContext) _Activity_id(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext_Activity_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Activity_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Activity().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Activity_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Activity", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Activity", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _Activity_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.Activity) (ret graphql.Marshaler) { @@ -1616,28 +2311,22 @@ func (ec *executionContext) _Activity_createdAt(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_Activity_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Activity_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Activity_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Activity", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Activity", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Activity_updatedAt(ctx context.Context, field graphql.CollectedField, obj *models.Activity) (ret graphql.Marshaler) { @@ -1645,28 +2334,22 @@ func (ec *executionContext) _Activity_updatedAt(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_Activity_updatedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Activity_updatedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.UpdatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Activity_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Activity", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Activity", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Activity_type(ctx context.Context, field graphql.CollectedField, obj *models.Activity) (ret graphql.Marshaler) { @@ -1674,28 +2357,22 @@ func (ec *executionContext) _Activity_type(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_Activity_type, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Activity_type(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Type, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Activity_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Activity", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Activity", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Activity_name(ctx context.Context, field graphql.CollectedField, obj *models.Activity) (ret graphql.Marshaler) { @@ -1703,28 +2380,22 @@ func (ec *executionContext) _Activity_name(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_Activity_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Activity_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Activity_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Activity", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Activity", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Activity_link(ctx context.Context, field graphql.CollectedField, obj *models.Activity) (ret graphql.Marshaler) { @@ -1732,28 +2403,22 @@ func (ec *executionContext) _Activity_link(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_Activity_link, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Activity_link(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Link, nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Activity_link(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Activity", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Activity", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _AuthPayload_user(ctx context.Context, field graphql.CollectedField, obj *model.AuthPayload) (ret graphql.Marshaler) { @@ -1761,17 +2426,20 @@ func (ec *executionContext) _AuthPayload_user(ctx context.Context, field graphql ctx, ec.OperationContext, field, - ec.fieldContext_AuthPayload_user, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_AuthPayload_user(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.User, nil }, nil, - ec.marshalNUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser, + func(ctx context.Context, selections ast.SelectionSet, v *models.User) graphql.Marshaler { + return ec.marshalNUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_AuthPayload_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AuthPayload", @@ -1779,19 +2447,7 @@ func (ec *executionContext) fieldContext_AuthPayload_user(_ context.Context, fie IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createdAt": - return ec.fieldContext_User_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_User_updatedAt(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "admin": - return ec.fieldContext_User_admin(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return ec.childFields_User(ctx, field) }, } return fc, nil @@ -1802,28 +2458,22 @@ func (ec *executionContext) _Bookmark_id(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext_Bookmark_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Bookmark_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Bookmark().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Bookmark_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Bookmark", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Bookmark", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _Bookmark_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.Bookmark) (ret graphql.Marshaler) { @@ -1831,28 +2481,22 @@ func (ec *executionContext) _Bookmark_createdAt(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_Bookmark_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Bookmark_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Bookmark_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Bookmark", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Bookmark", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Bookmark_updatedAt(ctx context.Context, field graphql.CollectedField, obj *models.Bookmark) (ret graphql.Marshaler) { @@ -1860,28 +2504,22 @@ func (ec *executionContext) _Bookmark_updatedAt(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_Bookmark_updatedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Bookmark_updatedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.UpdatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Bookmark_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Bookmark", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Bookmark", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Bookmark_category(ctx context.Context, field graphql.CollectedField, obj *models.Bookmark) (ret graphql.Marshaler) { @@ -1889,28 +2527,22 @@ func (ec *executionContext) _Bookmark_category(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext_Bookmark_category, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Bookmark_category(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Category, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Bookmark_category(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Bookmark", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Bookmark", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Bookmark_name(ctx context.Context, field graphql.CollectedField, obj *models.Bookmark) (ret graphql.Marshaler) { @@ -1918,28 +2550,22 @@ func (ec *executionContext) _Bookmark_name(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_Bookmark_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Bookmark_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Bookmark_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Bookmark", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Bookmark", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Bookmark_link(ctx context.Context, field graphql.CollectedField, obj *models.Bookmark) (ret graphql.Marshaler) { @@ -1947,28 +2573,22 @@ func (ec *executionContext) _Bookmark_link(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_Bookmark_link, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Bookmark_link(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Link, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Bookmark_link(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Bookmark", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Bookmark", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Favorite_id(ctx context.Context, field graphql.CollectedField, obj *models.Favorite) (ret graphql.Marshaler) { @@ -1976,28 +2596,22 @@ func (ec *executionContext) _Favorite_id(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext_Favorite_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Favorite_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Favorite().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Favorite_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Favorite", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Favorite", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _Favorite_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.Favorite) (ret graphql.Marshaler) { @@ -2005,28 +2619,22 @@ func (ec *executionContext) _Favorite_createdAt(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_Favorite_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Favorite_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Favorite_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Favorite", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Favorite", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Favorite_updatedAt(ctx context.Context, field graphql.CollectedField, obj *models.Favorite) (ret graphql.Marshaler) { @@ -2034,28 +2642,22 @@ func (ec *executionContext) _Favorite_updatedAt(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_Favorite_updatedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Favorite_updatedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.UpdatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Favorite_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Favorite", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Favorite", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Favorite_type(ctx context.Context, field graphql.CollectedField, obj *models.Favorite) (ret graphql.Marshaler) { @@ -2063,28 +2665,22 @@ func (ec *executionContext) _Favorite_type(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_Favorite_type, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Favorite_type(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Type, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Favorite_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Favorite", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Favorite", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Favorite_name(ctx context.Context, field graphql.CollectedField, obj *models.Favorite) (ret graphql.Marshaler) { @@ -2092,28 +2688,22 @@ func (ec *executionContext) _Favorite_name(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_Favorite_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Favorite_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Favorite_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Favorite", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Favorite", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Favorite_link(ctx context.Context, field graphql.CollectedField, obj *models.Favorite) (ret graphql.Marshaler) { @@ -2121,28 +2711,22 @@ func (ec *executionContext) _Favorite_link(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_Favorite_link, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Favorite_link(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Link, nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Favorite_link(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Favorite", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Favorite", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _GiteaFeedItem_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *model.GiteaFeedItem) (ret graphql.Marshaler) { @@ -2150,28 +2734,22 @@ func (ec *executionContext) _GiteaFeedItem_avatarUrl(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_GiteaFeedItem_avatarUrl, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_GiteaFeedItem_avatarUrl(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.AvatarURL, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_GiteaFeedItem_avatarUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "GiteaFeedItem", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("GiteaFeedItem", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _GiteaFeedItem_repoUrl(ctx context.Context, field graphql.CollectedField, obj *model.GiteaFeedItem) (ret graphql.Marshaler) { @@ -2179,28 +2757,22 @@ func (ec *executionContext) _GiteaFeedItem_repoUrl(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext_GiteaFeedItem_repoUrl, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_GiteaFeedItem_repoUrl(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.RepoURL, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_GiteaFeedItem_repoUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "GiteaFeedItem", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("GiteaFeedItem", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _GiteaFeedItem_repoName(ctx context.Context, field graphql.CollectedField, obj *model.GiteaFeedItem) (ret graphql.Marshaler) { @@ -2208,28 +2780,22 @@ func (ec *executionContext) _GiteaFeedItem_repoName(ctx context.Context, field g ctx, ec.OperationContext, field, - ec.fieldContext_GiteaFeedItem_repoName, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_GiteaFeedItem_repoName(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.RepoName, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_GiteaFeedItem_repoName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "GiteaFeedItem", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("GiteaFeedItem", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _GiteaFeedItem_opType(ctx context.Context, field graphql.CollectedField, obj *model.GiteaFeedItem) (ret graphql.Marshaler) { @@ -2237,28 +2803,22 @@ func (ec *executionContext) _GiteaFeedItem_opType(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext_GiteaFeedItem_opType, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_GiteaFeedItem_opType(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.OpType, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_GiteaFeedItem_opType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "GiteaFeedItem", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("GiteaFeedItem", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _GiteaFeedItem_commitMessage(ctx context.Context, field graphql.CollectedField, obj *model.GiteaFeedItem) (ret graphql.Marshaler) { @@ -2266,28 +2826,22 @@ func (ec *executionContext) _GiteaFeedItem_commitMessage(ctx context.Context, fi ctx, ec.OperationContext, field, - ec.fieldContext_GiteaFeedItem_commitMessage, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_GiteaFeedItem_commitMessage(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CommitMessage, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_GiteaFeedItem_commitMessage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "GiteaFeedItem", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("GiteaFeedItem", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _GiteaFeedItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.GiteaFeedItem) (ret graphql.Marshaler) { @@ -2295,28 +2849,22 @@ func (ec *executionContext) _GiteaFeedItem_createdAt(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_GiteaFeedItem_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_GiteaFeedItem_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_GiteaFeedItem_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "GiteaFeedItem", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("GiteaFeedItem", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _JobAppReference_id(ctx context.Context, field graphql.CollectedField, obj *models.JobAppReference) (ret graphql.Marshaler) { @@ -2324,28 +2872,22 @@ func (ec *executionContext) _JobAppReference_id(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_JobAppReference_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobAppReference_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.JobAppReference().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobAppReference_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobAppReference", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobAppReference", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _JobAppReference_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.JobAppReference) (ret graphql.Marshaler) { @@ -2353,28 +2895,22 @@ func (ec *executionContext) _JobAppReference_createdAt(ctx context.Context, fiel ctx, ec.OperationContext, field, - ec.fieldContext_JobAppReference_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobAppReference_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobAppReference_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobAppReference", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobAppReference", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _JobAppReference_updatedAt(ctx context.Context, field graphql.CollectedField, obj *models.JobAppReference) (ret graphql.Marshaler) { @@ -2382,28 +2918,22 @@ func (ec *executionContext) _JobAppReference_updatedAt(ctx context.Context, fiel ctx, ec.OperationContext, field, - ec.fieldContext_JobAppReference_updatedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobAppReference_updatedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.UpdatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobAppReference_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobAppReference", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobAppReference", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _JobAppReference_category(ctx context.Context, field graphql.CollectedField, obj *models.JobAppReference) (ret graphql.Marshaler) { @@ -2411,28 +2941,22 @@ func (ec *executionContext) _JobAppReference_category(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_JobAppReference_category, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobAppReference_category(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Category, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobAppReference_category(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobAppReference", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobAppReference", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobAppReference_label(ctx context.Context, field graphql.CollectedField, obj *models.JobAppReference) (ret graphql.Marshaler) { @@ -2440,28 +2964,22 @@ func (ec *executionContext) _JobAppReference_label(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext_JobAppReference_label, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobAppReference_label(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Label, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobAppReference_label(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobAppReference", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobAppReference", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobAppReference_value(ctx context.Context, field graphql.CollectedField, obj *models.JobAppReference) (ret graphql.Marshaler) { @@ -2469,28 +2987,22 @@ func (ec *executionContext) _JobAppReference_value(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext_JobAppReference_value, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobAppReference_value(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Value, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobAppReference_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobAppReference", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobAppReference", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobAppReference_sortOrder(ctx context.Context, field graphql.CollectedField, obj *models.JobAppReference) (ret graphql.Marshaler) { @@ -2498,28 +3010,22 @@ func (ec *executionContext) _JobAppReference_sortOrder(ctx context.Context, fiel ctx, ec.OperationContext, field, - ec.fieldContext_JobAppReference_sortOrder, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobAppReference_sortOrder(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.SortOrder, nil }, nil, - ec.marshalNInt2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNInt2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobAppReference_sortOrder(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobAppReference", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobAppReference", field, false, false, errors.New("field of type Int does not have child fields")) } func (ec *executionContext) _JobApplication_id(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2527,28 +3033,22 @@ func (ec *executionContext) _JobApplication_id(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.JobApplication().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobApplication_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _JobApplication_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2556,28 +3056,22 @@ func (ec *executionContext) _JobApplication_createdAt(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobApplication_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _JobApplication_updatedAt(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2585,28 +3079,22 @@ func (ec *executionContext) _JobApplication_updatedAt(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_updatedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_updatedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.UpdatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobApplication_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _JobApplication_jobTitle(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2614,28 +3102,22 @@ func (ec *executionContext) _JobApplication_jobTitle(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_jobTitle, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_jobTitle(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.JobTitle, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobApplication_jobTitle(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobApplication_company(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2643,28 +3125,22 @@ func (ec *executionContext) _JobApplication_company(ctx context.Context, field g ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_company, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_company(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Company, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobApplication_company(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobApplication_location(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2672,28 +3148,22 @@ func (ec *executionContext) _JobApplication_location(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_location, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_location(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Location, nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_JobApplication_location(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobApplication_url(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2701,28 +3171,22 @@ func (ec *executionContext) _JobApplication_url(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_url, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_url(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.URL, nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_JobApplication_url(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobApplication_status(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2730,28 +3194,22 @@ func (ec *executionContext) _JobApplication_status(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_status, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_status(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Status, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_JobApplication_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobApplication_notes(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2759,28 +3217,22 @@ func (ec *executionContext) _JobApplication_notes(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_notes, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_notes(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Notes, nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_JobApplication_notes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _JobApplication_appliedAt(ctx context.Context, field graphql.CollectedField, obj *models.JobApplication) (ret graphql.Marshaler) { @@ -2788,28 +3240,22 @@ func (ec *executionContext) _JobApplication_appliedAt(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_JobApplication_appliedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_JobApplication_appliedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.AppliedAt, nil }, nil, - ec.marshalOTime2ᚖtimeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v *time.Time) graphql.Marshaler { + return ec.marshalOTime2ᚖtimeᚐTime(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_JobApplication_appliedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "JobApplication", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("JobApplication", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Message_id(ctx context.Context, field graphql.CollectedField, obj *models.Message) (ret graphql.Marshaler) { @@ -2817,28 +3263,22 @@ func (ec *executionContext) _Message_id(ctx context.Context, field graphql.Colle ctx, ec.OperationContext, field, - ec.fieldContext_Message_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Message_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Message().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Message_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Message", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Message", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _Message_content(ctx context.Context, field graphql.CollectedField, obj *models.Message) (ret graphql.Marshaler) { @@ -2846,28 +3286,22 @@ func (ec *executionContext) _Message_content(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_Message_content, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Message_content(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Content, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Message_content(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Message", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Message", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Message_authorId(ctx context.Context, field graphql.CollectedField, obj *models.Message) (ret graphql.Marshaler) { @@ -2875,28 +3309,22 @@ func (ec *executionContext) _Message_authorId(ctx context.Context, field graphql ctx, ec.OperationContext, field, - ec.fieldContext_Message_authorId, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Message_authorId(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Message().AuthorID(ctx, obj) }, nil, - ec.marshalNInt2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNInt2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Message_authorId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Message", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Message", field, true, true, errors.New("field of type Int does not have child fields")) } func (ec *executionContext) _Message_fileUrl(ctx context.Context, field graphql.CollectedField, obj *models.Message) (ret graphql.Marshaler) { @@ -2904,28 +3332,22 @@ func (ec *executionContext) _Message_fileUrl(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_Message_fileUrl, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Message_fileUrl(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.FileURL, nil }, nil, - ec.marshalOString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalOString2string(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Message_fileUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Message", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Message", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Message_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.Message) (ret graphql.Marshaler) { @@ -2933,28 +3355,22 @@ func (ec *executionContext) _Message_createdAt(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext_Message_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Message_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Message_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Message", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Message", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Mutation_createActivity(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { @@ -2962,18 +3378,21 @@ func (ec *executionContext) _Mutation_createActivity(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_createActivity, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_createActivity(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().CreateActivity(ctx, fc.Args["input"].(model.CreateActivityInput)) }, nil, - ec.marshalNActivity2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐActivity, + func(ctx context.Context, selections ast.SelectionSet, v *models.Activity) graphql.Marshaler { + return ec.marshalNActivity2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐActivity(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_createActivity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -2981,21 +3400,7 @@ func (ec *executionContext) fieldContext_Mutation_createActivity(ctx context.Con IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Activity_id(ctx, field) - case "createdAt": - return ec.fieldContext_Activity_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Activity_updatedAt(ctx, field) - case "type": - return ec.fieldContext_Activity_type(ctx, field) - case "name": - return ec.fieldContext_Activity_name(ctx, field) - case "link": - return ec.fieldContext_Activity_link(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Activity", field.Name) + return ec.childFields_Activity(ctx, field) }, } defer func() { @@ -3017,18 +3422,21 @@ func (ec *executionContext) _Mutation_login(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_login, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_login(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().Login(ctx, fc.Args["input"].(model.LoginInput)) }, nil, - ec.marshalNAuthPayload2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐAuthPayload, + func(ctx context.Context, selections ast.SelectionSet, v *model.AuthPayload) graphql.Marshaler { + return ec.marshalNAuthPayload2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐAuthPayload(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_login(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3036,11 +3444,7 @@ func (ec *executionContext) fieldContext_Mutation_login(ctx context.Context, fie IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "user": - return ec.fieldContext_AuthPayload_user(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AuthPayload", field.Name) + return ec.childFields_AuthPayload(ctx, field) }, } defer func() { @@ -3062,28 +3466,22 @@ func (ec *executionContext) _Mutation_logout(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_logout, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_logout(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Mutation().Logout(ctx) }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_logout(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Mutation", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Mutation", field, true, true, errors.New("field of type Boolean does not have child fields")) } func (ec *executionContext) _Mutation_refreshToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { @@ -3091,17 +3489,20 @@ func (ec *executionContext) _Mutation_refreshToken(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_refreshToken, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_refreshToken(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Mutation().RefreshToken(ctx) }, nil, - ec.marshalNAuthPayload2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐAuthPayload, + func(ctx context.Context, selections ast.SelectionSet, v *model.AuthPayload) graphql.Marshaler { + return ec.marshalNAuthPayload2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐAuthPayload(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_refreshToken(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3109,11 +3510,7 @@ func (ec *executionContext) fieldContext_Mutation_refreshToken(_ context.Context IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "user": - return ec.fieldContext_AuthPayload_user(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AuthPayload", field.Name) + return ec.childFields_AuthPayload(ctx, field) }, } return fc, nil @@ -3124,18 +3521,21 @@ func (ec *executionContext) _Mutation_createBookmark(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_createBookmark, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_createBookmark(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().CreateBookmark(ctx, fc.Args["input"].(model.CreateBookmarkInput)) }, nil, - ec.marshalNBookmark2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐBookmark, + func(ctx context.Context, selections ast.SelectionSet, v *models.Bookmark) graphql.Marshaler { + return ec.marshalNBookmark2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐBookmark(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_createBookmark(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3143,21 +3543,7 @@ func (ec *executionContext) fieldContext_Mutation_createBookmark(ctx context.Con IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Bookmark_id(ctx, field) - case "createdAt": - return ec.fieldContext_Bookmark_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Bookmark_updatedAt(ctx, field) - case "category": - return ec.fieldContext_Bookmark_category(ctx, field) - case "name": - return ec.fieldContext_Bookmark_name(ctx, field) - case "link": - return ec.fieldContext_Bookmark_link(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Bookmark", field.Name) + return ec.childFields_Bookmark(ctx, field) }, } defer func() { @@ -3179,18 +3565,21 @@ func (ec *executionContext) _Mutation_deleteBookmark(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_deleteBookmark, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_deleteBookmark(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().DeleteBookmark(ctx, fc.Args["id"].(int)) }, nil, - ec.marshalNBookmark2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐBookmark, + func(ctx context.Context, selections ast.SelectionSet, v *models.Bookmark) graphql.Marshaler { + return ec.marshalNBookmark2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐBookmark(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_deleteBookmark(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3198,21 +3587,7 @@ func (ec *executionContext) fieldContext_Mutation_deleteBookmark(ctx context.Con IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Bookmark_id(ctx, field) - case "createdAt": - return ec.fieldContext_Bookmark_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Bookmark_updatedAt(ctx, field) - case "category": - return ec.fieldContext_Bookmark_category(ctx, field) - case "name": - return ec.fieldContext_Bookmark_name(ctx, field) - case "link": - return ec.fieldContext_Bookmark_link(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Bookmark", field.Name) + return ec.childFields_Bookmark(ctx, field) }, } defer func() { @@ -3234,18 +3609,21 @@ func (ec *executionContext) _Mutation_createFavorite(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_createFavorite, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_createFavorite(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().CreateFavorite(ctx, fc.Args["input"].(model.CreateFavoriteInput)) }, nil, - ec.marshalNFavorite2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐFavorite, + func(ctx context.Context, selections ast.SelectionSet, v *models.Favorite) graphql.Marshaler { + return ec.marshalNFavorite2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐFavorite(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_createFavorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3253,21 +3631,7 @@ func (ec *executionContext) fieldContext_Mutation_createFavorite(ctx context.Con IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Favorite_id(ctx, field) - case "createdAt": - return ec.fieldContext_Favorite_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Favorite_updatedAt(ctx, field) - case "type": - return ec.fieldContext_Favorite_type(ctx, field) - case "name": - return ec.fieldContext_Favorite_name(ctx, field) - case "link": - return ec.fieldContext_Favorite_link(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Favorite", field.Name) + return ec.childFields_Favorite(ctx, field) }, } defer func() { @@ -3289,18 +3653,21 @@ func (ec *executionContext) _Mutation_createJobAppReference(ctx context.Context, ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_createJobAppReference, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_createJobAppReference(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().CreateJobAppReference(ctx, fc.Args["input"].(model.CreateJobAppReferenceInput)) }, nil, - ec.marshalNJobAppReference2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobAppReference, + func(ctx context.Context, selections ast.SelectionSet, v *models.JobAppReference) graphql.Marshaler { + return ec.marshalNJobAppReference2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobAppReference(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_createJobAppReference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3308,23 +3675,7 @@ func (ec *executionContext) fieldContext_Mutation_createJobAppReference(ctx cont IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_JobAppReference_id(ctx, field) - case "createdAt": - return ec.fieldContext_JobAppReference_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_JobAppReference_updatedAt(ctx, field) - case "category": - return ec.fieldContext_JobAppReference_category(ctx, field) - case "label": - return ec.fieldContext_JobAppReference_label(ctx, field) - case "value": - return ec.fieldContext_JobAppReference_value(ctx, field) - case "sortOrder": - return ec.fieldContext_JobAppReference_sortOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type JobAppReference", field.Name) + return ec.childFields_JobAppReference(ctx, field) }, } defer func() { @@ -3346,18 +3697,21 @@ func (ec *executionContext) _Mutation_updateJobAppReference(ctx context.Context, ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_updateJobAppReference, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_updateJobAppReference(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().UpdateJobAppReference(ctx, fc.Args["id"].(int), fc.Args["input"].(model.UpdateJobAppReferenceInput)) }, nil, - ec.marshalNJobAppReference2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobAppReference, + func(ctx context.Context, selections ast.SelectionSet, v *models.JobAppReference) graphql.Marshaler { + return ec.marshalNJobAppReference2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobAppReference(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_updateJobAppReference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3365,23 +3719,7 @@ func (ec *executionContext) fieldContext_Mutation_updateJobAppReference(ctx cont IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_JobAppReference_id(ctx, field) - case "createdAt": - return ec.fieldContext_JobAppReference_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_JobAppReference_updatedAt(ctx, field) - case "category": - return ec.fieldContext_JobAppReference_category(ctx, field) - case "label": - return ec.fieldContext_JobAppReference_label(ctx, field) - case "value": - return ec.fieldContext_JobAppReference_value(ctx, field) - case "sortOrder": - return ec.fieldContext_JobAppReference_sortOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type JobAppReference", field.Name) + return ec.childFields_JobAppReference(ctx, field) }, } defer func() { @@ -3403,18 +3741,21 @@ func (ec *executionContext) _Mutation_deleteJobAppReference(ctx context.Context, ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_deleteJobAppReference, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_deleteJobAppReference(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().DeleteJobAppReference(ctx, fc.Args["id"].(int)) }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_deleteJobAppReference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3444,18 +3785,21 @@ func (ec *executionContext) _Mutation_createJobApplication(ctx context.Context, ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_createJobApplication, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_createJobApplication(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().CreateJobApplication(ctx, fc.Args["input"].(model.CreateJobApplicationInput)) }, nil, - ec.marshalNJobApplication2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplication, + func(ctx context.Context, selections ast.SelectionSet, v *models.JobApplication) graphql.Marshaler { + return ec.marshalNJobApplication2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplication(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_createJobApplication(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3463,29 +3807,7 @@ func (ec *executionContext) fieldContext_Mutation_createJobApplication(ctx conte IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_JobApplication_id(ctx, field) - case "createdAt": - return ec.fieldContext_JobApplication_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_JobApplication_updatedAt(ctx, field) - case "jobTitle": - return ec.fieldContext_JobApplication_jobTitle(ctx, field) - case "company": - return ec.fieldContext_JobApplication_company(ctx, field) - case "location": - return ec.fieldContext_JobApplication_location(ctx, field) - case "url": - return ec.fieldContext_JobApplication_url(ctx, field) - case "status": - return ec.fieldContext_JobApplication_status(ctx, field) - case "notes": - return ec.fieldContext_JobApplication_notes(ctx, field) - case "appliedAt": - return ec.fieldContext_JobApplication_appliedAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type JobApplication", field.Name) + return ec.childFields_JobApplication(ctx, field) }, } defer func() { @@ -3507,18 +3829,21 @@ func (ec *executionContext) _Mutation_updateJobApplication(ctx context.Context, ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_updateJobApplication, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_updateJobApplication(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().UpdateJobApplication(ctx, fc.Args["id"].(int), fc.Args["input"].(model.UpdateJobApplicationInput)) }, nil, - ec.marshalNJobApplication2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplication, + func(ctx context.Context, selections ast.SelectionSet, v *models.JobApplication) graphql.Marshaler { + return ec.marshalNJobApplication2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplication(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_updateJobApplication(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3526,29 +3851,7 @@ func (ec *executionContext) fieldContext_Mutation_updateJobApplication(ctx conte IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_JobApplication_id(ctx, field) - case "createdAt": - return ec.fieldContext_JobApplication_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_JobApplication_updatedAt(ctx, field) - case "jobTitle": - return ec.fieldContext_JobApplication_jobTitle(ctx, field) - case "company": - return ec.fieldContext_JobApplication_company(ctx, field) - case "location": - return ec.fieldContext_JobApplication_location(ctx, field) - case "url": - return ec.fieldContext_JobApplication_url(ctx, field) - case "status": - return ec.fieldContext_JobApplication_status(ctx, field) - case "notes": - return ec.fieldContext_JobApplication_notes(ctx, field) - case "appliedAt": - return ec.fieldContext_JobApplication_appliedAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type JobApplication", field.Name) + return ec.childFields_JobApplication(ctx, field) }, } defer func() { @@ -3570,18 +3873,21 @@ func (ec *executionContext) _Mutation_deleteJobApplication(ctx context.Context, ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_deleteJobApplication, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_deleteJobApplication(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().DeleteJobApplication(ctx, fc.Args["id"].(int)) }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_deleteJobApplication(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3606,23 +3912,158 @@ func (ec *executionContext) fieldContext_Mutation_deleteJobApplication(ctx conte return fc, nil } +func (ec *executionContext) _Mutation_createPlace(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_createPlace(ctx, field) + }, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Mutation().CreatePlace(ctx, fc.Args["input"].(model.CreatePlaceInput)) + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *models.Place) graphql.Marshaler { + return ec.marshalNPlace2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPlace(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Mutation_createPlace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_Place(ctx, field) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createPlace_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_updatePlace(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_updatePlace(ctx, field) + }, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Mutation().UpdatePlace(ctx, fc.Args["id"].(int), fc.Args["input"].(model.UpdatePlaceInput)) + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *models.Place) graphql.Marshaler { + return ec.marshalNPlace2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPlace(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Mutation_updatePlace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_Place(ctx, field) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_updatePlace_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_deletePlace(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_deletePlace(ctx, field) + }, + func(ctx context.Context) (any, error) { + fc := graphql.GetFieldContext(ctx) + return ec.Resolvers.Mutation().DeletePlace(ctx, fc.Args["id"].(int)) + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *models.Place) graphql.Marshaler { + return ec.marshalNPlace2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPlace(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Mutation_deletePlace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_Place(ctx, field) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_deletePlace_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Mutation_createPost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_createPost, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_createPost(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().CreatePost(ctx, fc.Args["input"].(model.CreatePostInput)) }, nil, - ec.marshalNPost2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost, + func(ctx context.Context, selections ast.SelectionSet, v *models.Post) graphql.Marshaler { + return ec.marshalNPost2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_createPost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3630,21 +4071,7 @@ func (ec *executionContext) fieldContext_Mutation_createPost(ctx context.Context IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Post_id(ctx, field) - case "createdAt": - return ec.fieldContext_Post_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Post_updatedAt(ctx, field) - case "title": - return ec.fieldContext_Post_title(ctx, field) - case "author": - return ec.fieldContext_Post_author(ctx, field) - case "content": - return ec.fieldContext_Post_content(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Post", field.Name) + return ec.childFields_Post(ctx, field) }, } defer func() { @@ -3666,18 +4093,21 @@ func (ec *executionContext) _Mutation_updatePost(ctx context.Context, field grap ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_updatePost, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_updatePost(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().UpdatePost(ctx, fc.Args["id"].(int), fc.Args["input"].(model.UpdatePostInput)) }, nil, - ec.marshalNPost2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost, + func(ctx context.Context, selections ast.SelectionSet, v *models.Post) graphql.Marshaler { + return ec.marshalNPost2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_updatePost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3685,21 +4115,7 @@ func (ec *executionContext) fieldContext_Mutation_updatePost(ctx context.Context IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Post_id(ctx, field) - case "createdAt": - return ec.fieldContext_Post_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Post_updatedAt(ctx, field) - case "title": - return ec.fieldContext_Post_title(ctx, field) - case "author": - return ec.fieldContext_Post_author(ctx, field) - case "content": - return ec.fieldContext_Post_content(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Post", field.Name) + return ec.childFields_Post(ctx, field) }, } defer func() { @@ -3721,18 +4137,21 @@ func (ec *executionContext) _Mutation_deletePost(ctx context.Context, field grap ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_deletePost, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_deletePost(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().DeletePost(ctx, fc.Args["id"].(int)) }, nil, - ec.marshalNPost2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost, + func(ctx context.Context, selections ast.SelectionSet, v *models.Post) graphql.Marshaler { + return ec.marshalNPost2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_deletePost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3740,21 +4159,7 @@ func (ec *executionContext) fieldContext_Mutation_deletePost(ctx context.Context IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Post_id(ctx, field) - case "createdAt": - return ec.fieldContext_Post_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Post_updatedAt(ctx, field) - case "title": - return ec.fieldContext_Post_title(ctx, field) - case "author": - return ec.fieldContext_Post_author(ctx, field) - case "content": - return ec.fieldContext_Post_content(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Post", field.Name) + return ec.childFields_Post(ctx, field) }, } defer func() { @@ -3776,18 +4181,21 @@ func (ec *executionContext) _Mutation_createUser(ctx context.Context, field grap ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_createUser, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_createUser(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().CreateUser(ctx, fc.Args["input"].(model.CreateUserInput)) }, nil, - ec.marshalNUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser, + func(ctx context.Context, selections ast.SelectionSet, v *models.User) graphql.Marshaler { + return ec.marshalNUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_createUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3795,19 +4203,7 @@ func (ec *executionContext) fieldContext_Mutation_createUser(ctx context.Context IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createdAt": - return ec.fieldContext_User_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_User_updatedAt(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "admin": - return ec.fieldContext_User_admin(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return ec.childFields_User(ctx, field) }, } defer func() { @@ -3829,18 +4225,21 @@ func (ec *executionContext) _Mutation_deleteUser(ctx context.Context, field grap ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_deleteUser, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_deleteUser(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().DeleteUser(ctx, fc.Args["id"].(int)) }, nil, - ec.marshalNUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser, + func(ctx context.Context, selections ast.SelectionSet, v *models.User) graphql.Marshaler { + return ec.marshalNUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_deleteUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3848,19 +4247,7 @@ func (ec *executionContext) fieldContext_Mutation_deleteUser(ctx context.Context IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createdAt": - return ec.fieldContext_User_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_User_updatedAt(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "admin": - return ec.fieldContext_User_admin(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return ec.childFields_User(ctx, field) }, } defer func() { @@ -3882,18 +4269,21 @@ func (ec *executionContext) _Mutation_setUserAdmin(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext_Mutation_setUserAdmin, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Mutation_setUserAdmin(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Mutation().SetUserAdmin(ctx, fc.Args["id"].(int), fc.Args["admin"].(bool)) }, nil, - ec.marshalNUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser, + func(ctx context.Context, selections ast.SelectionSet, v *models.User) graphql.Marshaler { + return ec.marshalNUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Mutation_setUserAdmin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", @@ -3901,19 +4291,7 @@ func (ec *executionContext) fieldContext_Mutation_setUserAdmin(ctx context.Conte IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createdAt": - return ec.fieldContext_User_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_User_updatedAt(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "admin": - return ec.fieldContext_User_admin(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return ec.childFields_User(ctx, field) }, } defer func() { @@ -3930,33 +4308,280 @@ func (ec *executionContext) fieldContext_Mutation_setUserAdmin(ctx context.Conte return fc, nil } +func (ec *executionContext) _Place_id(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_id(ctx, field) + }, + func(ctx context.Context) (any, error) { + return ec.Resolvers.Place().ID(ctx, obj) + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Place_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, true, true, errors.New("field of type ID does not have child fields")) +} + +func (ec *executionContext) _Place_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_createdAt(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.CreatedAt, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Place_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type Time does not have child fields")) +} + +func (ec *executionContext) _Place_updatedAt(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_updatedAt(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.UpdatedAt, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Place_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type Time does not have child fields")) +} + +func (ec *executionContext) _Place_title(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_title(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.Title, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Place_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _Place_location(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_location(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.Location, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, + true, + false, + ) +} +func (ec *executionContext) fieldContext_Place_location(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _Place_notes(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_notes(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.Notes, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, + true, + false, + ) +} +func (ec *executionContext) fieldContext_Place_notes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _Place_imageUrl(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_imageUrl(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.ImageURL, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, + true, + false, + ) +} +func (ec *executionContext) fieldContext_Place_imageUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _Place_category(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_category(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.Category, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, + true, + false, + ) +} +func (ec *executionContext) fieldContext_Place_category(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _Place_cost(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_cost(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.Cost, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, + true, + false, + ) +} +func (ec *executionContext) fieldContext_Place_cost(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _Place_priority(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_priority(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.Priority, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNInt2int(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Place_priority(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type Int does not have child fields")) +} + +func (ec *executionContext) _Place_done(ctx context.Context, field graphql.CollectedField, obj *models.Place) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Place_done(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.Done, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Place_done(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("Place", field, false, false, errors.New("field of type Boolean does not have child fields")) +} + func (ec *executionContext) _Post_id(ctx context.Context, field graphql.CollectedField, obj *models.Post) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, - ec.fieldContext_Post_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Post_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Post().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Post_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Post", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Post", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _Post_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.Post) (ret graphql.Marshaler) { @@ -3964,28 +4589,22 @@ func (ec *executionContext) _Post_createdAt(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext_Post_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Post_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Post_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Post", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Post", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Post_updatedAt(ctx context.Context, field graphql.CollectedField, obj *models.Post) (ret graphql.Marshaler) { @@ -3993,28 +4612,22 @@ func (ec *executionContext) _Post_updatedAt(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext_Post_updatedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Post_updatedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.UpdatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Post_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Post", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Post", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Post_title(ctx context.Context, field graphql.CollectedField, obj *models.Post) (ret graphql.Marshaler) { @@ -4022,28 +4635,22 @@ func (ec *executionContext) _Post_title(ctx context.Context, field graphql.Colle ctx, ec.OperationContext, field, - ec.fieldContext_Post_title, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Post_title(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Title, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Post_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Post", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Post", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Post_author(ctx context.Context, field graphql.CollectedField, obj *models.Post) (ret graphql.Marshaler) { @@ -4051,17 +4658,20 @@ func (ec *executionContext) _Post_author(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext_Post_author, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Post_author(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Author, nil }, nil, - ec.marshalOUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser, + func(ctx context.Context, selections ast.SelectionSet, v *models.User) graphql.Marshaler { + return ec.marshalOUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Post_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Post", @@ -4069,19 +4679,7 @@ func (ec *executionContext) fieldContext_Post_author(_ context.Context, field gr IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createdAt": - return ec.fieldContext_User_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_User_updatedAt(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "admin": - return ec.fieldContext_User_admin(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return ec.childFields_User(ctx, field) }, } return fc, nil @@ -4092,28 +4690,22 @@ func (ec *executionContext) _Post_content(ctx context.Context, field graphql.Col ctx, ec.OperationContext, field, - ec.fieldContext_Post_content, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Post_content(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Content, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Post_content(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Post", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Post", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _Query_activities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { @@ -4121,17 +4713,20 @@ func (ec *executionContext) _Query_activities(ctx context.Context, field graphql ctx, ec.OperationContext, field, - ec.fieldContext_Query_activities, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_activities(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().Activities(ctx) }, nil, - ec.marshalNActivity2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐActivityᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.Activity) graphql.Marshaler { + return ec.marshalNActivity2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐActivityᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_activities(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4139,21 +4734,7 @@ func (ec *executionContext) fieldContext_Query_activities(_ context.Context, fie IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Activity_id(ctx, field) - case "createdAt": - return ec.fieldContext_Activity_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Activity_updatedAt(ctx, field) - case "type": - return ec.fieldContext_Activity_type(ctx, field) - case "name": - return ec.fieldContext_Activity_name(ctx, field) - case "link": - return ec.fieldContext_Activity_link(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Activity", field.Name) + return ec.childFields_Activity(ctx, field) }, } return fc, nil @@ -4164,17 +4745,20 @@ func (ec *executionContext) _Query_me(ctx context.Context, field graphql.Collect ctx, ec.OperationContext, field, - ec.fieldContext_Query_me, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_me(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().Me(ctx) }, nil, - ec.marshalOUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser, + func(ctx context.Context, selections ast.SelectionSet, v *models.User) graphql.Marshaler { + return ec.marshalOUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query_me(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4182,19 +4766,7 @@ func (ec *executionContext) fieldContext_Query_me(_ context.Context, field graph IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createdAt": - return ec.fieldContext_User_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_User_updatedAt(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "admin": - return ec.fieldContext_User_admin(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return ec.childFields_User(ctx, field) }, } return fc, nil @@ -4205,17 +4777,20 @@ func (ec *executionContext) _Query_bookmarks(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_Query_bookmarks, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_bookmarks(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().Bookmarks(ctx) }, nil, - ec.marshalNBookmark2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐBookmarkᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.Bookmark) graphql.Marshaler { + return ec.marshalNBookmark2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐBookmarkᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_bookmarks(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4223,21 +4798,7 @@ func (ec *executionContext) fieldContext_Query_bookmarks(_ context.Context, fiel IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Bookmark_id(ctx, field) - case "createdAt": - return ec.fieldContext_Bookmark_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Bookmark_updatedAt(ctx, field) - case "category": - return ec.fieldContext_Bookmark_category(ctx, field) - case "name": - return ec.fieldContext_Bookmark_name(ctx, field) - case "link": - return ec.fieldContext_Bookmark_link(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Bookmark", field.Name) + return ec.childFields_Bookmark(ctx, field) }, } return fc, nil @@ -4248,17 +4809,20 @@ func (ec *executionContext) _Query_favorites(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_Query_favorites, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_favorites(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().Favorites(ctx) }, nil, - ec.marshalNFavorite2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐFavoriteᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.Favorite) graphql.Marshaler { + return ec.marshalNFavorite2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐFavoriteᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_favorites(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4266,21 +4830,7 @@ func (ec *executionContext) fieldContext_Query_favorites(_ context.Context, fiel IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Favorite_id(ctx, field) - case "createdAt": - return ec.fieldContext_Favorite_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Favorite_updatedAt(ctx, field) - case "type": - return ec.fieldContext_Favorite_type(ctx, field) - case "name": - return ec.fieldContext_Favorite_name(ctx, field) - case "link": - return ec.fieldContext_Favorite_link(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Favorite", field.Name) + return ec.childFields_Favorite(ctx, field) }, } return fc, nil @@ -4291,17 +4841,20 @@ func (ec *executionContext) _Query_giteaFeed(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_Query_giteaFeed, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_giteaFeed(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().GiteaFeed(ctx) }, nil, - ec.marshalOGiteaFeedItem2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐGiteaFeedItem, + func(ctx context.Context, selections ast.SelectionSet, v *model.GiteaFeedItem) graphql.Marshaler { + return ec.marshalOGiteaFeedItem2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐGiteaFeedItem(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query_giteaFeed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4309,21 +4862,7 @@ func (ec *executionContext) fieldContext_Query_giteaFeed(_ context.Context, fiel IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "avatarUrl": - return ec.fieldContext_GiteaFeedItem_avatarUrl(ctx, field) - case "repoUrl": - return ec.fieldContext_GiteaFeedItem_repoUrl(ctx, field) - case "repoName": - return ec.fieldContext_GiteaFeedItem_repoName(ctx, field) - case "opType": - return ec.fieldContext_GiteaFeedItem_opType(ctx, field) - case "commitMessage": - return ec.fieldContext_GiteaFeedItem_commitMessage(ctx, field) - case "createdAt": - return ec.fieldContext_GiteaFeedItem_createdAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type GiteaFeedItem", field.Name) + return ec.childFields_GiteaFeedItem(ctx, field) }, } return fc, nil @@ -4334,17 +4873,20 @@ func (ec *executionContext) _Query_jobAppReferences(ctx context.Context, field g ctx, ec.OperationContext, field, - ec.fieldContext_Query_jobAppReferences, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_jobAppReferences(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().JobAppReferences(ctx) }, nil, - ec.marshalNJobAppReference2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobAppReferenceᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.JobAppReference) graphql.Marshaler { + return ec.marshalNJobAppReference2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobAppReferenceᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_jobAppReferences(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4352,23 +4894,7 @@ func (ec *executionContext) fieldContext_Query_jobAppReferences(_ context.Contex IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_JobAppReference_id(ctx, field) - case "createdAt": - return ec.fieldContext_JobAppReference_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_JobAppReference_updatedAt(ctx, field) - case "category": - return ec.fieldContext_JobAppReference_category(ctx, field) - case "label": - return ec.fieldContext_JobAppReference_label(ctx, field) - case "value": - return ec.fieldContext_JobAppReference_value(ctx, field) - case "sortOrder": - return ec.fieldContext_JobAppReference_sortOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type JobAppReference", field.Name) + return ec.childFields_JobAppReference(ctx, field) }, } return fc, nil @@ -4379,17 +4905,20 @@ func (ec *executionContext) _Query_jobApplications(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext_Query_jobApplications, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_jobApplications(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().JobApplications(ctx) }, nil, - ec.marshalNJobApplication2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplicationᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.JobApplication) graphql.Marshaler { + return ec.marshalNJobApplication2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplicationᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_jobApplications(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4397,29 +4926,7 @@ func (ec *executionContext) fieldContext_Query_jobApplications(_ context.Context IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_JobApplication_id(ctx, field) - case "createdAt": - return ec.fieldContext_JobApplication_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_JobApplication_updatedAt(ctx, field) - case "jobTitle": - return ec.fieldContext_JobApplication_jobTitle(ctx, field) - case "company": - return ec.fieldContext_JobApplication_company(ctx, field) - case "location": - return ec.fieldContext_JobApplication_location(ctx, field) - case "url": - return ec.fieldContext_JobApplication_url(ctx, field) - case "status": - return ec.fieldContext_JobApplication_status(ctx, field) - case "notes": - return ec.fieldContext_JobApplication_notes(ctx, field) - case "appliedAt": - return ec.fieldContext_JobApplication_appliedAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type JobApplication", field.Name) + return ec.childFields_JobApplication(ctx, field) }, } return fc, nil @@ -4430,18 +4937,21 @@ func (ec *executionContext) _Query_jobApplication(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext_Query_jobApplication, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_jobApplication(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Query().JobApplication(ctx, fc.Args["id"].(int)) }, nil, - ec.marshalOJobApplication2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplication, + func(ctx context.Context, selections ast.SelectionSet, v *models.JobApplication) graphql.Marshaler { + return ec.marshalOJobApplication2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplication(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query_jobApplication(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4449,29 +4959,7 @@ func (ec *executionContext) fieldContext_Query_jobApplication(ctx context.Contex IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_JobApplication_id(ctx, field) - case "createdAt": - return ec.fieldContext_JobApplication_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_JobApplication_updatedAt(ctx, field) - case "jobTitle": - return ec.fieldContext_JobApplication_jobTitle(ctx, field) - case "company": - return ec.fieldContext_JobApplication_company(ctx, field) - case "location": - return ec.fieldContext_JobApplication_location(ctx, field) - case "url": - return ec.fieldContext_JobApplication_url(ctx, field) - case "status": - return ec.fieldContext_JobApplication_status(ctx, field) - case "notes": - return ec.fieldContext_JobApplication_notes(ctx, field) - case "appliedAt": - return ec.fieldContext_JobApplication_appliedAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type JobApplication", field.Name) + return ec.childFields_JobApplication(ctx, field) }, } defer func() { @@ -4493,17 +4981,20 @@ func (ec *executionContext) _Query_messages(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext_Query_messages, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_messages(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().Messages(ctx) }, nil, - ec.marshalNMessage2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐMessageᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.Message) graphql.Marshaler { + return ec.marshalNMessage2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐMessageᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_messages(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4511,19 +5002,39 @@ func (ec *executionContext) fieldContext_Query_messages(_ context.Context, field IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Message_id(ctx, field) - case "content": - return ec.fieldContext_Message_content(ctx, field) - case "authorId": - return ec.fieldContext_Message_authorId(ctx, field) - case "fileUrl": - return ec.fieldContext_Message_fileUrl(ctx, field) - case "createdAt": - return ec.fieldContext_Message_createdAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Message", field.Name) + return ec.childFields_Message(ctx, field) + }, + } + return fc, nil +} + +func (ec *executionContext) _Query_places(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_places(ctx, field) + }, + func(ctx context.Context) (any, error) { + return ec.Resolvers.Query().Places(ctx) + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v []*models.Place) graphql.Marshaler { + return ec.marshalNPlace2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPlaceᚄ(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_Query_places(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_Place(ctx, field) }, } return fc, nil @@ -4534,17 +5045,20 @@ func (ec *executionContext) _Query_posts(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext_Query_posts, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_posts(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().Posts(ctx) }, nil, - ec.marshalNPost2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPostᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.Post) graphql.Marshaler { + return ec.marshalNPost2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPostᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_posts(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4552,21 +5066,7 @@ func (ec *executionContext) fieldContext_Query_posts(_ context.Context, field gr IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Post_id(ctx, field) - case "createdAt": - return ec.fieldContext_Post_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Post_updatedAt(ctx, field) - case "title": - return ec.fieldContext_Post_title(ctx, field) - case "author": - return ec.fieldContext_Post_author(ctx, field) - case "content": - return ec.fieldContext_Post_content(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Post", field.Name) + return ec.childFields_Post(ctx, field) }, } return fc, nil @@ -4577,18 +5077,21 @@ func (ec *executionContext) _Query_post(ctx context.Context, field graphql.Colle ctx, ec.OperationContext, field, - ec.fieldContext_Query_post, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_post(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Query().Post(ctx, fc.Args["id"].(int)) }, nil, - ec.marshalOPost2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost, + func(ctx context.Context, selections ast.SelectionSet, v *models.Post) graphql.Marshaler { + return ec.marshalOPost2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query_post(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4596,21 +5099,7 @@ func (ec *executionContext) fieldContext_Query_post(ctx context.Context, field g IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Post_id(ctx, field) - case "createdAt": - return ec.fieldContext_Post_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_Post_updatedAt(ctx, field) - case "title": - return ec.fieldContext_Post_title(ctx, field) - case "author": - return ec.fieldContext_Post_author(ctx, field) - case "content": - return ec.fieldContext_Post_content(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Post", field.Name) + return ec.childFields_Post(ctx, field) }, } defer func() { @@ -4632,17 +5121,20 @@ func (ec *executionContext) _Query_rowingSessions(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext_Query_rowingSessions, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_rowingSessions(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().RowingSessions(ctx) }, nil, - ec.marshalNRowing2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐRowingᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.Rowing) graphql.Marshaler { + return ec.marshalNRowing2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐRowingᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_rowingSessions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4650,23 +5142,7 @@ func (ec *executionContext) fieldContext_Query_rowingSessions(_ context.Context, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Rowing_id(ctx, field) - case "createdAt": - return ec.fieldContext_Rowing_createdAt(ctx, field) - case "date": - return ec.fieldContext_Rowing_date(ctx, field) - case "time": - return ec.fieldContext_Rowing_time(ctx, field) - case "distance": - return ec.fieldContext_Rowing_distance(ctx, field) - case "timePer500m": - return ec.fieldContext_Rowing_timePer500m(ctx, field) - case "calories": - return ec.fieldContext_Rowing_calories(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Rowing", field.Name) + return ec.childFields_Rowing(ctx, field) }, } return fc, nil @@ -4677,17 +5153,20 @@ func (ec *executionContext) _Query_spotifyListening(ctx context.Context, field g ctx, ec.OperationContext, field, - ec.fieldContext_Query_spotifyListening, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_spotifyListening(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().SpotifyListening(ctx) }, nil, - ec.marshalOSpotifyPlaying2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyPlaying, + func(ctx context.Context, selections ast.SelectionSet, v *model.SpotifyPlaying) graphql.Marshaler { + return ec.marshalOSpotifyPlaying2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyPlaying(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query_spotifyListening(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4695,13 +5174,7 @@ func (ec *executionContext) fieldContext_Query_spotifyListening(_ context.Contex IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "playing": - return ec.fieldContext_SpotifyPlaying_playing(ctx, field) - case "track": - return ec.fieldContext_SpotifyPlaying_track(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SpotifyPlaying", field.Name) + return ec.childFields_SpotifyPlaying(ctx, field) }, } return fc, nil @@ -4712,17 +5185,20 @@ func (ec *executionContext) _Query_spotifyRecent(ctx context.Context, field grap ctx, ec.OperationContext, field, - ec.fieldContext_Query_spotifyRecent, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_spotifyRecent(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().SpotifyRecent(ctx) }, nil, - ec.marshalOSpotifyRecentItem2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyRecentItemᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*model.SpotifyRecentItem) graphql.Marshaler { + return ec.marshalOSpotifyRecentItem2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyRecentItemᚄ(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query_spotifyRecent(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4730,13 +5206,7 @@ func (ec *executionContext) fieldContext_Query_spotifyRecent(_ context.Context, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "track": - return ec.fieldContext_SpotifyRecentItem_track(ctx, field) - case "playedAt": - return ec.fieldContext_SpotifyRecentItem_playedAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SpotifyRecentItem", field.Name) + return ec.childFields_SpotifyRecentItem(ctx, field) }, } return fc, nil @@ -4747,17 +5217,20 @@ func (ec *executionContext) _Query_steamStatus(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext_Query_steamStatus, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_steamStatus(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().SteamStatus(ctx) }, nil, - ec.marshalOSteamStatus2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSteamStatus, + func(ctx context.Context, selections ast.SelectionSet, v *model.SteamStatus) graphql.Marshaler { + return ec.marshalOSteamStatus2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSteamStatus(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query_steamStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4765,13 +5238,7 @@ func (ec *executionContext) fieldContext_Query_steamStatus(_ context.Context, fi IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "online": - return ec.fieldContext_SteamStatus_online(ctx, field) - case "recentGames": - return ec.fieldContext_SteamStatus_recentGames(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SteamStatus", field.Name) + return ec.childFields_SteamStatus(ctx, field) }, } return fc, nil @@ -4782,17 +5249,20 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext_Query_users, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_users(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Query().Users(ctx) }, nil, - ec.marshalNUser2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUserᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*models.User) graphql.Marshaler { + return ec.marshalNUser2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUserᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Query_users(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4800,19 +5270,7 @@ func (ec *executionContext) fieldContext_Query_users(_ context.Context, field gr IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createdAt": - return ec.fieldContext_User_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_User_updatedAt(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "admin": - return ec.fieldContext_User_admin(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return ec.childFields_User(ctx, field) }, } return fc, nil @@ -4823,18 +5281,21 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle ctx, ec.OperationContext, field, - ec.fieldContext_Query_user, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query_user(ctx, field) + }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) return ec.Resolvers.Query().User(ctx, fc.Args["id"].(int)) }, nil, - ec.marshalOUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser, + func(ctx context.Context, selections ast.SelectionSet, v *models.User) graphql.Marshaler { + return ec.marshalOUser2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4842,19 +5303,7 @@ func (ec *executionContext) fieldContext_Query_user(ctx context.Context, field g IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createdAt": - return ec.fieldContext_User_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_User_updatedAt(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "admin": - return ec.fieldContext_User_admin(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return ec.childFields_User(ctx, field) }, } defer func() { @@ -4876,18 +5325,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col ctx, ec.OperationContext, field, - ec.fieldContext_Query___type, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query___type(ctx, field) + }, 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, + func(ctx context.Context, selections ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4895,31 +5347,7 @@ func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } defer func() { @@ -4941,17 +5369,20 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext_Query___schema, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Query___schema(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.IntrospectSchema() }, nil, - ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema, + func(ctx context.Context, selections ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", @@ -4959,21 +5390,7 @@ func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "description": - return ec.fieldContext___Schema_description(ctx, field) - case "types": - return ec.fieldContext___Schema_types(ctx, field) - case "queryType": - return ec.fieldContext___Schema_queryType(ctx, field) - case "mutationType": - return ec.fieldContext___Schema_mutationType(ctx, field) - case "subscriptionType": - return ec.fieldContext___Schema_subscriptionType(ctx, field) - case "directives": - return ec.fieldContext___Schema_directives(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + return ec.childFields___Schema(ctx, field) }, } return fc, nil @@ -4984,28 +5401,22 @@ func (ec *executionContext) _Rowing_id(ctx context.Context, field graphql.Collec ctx, ec.OperationContext, field, - ec.fieldContext_Rowing_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Rowing_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Rowing().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Rowing_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Rowing", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Rowing", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _Rowing_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.Rowing) (ret graphql.Marshaler) { @@ -5013,28 +5424,22 @@ func (ec *executionContext) _Rowing_createdAt(ctx context.Context, field graphql ctx, ec.OperationContext, field, - ec.fieldContext_Rowing_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Rowing_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Rowing_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Rowing", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Rowing", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Rowing_date(ctx context.Context, field graphql.CollectedField, obj *models.Rowing) (ret graphql.Marshaler) { @@ -5042,28 +5447,22 @@ func (ec *executionContext) _Rowing_date(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext_Rowing_date, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Rowing_date(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Date, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Rowing_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Rowing", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Rowing", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _Rowing_time(ctx context.Context, field graphql.CollectedField, obj *models.Rowing) (ret graphql.Marshaler) { @@ -5071,28 +5470,22 @@ func (ec *executionContext) _Rowing_time(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext_Rowing_time, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Rowing_time(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Rowing().Time(ctx, obj) }, nil, - ec.marshalNInt2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNInt2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Rowing_time(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Rowing", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Rowing", field, true, true, errors.New("field of type Int does not have child fields")) } func (ec *executionContext) _Rowing_distance(ctx context.Context, field graphql.CollectedField, obj *models.Rowing) (ret graphql.Marshaler) { @@ -5100,28 +5493,22 @@ func (ec *executionContext) _Rowing_distance(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_Rowing_distance, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Rowing_distance(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.Rowing().Distance(ctx, obj) }, nil, - ec.marshalNInt2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNInt2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Rowing_distance(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Rowing", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Rowing", field, true, true, errors.New("field of type Int does not have child fields")) } func (ec *executionContext) _Rowing_timePer500m(ctx context.Context, field graphql.CollectedField, obj *models.Rowing) (ret graphql.Marshaler) { @@ -5129,28 +5516,22 @@ func (ec *executionContext) _Rowing_timePer500m(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_Rowing_timePer500m, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Rowing_timePer500m(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.TimePer500m, nil }, nil, - ec.marshalNFloat2float64, + func(ctx context.Context, selections ast.SelectionSet, v float64) graphql.Marshaler { + return ec.marshalNFloat2float64(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Rowing_timePer500m(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Rowing", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Rowing", field, false, false, errors.New("field of type Float does not have child fields")) } func (ec *executionContext) _Rowing_calories(ctx context.Context, field graphql.CollectedField, obj *models.Rowing) (ret graphql.Marshaler) { @@ -5158,28 +5539,22 @@ func (ec *executionContext) _Rowing_calories(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_Rowing_calories, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_Rowing_calories(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Calories, nil }, nil, - ec.marshalNFloat2float64, + func(ctx context.Context, selections ast.SelectionSet, v float64) graphql.Marshaler { + return ec.marshalNFloat2float64(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_Rowing_calories(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Rowing", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("Rowing", field, false, false, errors.New("field of type Float does not have child fields")) } func (ec *executionContext) _SpotifyAlbum_name(ctx context.Context, field graphql.CollectedField, obj *model.SpotifyAlbum) (ret graphql.Marshaler) { @@ -5187,28 +5562,22 @@ func (ec *executionContext) _SpotifyAlbum_name(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyAlbum_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyAlbum_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyAlbum_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SpotifyAlbum", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SpotifyAlbum", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _SpotifyAlbum_images(ctx context.Context, field graphql.CollectedField, obj *model.SpotifyAlbum) (ret graphql.Marshaler) { @@ -5216,17 +5585,20 @@ func (ec *executionContext) _SpotifyAlbum_images(ctx context.Context, field grap ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyAlbum_images, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyAlbum_images(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Images, nil }, nil, - ec.marshalNSpotifyImage2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyImageᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*model.SpotifyImage) graphql.Marshaler { + return ec.marshalNSpotifyImage2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyImageᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyAlbum_images(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SpotifyAlbum", @@ -5234,11 +5606,7 @@ func (ec *executionContext) fieldContext_SpotifyAlbum_images(_ context.Context, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "url": - return ec.fieldContext_SpotifyImage_url(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SpotifyImage", field.Name) + return ec.childFields_SpotifyImage(ctx, field) }, } return fc, nil @@ -5249,28 +5617,22 @@ func (ec *executionContext) _SpotifyArtist_name(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyArtist_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyArtist_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyArtist_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SpotifyArtist", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SpotifyArtist", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _SpotifyImage_url(ctx context.Context, field graphql.CollectedField, obj *model.SpotifyImage) (ret graphql.Marshaler) { @@ -5278,28 +5640,22 @@ func (ec *executionContext) _SpotifyImage_url(ctx context.Context, field graphql ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyImage_url, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyImage_url(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.URL, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyImage_url(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SpotifyImage", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SpotifyImage", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _SpotifyPlaying_playing(ctx context.Context, field graphql.CollectedField, obj *model.SpotifyPlaying) (ret graphql.Marshaler) { @@ -5307,28 +5663,22 @@ func (ec *executionContext) _SpotifyPlaying_playing(ctx context.Context, field g ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyPlaying_playing, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyPlaying_playing(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Playing, nil }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyPlaying_playing(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SpotifyPlaying", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SpotifyPlaying", field, false, false, errors.New("field of type Boolean does not have child fields")) } func (ec *executionContext) _SpotifyPlaying_track(ctx context.Context, field graphql.CollectedField, obj *model.SpotifyPlaying) (ret graphql.Marshaler) { @@ -5336,17 +5686,20 @@ func (ec *executionContext) _SpotifyPlaying_track(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyPlaying_track, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyPlaying_track(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Track, nil }, nil, - ec.marshalOSpotifyTrack2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyTrack, + func(ctx context.Context, selections ast.SelectionSet, v *model.SpotifyTrack) graphql.Marshaler { + return ec.marshalOSpotifyTrack2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyTrack(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext_SpotifyPlaying_track(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SpotifyPlaying", @@ -5354,15 +5707,7 @@ func (ec *executionContext) fieldContext_SpotifyPlaying_track(_ context.Context, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_SpotifyTrack_name(ctx, field) - case "artists": - return ec.fieldContext_SpotifyTrack_artists(ctx, field) - case "album": - return ec.fieldContext_SpotifyTrack_album(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SpotifyTrack", field.Name) + return ec.childFields_SpotifyTrack(ctx, field) }, } return fc, nil @@ -5373,17 +5718,20 @@ func (ec *executionContext) _SpotifyRecentItem_track(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyRecentItem_track, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyRecentItem_track(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Track, nil }, nil, - ec.marshalNSpotifyTrack2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyTrack, + func(ctx context.Context, selections ast.SelectionSet, v *model.SpotifyTrack) graphql.Marshaler { + return ec.marshalNSpotifyTrack2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyTrack(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyRecentItem_track(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SpotifyRecentItem", @@ -5391,15 +5739,7 @@ func (ec *executionContext) fieldContext_SpotifyRecentItem_track(_ context.Conte IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_SpotifyTrack_name(ctx, field) - case "artists": - return ec.fieldContext_SpotifyTrack_artists(ctx, field) - case "album": - return ec.fieldContext_SpotifyTrack_album(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SpotifyTrack", field.Name) + return ec.childFields_SpotifyTrack(ctx, field) }, } return fc, nil @@ -5410,28 +5750,22 @@ func (ec *executionContext) _SpotifyRecentItem_playedAt(ctx context.Context, fie ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyRecentItem_playedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyRecentItem_playedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.PlayedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyRecentItem_playedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SpotifyRecentItem", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SpotifyRecentItem", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _SpotifyTrack_name(ctx context.Context, field graphql.CollectedField, obj *model.SpotifyTrack) (ret graphql.Marshaler) { @@ -5439,28 +5773,22 @@ func (ec *executionContext) _SpotifyTrack_name(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyTrack_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyTrack_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyTrack_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SpotifyTrack", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SpotifyTrack", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _SpotifyTrack_artists(ctx context.Context, field graphql.CollectedField, obj *model.SpotifyTrack) (ret graphql.Marshaler) { @@ -5468,17 +5796,20 @@ func (ec *executionContext) _SpotifyTrack_artists(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyTrack_artists, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyTrack_artists(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Artists, nil }, nil, - ec.marshalNSpotifyArtist2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyArtistᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*model.SpotifyArtist) graphql.Marshaler { + return ec.marshalNSpotifyArtist2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyArtistᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyTrack_artists(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SpotifyTrack", @@ -5486,11 +5817,7 @@ func (ec *executionContext) fieldContext_SpotifyTrack_artists(_ context.Context, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_SpotifyArtist_name(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SpotifyArtist", field.Name) + return ec.childFields_SpotifyArtist(ctx, field) }, } return fc, nil @@ -5501,17 +5828,20 @@ func (ec *executionContext) _SpotifyTrack_album(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_SpotifyTrack_album, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SpotifyTrack_album(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Album, nil }, nil, - ec.marshalNSpotifyAlbum2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyAlbum, + func(ctx context.Context, selections ast.SelectionSet, v *model.SpotifyAlbum) graphql.Marshaler { + return ec.marshalNSpotifyAlbum2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSpotifyAlbum(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SpotifyTrack_album(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SpotifyTrack", @@ -5519,13 +5849,7 @@ func (ec *executionContext) fieldContext_SpotifyTrack_album(_ context.Context, f IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_SpotifyAlbum_name(ctx, field) - case "images": - return ec.fieldContext_SpotifyAlbum_images(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SpotifyAlbum", field.Name) + return ec.childFields_SpotifyAlbum(ctx, field) }, } return fc, nil @@ -5536,28 +5860,22 @@ func (ec *executionContext) _SteamGame_appId(ctx context.Context, field graphql. ctx, ec.OperationContext, field, - ec.fieldContext_SteamGame_appId, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SteamGame_appId(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.AppID, nil }, nil, - ec.marshalNInt2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNInt2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SteamGame_appId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SteamGame", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SteamGame", field, false, false, errors.New("field of type Int does not have child fields")) } func (ec *executionContext) _SteamGame_name(ctx context.Context, field graphql.CollectedField, obj *model.SteamGame) (ret graphql.Marshaler) { @@ -5565,28 +5883,22 @@ func (ec *executionContext) _SteamGame_name(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext_SteamGame_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SteamGame_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SteamGame_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SteamGame", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SteamGame", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _SteamGame_playtime2Weeks(ctx context.Context, field graphql.CollectedField, obj *model.SteamGame) (ret graphql.Marshaler) { @@ -5594,28 +5906,22 @@ func (ec *executionContext) _SteamGame_playtime2Weeks(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_SteamGame_playtime2Weeks, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SteamGame_playtime2Weeks(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Playtime2Weeks, nil }, nil, - ec.marshalNInt2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNInt2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SteamGame_playtime2Weeks(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SteamGame", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SteamGame", field, false, false, errors.New("field of type Int does not have child fields")) } func (ec *executionContext) _SteamGame_playtimeForever(ctx context.Context, field graphql.CollectedField, obj *model.SteamGame) (ret graphql.Marshaler) { @@ -5623,28 +5929,22 @@ func (ec *executionContext) _SteamGame_playtimeForever(ctx context.Context, fiel ctx, ec.OperationContext, field, - ec.fieldContext_SteamGame_playtimeForever, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SteamGame_playtimeForever(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.PlaytimeForever, nil }, nil, - ec.marshalNInt2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNInt2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SteamGame_playtimeForever(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SteamGame", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SteamGame", field, false, false, errors.New("field of type Int does not have child fields")) } func (ec *executionContext) _SteamGame_headerImageUrl(ctx context.Context, field graphql.CollectedField, obj *model.SteamGame) (ret graphql.Marshaler) { @@ -5652,28 +5952,22 @@ func (ec *executionContext) _SteamGame_headerImageUrl(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_SteamGame_headerImageUrl, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SteamGame_headerImageUrl(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.HeaderImageURL, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SteamGame_headerImageUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SteamGame", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SteamGame", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _SteamStatus_online(ctx context.Context, field graphql.CollectedField, obj *model.SteamStatus) (ret graphql.Marshaler) { @@ -5681,28 +5975,22 @@ func (ec *executionContext) _SteamStatus_online(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext_SteamStatus_online, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SteamStatus_online(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Online, nil }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SteamStatus_online(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "SteamStatus", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("SteamStatus", field, false, false, errors.New("field of type Boolean does not have child fields")) } func (ec *executionContext) _SteamStatus_recentGames(ctx context.Context, field graphql.CollectedField, obj *model.SteamStatus) (ret graphql.Marshaler) { @@ -5710,17 +5998,20 @@ func (ec *executionContext) _SteamStatus_recentGames(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext_SteamStatus_recentGames, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_SteamStatus_recentGames(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.RecentGames, nil }, nil, - ec.marshalNSteamGame2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSteamGameᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []*model.SteamGame) graphql.Marshaler { + return ec.marshalNSteamGame2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐSteamGameᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_SteamStatus_recentGames(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SteamStatus", @@ -5728,19 +6019,7 @@ func (ec *executionContext) fieldContext_SteamStatus_recentGames(_ context.Conte IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "appId": - return ec.fieldContext_SteamGame_appId(ctx, field) - case "name": - return ec.fieldContext_SteamGame_name(ctx, field) - case "playtime2Weeks": - return ec.fieldContext_SteamGame_playtime2Weeks(ctx, field) - case "playtimeForever": - return ec.fieldContext_SteamGame_playtimeForever(ctx, field) - case "headerImageUrl": - return ec.fieldContext_SteamGame_headerImageUrl(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SteamGame", field.Name) + return ec.childFields_SteamGame(ctx, field) }, } return fc, nil @@ -5751,28 +6030,22 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte ctx, ec.OperationContext, field, - ec.fieldContext_User_id, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_User_id(ctx, field) + }, func(ctx context.Context) (any, error) { return ec.Resolvers.User().ID(ctx, obj) }, nil, - ec.marshalNID2int, + func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { + return ec.marshalNID2int(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_User_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "User", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("User", field, true, true, errors.New("field of type ID does not have child fields")) } func (ec *executionContext) _User_createdAt(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) { @@ -5780,28 +6053,22 @@ func (ec *executionContext) _User_createdAt(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext_User_createdAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_User_createdAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_User_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "User", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("User", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _User_updatedAt(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) { @@ -5809,28 +6076,22 @@ func (ec *executionContext) _User_updatedAt(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext_User_updatedAt, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_User_updatedAt(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.UpdatedAt, nil }, nil, - ec.marshalNTime2timeᚐTime, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_User_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "User", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("User", field, false, false, errors.New("field of type Time does not have child fields")) } func (ec *executionContext) _User_username(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) { @@ -5838,28 +6099,22 @@ func (ec *executionContext) _User_username(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext_User_username, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_User_username(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Username, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_User_username(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "User", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("User", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) _User_admin(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) { @@ -5867,28 +6122,22 @@ func (ec *executionContext) _User_admin(ctx context.Context, field graphql.Colle ctx, ec.OperationContext, field, - ec.fieldContext_User_admin, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_User_admin(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Admin, nil }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext_User_admin(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "User", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("User", field, false, false, errors.New("field of type Boolean does not have child fields")) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -5896,28 +6145,22 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql ctx, ec.OperationContext, field, - ec.fieldContext___Directive_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Directive_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Directive_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Directive", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Directive", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -5925,28 +6168,22 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext___Directive_description, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Directive_description(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Description(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Directive_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Directive", - 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 + return graphql.NewScalarFieldContext("__Directive", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -5954,28 +6191,22 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext___Directive_isRepeatable, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Directive_isRepeatable(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.IsRepeatable, nil }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Directive", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Directive", field, false, false, errors.New("field of type Boolean does not have child fields")) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -5983,28 +6214,22 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext___Directive_locations, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Directive_locations(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Locations, nil }, nil, - ec.marshalN__DirectiveLocation2ᚕstringᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []string) graphql.Marshaler { + return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Directive_locations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Directive", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type __DirectiveLocation does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Directive", field, false, false, errors.New("field of type __DirectiveLocation does not have child fields")) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -6012,17 +6237,20 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql ctx, ec.OperationContext, field, - ec.fieldContext___Directive_args, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Directive_args(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Args, nil }, nil, - ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", @@ -6030,21 +6258,7 @@ func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, f IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___InputValue_name(ctx, field) - case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) - case "isDeprecated": - return ec.fieldContext___InputValue_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___InputValue_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + return ec.childFields___InputValue(ctx, field) }, } defer func() { @@ -6066,28 +6280,22 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql ctx, ec.OperationContext, field, - ec.fieldContext___EnumValue_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___EnumValue_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__EnumValue", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { @@ -6095,28 +6303,22 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext___EnumValue_description, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___EnumValue_description(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Description(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___EnumValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__EnumValue", - 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 + return graphql.NewScalarFieldContext("__EnumValue", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { @@ -6124,28 +6326,22 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext___EnumValue_isDeprecated, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.IsDeprecated(), nil }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__EnumValue", field, true, false, errors.New("field of type Boolean does not have child fields")) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { @@ -6153,28 +6349,22 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, ctx, ec.OperationContext, field, - ec.fieldContext___EnumValue_deprecationReason, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.DeprecationReason(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__EnumValue", - 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 + return graphql.NewScalarFieldContext("__EnumValue", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -6182,28 +6372,22 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col ctx, ec.OperationContext, field, - ec.fieldContext___Field_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Field_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Field_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Field", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Field", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -6211,28 +6395,22 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap ctx, ec.OperationContext, field, - ec.fieldContext___Field_description, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Field_description(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Description(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Field_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Field", - 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 + return graphql.NewScalarFieldContext("__Field", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -6240,17 +6418,20 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col ctx, ec.OperationContext, field, - ec.fieldContext___Field_args, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Field_args(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Args, nil }, nil, - ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", @@ -6258,21 +6439,7 @@ func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___InputValue_name(ctx, field) - case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) - case "isDeprecated": - return ec.fieldContext___InputValue_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___InputValue_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + return ec.childFields___InputValue(ctx, field) }, } defer func() { @@ -6294,17 +6461,20 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col ctx, ec.OperationContext, field, - ec.fieldContext___Field_type, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Field_type(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Type, nil }, nil, - ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + func(ctx context.Context, selections ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Field_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", @@ -6312,31 +6482,7 @@ func (ec *executionContext) fieldContext___Field_type(_ context.Context, field g IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -6347,28 +6493,22 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext___Field_isDeprecated, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Field_isDeprecated(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.IsDeprecated(), nil }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Field", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Field", field, true, false, errors.New("field of type Boolean does not have child fields")) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -6376,28 +6516,22 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel ctx, ec.OperationContext, field, - ec.fieldContext___Field_deprecationReason, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Field_deprecationReason(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.DeprecationReason(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Field", - 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 + return graphql.NewScalarFieldContext("__Field", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -6405,28 +6539,22 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext___InputValue_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___InputValue_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name, nil }, nil, - ec.marshalNString2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__InputValue", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -6434,28 +6562,22 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field ctx, ec.OperationContext, field, - ec.fieldContext___InputValue_description, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___InputValue_description(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Description(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___InputValue_description(_ 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 + return graphql.NewScalarFieldContext("__InputValue", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -6463,17 +6585,20 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext___InputValue_type, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___InputValue_type(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Type, nil }, nil, - ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + func(ctx context.Context, selections ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", @@ -6481,31 +6606,7 @@ func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, fi IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -6516,28 +6617,22 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel ctx, ec.OperationContext, field, - ec.fieldContext___InputValue_defaultValue, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___InputValue_defaultValue(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.DefaultValue, nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__InputValue", field, false, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___InputValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -6545,28 +6640,22 @@ func (ec *executionContext) ___InputValue_isDeprecated(ctx context.Context, fiel ctx, ec.OperationContext, field, - ec.fieldContext___InputValue_isDeprecated, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___InputValue_isDeprecated(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.IsDeprecated(), nil }, nil, - ec.marshalNBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalNBoolean2bool(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___InputValue_isDeprecated(_ 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 Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__InputValue", field, true, false, errors.New("field of type Boolean does not have child fields")) } func (ec *executionContext) ___InputValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -6574,28 +6663,22 @@ func (ec *executionContext) ___InputValue_deprecationReason(ctx context.Context, ctx, ec.OperationContext, field, - ec.fieldContext___InputValue_deprecationReason, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___InputValue_deprecationReason(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.DeprecationReason(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, 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 + return graphql.NewScalarFieldContext("__InputValue", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { @@ -6603,28 +6686,22 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext___Schema_description, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Schema_description(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Description(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Schema_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Schema", - 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 + return graphql.NewScalarFieldContext("__Schema", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { @@ -6632,17 +6709,20 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext___Schema_types, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Schema_types(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Types(), nil }, nil, - ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", @@ -6650,31 +6730,7 @@ func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -6685,17 +6741,20 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext___Schema_queryType, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Schema_queryType(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.QueryType(), nil }, nil, - ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + func(ctx context.Context, selections ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", @@ -6703,31 +6762,7 @@ func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, f IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -6738,17 +6773,20 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext___Schema_mutationType, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Schema_mutationType(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.MutationType(), nil }, nil, - ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + func(ctx context.Context, selections ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", @@ -6756,31 +6794,7 @@ func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -6791,17 +6805,20 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel ctx, ec.OperationContext, field, - ec.fieldContext___Schema_subscriptionType, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Schema_subscriptionType(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.SubscriptionType(), nil }, nil, - ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + func(ctx context.Context, selections ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", @@ -6809,31 +6826,7 @@ func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Con IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -6844,17 +6837,20 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap ctx, ec.OperationContext, field, - ec.fieldContext___Schema_directives, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Schema_directives(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Directives(), nil }, nil, - ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", @@ -6862,19 +6858,7 @@ func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___Directive_name(ctx, field) - case "description": - return ec.fieldContext___Directive_description(ctx, field) - case "isRepeatable": - return ec.fieldContext___Directive_isRepeatable(ctx, field) - case "locations": - return ec.fieldContext___Directive_locations(ctx, field) - case "args": - return ec.fieldContext___Directive_args(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + return ec.childFields___Directive(ctx, field) }, } return fc, nil @@ -6885,28 +6869,22 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext___Type_kind, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_kind(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Kind(), nil }, nil, - ec.marshalN__TypeKind2string, + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalN__TypeKind2string(ctx, selections, v) + }, true, true, ) } - func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Type", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type __TypeKind does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type __TypeKind does not have child fields")) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6914,28 +6892,22 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll ctx, ec.OperationContext, field, - ec.fieldContext___Type_name, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_name(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Name(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Type", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6943,28 +6915,22 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext___Type_description, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_description(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Description(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Type", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6972,28 +6938,22 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr ctx, ec.OperationContext, field, - ec.fieldContext___Type_specifiedByURL, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_specifiedByURL(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.SpecifiedByURL(), nil }, nil, - ec.marshalOString2ᚖstring, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Type", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type String does not have child fields")) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -7001,18 +6961,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext___Type_fields, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_fields(ctx, field) + }, 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ᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.Field) graphql.Marshaler { + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", @@ -7020,21 +6983,7 @@ func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, fiel IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___Field_name(ctx, field) - case "description": - return ec.fieldContext___Field_description(ctx, field) - case "args": - return ec.fieldContext___Field_args(ctx, field) - case "type": - return ec.fieldContext___Field_type(ctx, field) - case "isDeprecated": - return ec.fieldContext___Field_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___Field_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + return ec.childFields___Field(ctx, field) }, } defer func() { @@ -7056,17 +7005,20 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext___Type_interfaces, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_interfaces(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.Interfaces(), nil }, nil, - ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", @@ -7074,31 +7026,7 @@ func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, fi IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -7109,17 +7037,20 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra ctx, ec.OperationContext, field, - ec.fieldContext___Type_possibleTypes, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_possibleTypes(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.PossibleTypes(), nil }, nil, - ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", @@ -7127,31 +7058,7 @@ func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -7162,18 +7069,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq ctx, ec.OperationContext, field, - ec.fieldContext___Type_enumValues, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_enumValues(ctx, field) + }, 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ᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", @@ -7181,17 +7091,7 @@ func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___EnumValue_name(ctx, field) - case "description": - return ec.fieldContext___EnumValue_description(ctx, field) - case "isDeprecated": - return ec.fieldContext___EnumValue_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___EnumValue_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + return ec.childFields___EnumValue(ctx, field) }, } defer func() { @@ -7213,17 +7113,20 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph ctx, ec.OperationContext, field, - ec.fieldContext___Type_inputFields, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_inputFields(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.InputFields(), nil }, nil, - ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ, + func(ctx context.Context, selections ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", @@ -7231,21 +7134,7 @@ func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, f IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___InputValue_name(ctx, field) - case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) - case "isDeprecated": - return ec.fieldContext___InputValue_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___InputValue_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + return ec.childFields___InputValue(ctx, field) }, } return fc, nil @@ -7256,17 +7145,20 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co ctx, ec.OperationContext, field, - ec.fieldContext___Type_ofType, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_ofType(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.OfType(), nil }, nil, - ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType, + func(ctx context.Context, selections ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", @@ -7274,31 +7166,7 @@ func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "isOneOf": - return ec.fieldContext___Type_isOneOf(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return ec.childFields___Type(ctx, field) }, } return fc, nil @@ -7309,28 +7177,22 @@ func (ec *executionContext) ___Type_isOneOf(ctx context.Context, field graphql.C ctx, ec.OperationContext, field, - ec.fieldContext___Type_isOneOf, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext___Type_isOneOf(ctx, field) + }, func(ctx context.Context) (any, error) { return obj.IsOneOf(), nil }, nil, - ec.marshalOBoolean2bool, + func(ctx context.Context, selections ast.SelectionSet, v bool) graphql.Marshaler { + return ec.marshalOBoolean2bool(ctx, selections, v) + }, true, false, ) } - func (ec *executionContext) fieldContext___Type_isOneOf(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Type", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } - return fc, nil + return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type Boolean does not have child fields")) } // endregion **************************** field.gotpl ***************************** @@ -7592,6 +7454,85 @@ func (ec *executionContext) unmarshalInputCreateJobApplicationInput(ctx context. return it, nil } +func (ec *executionContext) unmarshalInputCreatePlaceInput(ctx context.Context, obj any) (model.CreatePlaceInput, error) { + var it model.CreatePlaceInput + if obj == nil { + return it, nil + } + + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"title", "location", "notes", "imageUrl", "category", "cost", "priority", "done"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "title": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("title")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Title = data + case "location": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Location = data + case "notes": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notes")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Notes = data + case "imageUrl": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("imageUrl")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.ImageURL = data + case "category": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("category")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Category = data + case "cost": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cost")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Cost = data + case "priority": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("priority")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.Priority = data + case "done": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("done")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.Done = data + } + } + return it, nil +} + func (ec *executionContext) unmarshalInputCreatePostInput(ctx context.Context, obj any) (model.CreatePostInput, error) { var it model.CreatePostInput if obj == nil { @@ -7826,6 +7767,85 @@ func (ec *executionContext) unmarshalInputUpdateJobApplicationInput(ctx context. return it, nil } +func (ec *executionContext) unmarshalInputUpdatePlaceInput(ctx context.Context, obj any) (model.UpdatePlaceInput, error) { + var it model.UpdatePlaceInput + if obj == nil { + return it, nil + } + + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"title", "location", "notes", "imageUrl", "category", "cost", "priority", "done"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "title": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("title")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Title = data + case "location": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Location = data + case "notes": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notes")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Notes = data + case "imageUrl": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("imageUrl")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.ImageURL = data + case "category": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("category")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Category = data + case "cost": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cost")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Cost = data + case "priority": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("priority")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.Priority = data + case "done": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("done")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.Done = data + } + } + return it, nil +} + func (ec *executionContext) unmarshalInputUpdatePostInput(ctx context.Context, obj any) (model.UpdatePostInput, error) { var it model.UpdatePostInput if obj == nil { @@ -7877,7 +7897,8 @@ func (ec *executionContext) _Activity(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, activityImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -7898,20 +7919,22 @@ func (ec *executionContext) _Activity(ctx context.Context, sel ast.SelectionSet, return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -7940,6 +7963,9 @@ func (ec *executionContext) _Activity(ctx context.Context, sel ast.SelectionSet, } case "link": out.Values[i] = ec._Activity_link(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -7949,16 +7975,14 @@ func (ec *executionContext) _Activity(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -7969,7 +7993,8 @@ func (ec *executionContext) _AuthPayload(ctx context.Context, sel ast.SelectionS fields := graphql.CollectFields(ec.OperationContext, sel, authPayloadImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -7988,16 +8013,14 @@ func (ec *executionContext) _AuthPayload(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8008,7 +8031,8 @@ func (ec *executionContext) _Bookmark(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, bookmarkImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -8029,20 +8053,22 @@ func (ec *executionContext) _Bookmark(ctx context.Context, sel ast.SelectionSet, return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -8083,16 +8109,14 @@ func (ec *executionContext) _Bookmark(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8103,7 +8127,8 @@ func (ec *executionContext) _Favorite(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, favoriteImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -8124,20 +8149,22 @@ func (ec *executionContext) _Favorite(ctx context.Context, sel ast.SelectionSet, return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -8166,6 +8193,9 @@ func (ec *executionContext) _Favorite(ctx context.Context, sel ast.SelectionSet, } case "link": out.Values[i] = ec._Favorite_link(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -8175,16 +8205,14 @@ func (ec *executionContext) _Favorite(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8195,7 +8223,8 @@ func (ec *executionContext) _GiteaFeedItem(ctx context.Context, sel ast.Selectio fields := graphql.CollectFields(ec.OperationContext, sel, giteaFeedItemImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -8239,16 +8268,14 @@ func (ec *executionContext) _GiteaFeedItem(ctx context.Context, sel ast.Selectio return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8259,7 +8286,8 @@ func (ec *executionContext) _JobAppReference(ctx context.Context, sel ast.Select fields := graphql.CollectFields(ec.OperationContext, sel, jobAppReferenceImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -8280,20 +8308,22 @@ func (ec *executionContext) _JobAppReference(ctx context.Context, sel ast.Select return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -8339,16 +8369,14 @@ func (ec *executionContext) _JobAppReference(ctx context.Context, sel ast.Select return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8359,7 +8387,8 @@ func (ec *executionContext) _JobApplication(ctx context.Context, sel ast.Selecti fields := graphql.CollectFields(ec.OperationContext, sel, jobApplicationImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -8380,20 +8409,22 @@ func (ec *executionContext) _JobApplication(ctx context.Context, sel ast.Selecti return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -8422,8 +8453,14 @@ func (ec *executionContext) _JobApplication(ctx context.Context, sel ast.Selecti } case "location": out.Values[i] = ec._JobApplication_location(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } case "url": out.Values[i] = ec._JobApplication_url(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } case "status": out.Values[i] = ec._JobApplication_status(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -8431,8 +8468,14 @@ func (ec *executionContext) _JobApplication(ctx context.Context, sel ast.Selecti } case "notes": out.Values[i] = ec._JobApplication_notes(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } case "appliedAt": out.Values[i] = ec._JobApplication_appliedAt(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -8442,16 +8485,14 @@ func (ec *executionContext) _JobApplication(ctx context.Context, sel ast.Selecti return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8462,7 +8503,8 @@ func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, messageImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -8483,20 +8525,22 @@ func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -8524,20 +8568,22 @@ func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -8546,6 +8592,9 @@ func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "fileUrl": out.Values[i] = ec._Message_fileUrl(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } case "createdAt": out.Values[i] = ec._Message_createdAt(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -8560,16 +8609,14 @@ func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8583,7 +8630,8 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) }) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ Object: field.Name, @@ -8684,6 +8732,27 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { out.Invalids++ } + case "createPlace": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_createPlace(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "updatePlace": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_updatePlace(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "deletePlace": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_deletePlace(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } case "createPost": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Mutation_createPost(ctx, field) @@ -8735,16 +8804,135 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) + + return out +} + +var placeImplementors = []string{"Place"} + +func (ec *executionContext) _Place(ctx context.Context, sel ast.SelectionSet, obj *models.Place) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, placeImplementors) + + out := graphql.NewFieldSet(fields) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Place") + case "id": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Place_id(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) + }) + + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "createdAt": + out.Values[i] = ec._Place_createdAt(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updatedAt": + out.Values[i] = ec._Place_updatedAt(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "title": + out.Values[i] = ec._Place_title(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "location": + out.Values[i] = ec._Place_location(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } + case "notes": + out.Values[i] = ec._Place_notes(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } + case "imageUrl": + out.Values[i] = ec._Place_imageUrl(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } + case "category": + out.Values[i] = ec._Place_category(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } + case "cost": + out.Values[i] = ec._Place_cost(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } + case "priority": + out.Values[i] = ec._Place_priority(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "done": + out.Values[i] = ec._Place_done(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) + + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8755,7 +8943,8 @@ func (ec *executionContext) _Post(ctx context.Context, sel ast.SelectionSet, obj fields := graphql.CollectFields(ec.OperationContext, sel, postImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -8776,20 +8965,22 @@ func (ec *executionContext) _Post(ctx context.Context, sel ast.SelectionSet, obj return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -8813,6 +9004,9 @@ func (ec *executionContext) _Post(ctx context.Context, sel ast.SelectionSet, obj } case "author": out.Values[i] = ec._Post_author(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } case "content": out.Values[i] = ec._Post_content(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -8827,16 +9021,14 @@ func (ec *executionContext) _Post(ctx context.Context, sel ast.SelectionSet, obj return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -8850,7 +9042,8 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ Object: field.Name, @@ -8885,13 +9078,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "me": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_me(ctx, field) + if res == graphql.RequiredNull { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -8948,13 +9144,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "giteaFeed": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_giteaFeed(ctx, field) + if res == graphql.RequiredNull { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -9011,13 +9210,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "jobApplication": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_jobApplication(ctx, field) + if res == graphql.RequiredNull { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -9048,6 +9250,28 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "places": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_places(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "posts": field := field @@ -9074,13 +9298,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "post": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_post(ctx, field) + if res == graphql.RequiredNull { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -9115,13 +9342,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "spotifyListening": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_spotifyListening(ctx, field) + if res == graphql.RequiredNull { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -9134,13 +9364,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "spotifyRecent": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_spotifyRecent(ctx, field) + if res == graphql.RequiredNull { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -9153,13 +9386,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "steamStatus": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_steamStatus(ctx, field) + if res == graphql.RequiredNull { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -9194,13 +9430,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "user": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() res = ec._Query_user(ctx, field) + if res == graphql.RequiredNull { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -9214,10 +9453,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Query___type(ctx, field) }) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } case "__schema": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Query___schema(ctx, field) }) + if out.Values[i] == graphql.RequiredNull { + atomic.AddUint32(&out.Invalids, 1) + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9227,16 +9472,14 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9247,7 +9490,8 @@ func (ec *executionContext) _Rowing(ctx context.Context, sel ast.SelectionSet, o fields := graphql.CollectFields(ec.OperationContext, sel, rowingImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9268,20 +9512,22 @@ func (ec *executionContext) _Rowing(ctx context.Context, sel ast.SelectionSet, o return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -9314,20 +9560,22 @@ func (ec *executionContext) _Rowing(ctx context.Context, sel ast.SelectionSet, o return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -9350,20 +9598,22 @@ func (ec *executionContext) _Rowing(ctx context.Context, sel ast.SelectionSet, o return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -9389,16 +9639,14 @@ func (ec *executionContext) _Rowing(ctx context.Context, sel ast.SelectionSet, o return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9409,7 +9657,8 @@ func (ec *executionContext) _SpotifyAlbum(ctx context.Context, sel ast.Selection fields := graphql.CollectFields(ec.OperationContext, sel, spotifyAlbumImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9433,16 +9682,14 @@ func (ec *executionContext) _SpotifyAlbum(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9453,7 +9700,8 @@ func (ec *executionContext) _SpotifyArtist(ctx context.Context, sel ast.Selectio fields := graphql.CollectFields(ec.OperationContext, sel, spotifyArtistImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9472,16 +9720,14 @@ func (ec *executionContext) _SpotifyArtist(ctx context.Context, sel ast.Selectio return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9492,7 +9738,8 @@ func (ec *executionContext) _SpotifyImage(ctx context.Context, sel ast.Selection fields := graphql.CollectFields(ec.OperationContext, sel, spotifyImageImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9511,16 +9758,14 @@ func (ec *executionContext) _SpotifyImage(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9531,7 +9776,8 @@ func (ec *executionContext) _SpotifyPlaying(ctx context.Context, sel ast.Selecti fields := graphql.CollectFields(ec.OperationContext, sel, spotifyPlayingImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9543,6 +9789,9 @@ func (ec *executionContext) _SpotifyPlaying(ctx context.Context, sel ast.Selecti } case "track": out.Values[i] = ec._SpotifyPlaying_track(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9552,16 +9801,14 @@ func (ec *executionContext) _SpotifyPlaying(ctx context.Context, sel ast.Selecti return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9572,7 +9819,8 @@ func (ec *executionContext) _SpotifyRecentItem(ctx context.Context, sel ast.Sele fields := graphql.CollectFields(ec.OperationContext, sel, spotifyRecentItemImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9596,16 +9844,14 @@ func (ec *executionContext) _SpotifyRecentItem(ctx context.Context, sel ast.Sele return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9616,7 +9862,8 @@ func (ec *executionContext) _SpotifyTrack(ctx context.Context, sel ast.Selection fields := graphql.CollectFields(ec.OperationContext, sel, spotifyTrackImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9645,16 +9892,14 @@ func (ec *executionContext) _SpotifyTrack(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9665,7 +9910,8 @@ func (ec *executionContext) _SteamGame(ctx context.Context, sel ast.SelectionSet fields := graphql.CollectFields(ec.OperationContext, sel, steamGameImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9704,16 +9950,14 @@ func (ec *executionContext) _SteamGame(ctx context.Context, sel ast.SelectionSet return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9724,7 +9968,8 @@ func (ec *executionContext) _SteamStatus(ctx context.Context, sel ast.SelectionS fields := graphql.CollectFields(ec.OperationContext, sel, steamStatusImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9748,16 +9993,14 @@ func (ec *executionContext) _SteamStatus(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9768,7 +10011,8 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9789,20 +10033,22 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) + if field.IsDeferred() { + deferredFieldSet.AddField(field) + fieldIndex := len(deferredFieldSet.Values) - 1 + deferredFieldSet.Concurrently(fieldIndex, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, deferredFieldSet) }) + for _, deferrable := range field.Deferrables { + view, ok := deferLabelToView[deferrable.Label] + if !ok { + view = deferredFieldSet.NewView() + deferLabelToView[deferrable.Label] = view + } + view.AddIndices(fieldIndex) + } + // don't run the out.Concurrently() call below out.Values[i] = graphql.Null continue @@ -9838,16 +10084,14 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9858,7 +10102,8 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9870,6 +10115,9 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS } case "description": out.Values[i] = ec.___Directive_description(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "isRepeatable": out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -9894,16 +10142,14 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9914,7 +10160,8 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9926,6 +10173,9 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS } case "description": out.Values[i] = ec.___EnumValue_description(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "isDeprecated": out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -9933,6 +10183,9 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS } case "deprecationReason": out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9942,16 +10195,14 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -9962,7 +10213,8 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -9974,6 +10226,9 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, } case "description": out.Values[i] = ec.___Field_description(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "args": out.Values[i] = ec.___Field_args(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -9991,6 +10246,9 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, } case "deprecationReason": out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10000,16 +10258,14 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -10020,7 +10276,8 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -10032,6 +10289,9 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection } case "description": out.Values[i] = ec.___InputValue_description(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "type": out.Values[i] = ec.___InputValue_type(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -10039,6 +10299,9 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection } case "defaultValue": out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "isDeprecated": out.Values[i] = ec.___InputValue_isDeprecated(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -10046,6 +10309,9 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection } case "deprecationReason": out.Values[i] = ec.___InputValue_deprecationReason(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10055,16 +10321,14 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -10075,13 +10339,17 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Schema") case "description": out.Values[i] = ec.___Schema_description(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "types": out.Values[i] = ec.___Schema_types(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -10094,8 +10362,14 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, } case "mutationType": out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "subscriptionType": out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "directives": out.Values[i] = ec.___Schema_directives(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -10110,16 +10384,14 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -10130,7 +10402,8 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) + deferredFieldSet := graphql.NewFieldSet(nil) + deferLabelToView := make(map[string]*graphql.FieldSetView) for i, field := range fields { switch field.Name { case "__typename": @@ -10142,24 +10415,54 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o } case "name": out.Values[i] = ec.___Type_name(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "description": out.Values[i] = ec.___Type_description(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "specifiedByURL": out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "fields": out.Values[i] = ec.___Type_fields(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "interfaces": out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "possibleTypes": out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "enumValues": out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "inputFields": out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "ofType": out.Values[i] = ec.___Type_ofType(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } case "isOneOf": out.Values[i] = ec.___Type_isOneOf(ctx, field, obj) + if out.Values[i] == graphql.RequiredNull { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10169,16 +10472,14 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(len(deferred))) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Defers: deferLabelToView, + Path: graphql.GetPath(ctx), + FieldSet: deferredFieldSet, + Context: ctx, + }) return out } @@ -10187,10 +10488,6 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNActivity2adamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐActivity(ctx context.Context, sel ast.SelectionSet, v models.Activity) graphql.Marshaler { - return ec._Activity(ctx, sel, &v) -} - func (ec *executionContext) marshalNActivity2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐActivityᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Activity) graphql.Marshaler { ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { fc := graphql.GetFieldContext(ctx) @@ -10217,10 +10514,6 @@ func (ec *executionContext) marshalNActivity2ᚖadamᚑfrenchᚗcoᚗukᚋbacken return ec._Activity(ctx, sel, v) } -func (ec *executionContext) marshalNAuthPayload2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐAuthPayload(ctx context.Context, sel ast.SelectionSet, v model.AuthPayload) graphql.Marshaler { - return ec._AuthPayload(ctx, sel, &v) -} - func (ec *executionContext) marshalNAuthPayload2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐAuthPayload(ctx context.Context, sel ast.SelectionSet, v *model.AuthPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -10231,10 +10524,6 @@ func (ec *executionContext) marshalNAuthPayload2ᚖadamᚑfrenchᚗcoᚗukᚋbac return ec._AuthPayload(ctx, sel, v) } -func (ec *executionContext) marshalNBookmark2adamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐBookmark(ctx context.Context, sel ast.SelectionSet, v models.Bookmark) graphql.Marshaler { - return ec._Bookmark(ctx, sel, &v) -} - func (ec *executionContext) marshalNBookmark2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐBookmarkᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Bookmark) graphql.Marshaler { ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { fc := graphql.GetFieldContext(ctx) @@ -10302,6 +10591,11 @@ func (ec *executionContext) unmarshalNCreateJobApplicationInput2adamᚑfrenchᚗ return res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalNCreatePlaceInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreatePlaceInput(ctx context.Context, v any) (model.CreatePlaceInput, error) { + res, err := ec.unmarshalInputCreatePlaceInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalNCreatePostInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐCreatePostInput(ctx context.Context, v any) (model.CreatePostInput, error) { res, err := ec.unmarshalInputCreatePostInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) @@ -10312,10 +10606,6 @@ func (ec *executionContext) unmarshalNCreateUserInput2adamᚑfrenchᚗcoᚗukᚋ return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNFavorite2adamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐFavorite(ctx context.Context, sel ast.SelectionSet, v models.Favorite) graphql.Marshaler { - return ec._Favorite(ctx, sel, &v) -} - func (ec *executionContext) marshalNFavorite2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐFavoriteᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Favorite) graphql.Marshaler { ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { fc := graphql.GetFieldContext(ctx) @@ -10390,10 +10680,6 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti return res } -func (ec *executionContext) marshalNJobAppReference2adamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobAppReference(ctx context.Context, sel ast.SelectionSet, v models.JobAppReference) graphql.Marshaler { - return ec._JobAppReference(ctx, sel, &v) -} - func (ec *executionContext) marshalNJobAppReference2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobAppReferenceᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.JobAppReference) graphql.Marshaler { ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { fc := graphql.GetFieldContext(ctx) @@ -10420,10 +10706,6 @@ func (ec *executionContext) marshalNJobAppReference2ᚖadamᚑfrenchᚗcoᚗuk return ec._JobAppReference(ctx, sel, v) } -func (ec *executionContext) marshalNJobApplication2adamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplication(ctx context.Context, sel ast.SelectionSet, v models.JobApplication) graphql.Marshaler { - return ec._JobApplication(ctx, sel, &v) -} - func (ec *executionContext) marshalNJobApplication2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐJobApplicationᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.JobApplication) graphql.Marshaler { ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { fc := graphql.GetFieldContext(ctx) @@ -10481,8 +10763,30 @@ func (ec *executionContext) marshalNMessage2ᚖadamᚑfrenchᚗcoᚗukᚋbackend return ec._Message(ctx, sel, v) } -func (ec *executionContext) marshalNPost2adamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPost(ctx context.Context, sel ast.SelectionSet, v models.Post) graphql.Marshaler { - return ec._Post(ctx, sel, &v) +func (ec *executionContext) marshalNPlace2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPlaceᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Place) graphql.Marshaler { + ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { + fc := graphql.GetFieldContext(ctx) + fc.Result = &v[i] + return ec.marshalNPlace2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPlace(ctx, sel, v[i]) + }) + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNPlace2ᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPlace(ctx context.Context, sel ast.SelectionSet, v *models.Place) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Place(ctx, sel, v) } func (ec *executionContext) marshalNPost2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐPostᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Post) graphql.Marshaler { @@ -10687,13 +10991,14 @@ func (ec *executionContext) unmarshalNUpdateJobApplicationInput2adamᚑfrenchᚗ return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalNUpdatePostInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdatePostInput(ctx context.Context, v any) (model.UpdatePostInput, error) { - res, err := ec.unmarshalInputUpdatePostInput(ctx, v) +func (ec *executionContext) unmarshalNUpdatePlaceInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdatePlaceInput(ctx context.Context, v any) (model.UpdatePlaceInput, error) { + res, err := ec.unmarshalInputUpdatePlaceInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNUser2adamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUser(ctx context.Context, sel ast.SelectionSet, v models.User) graphql.Marshaler { - return ec._User(ctx, sel, &v) +func (ec *executionContext) unmarshalNUpdatePostInput2adamᚑfrenchᚗcoᚗukᚋbackendᚋgraphᚋmodelᚐUpdatePostInput(ctx context.Context, v any) (model.UpdatePostInput, error) { + res, err := ec.unmarshalInputUpdatePostInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNUser2ᚕᚖadamᚑfrenchᚗcoᚗukᚋbackendᚋmodelsᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.User) graphql.Marshaler { @@ -10759,8 +11064,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte } func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) { - var vSlice []any - vSlice = graphql.CoerceList(v) + vSlice := graphql.CoerceList(v) var err error res := make([]string, len(vSlice)) for i := range vSlice { diff --git a/backend/graph/gitea.resolvers.go b/backend/graph/gitea.resolvers.go index 54ae70a..37a5b42 100644 --- a/backend/graph/gitea.resolvers.go +++ b/backend/graph/gitea.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/job_app_reference.resolvers.go b/backend/graph/job_app_reference.resolvers.go index 0834d6a..3c951f6 100644 --- a/backend/graph/job_app_reference.resolvers.go +++ b/backend/graph/job_app_reference.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/job_application.resolvers.go b/backend/graph/job_application.resolvers.go index 165beed..ecf7d13 100644 --- a/backend/graph/job_application.resolvers.go +++ b/backend/graph/job_application.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/message.resolvers.go b/backend/graph/message.resolvers.go index d1022f3..9fea5df 100644 --- a/backend/graph/message.resolvers.go +++ b/backend/graph/message.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/model/models_gen.go b/backend/graph/model/models_gen.go index 7ff7477..f3d83b7 100644 --- a/backend/graph/model/models_gen.go +++ b/backend/graph/model/models_gen.go @@ -47,6 +47,17 @@ type CreateJobApplicationInput struct { AppliedAt *time.Time `json:"appliedAt,omitempty"` } +type CreatePlaceInput struct { + Title string `json:"title"` + Location *string `json:"location,omitempty"` + Notes *string `json:"notes,omitempty"` + ImageURL *string `json:"imageUrl,omitempty"` + Category *string `json:"category,omitempty"` + Cost *string `json:"cost,omitempty"` + Priority *int `json:"priority,omitempty"` + Done *bool `json:"done,omitempty"` +} + type CreatePostInput struct { Title string `json:"title"` Content string `json:"content"` @@ -136,6 +147,17 @@ type UpdateJobApplicationInput struct { AppliedAt *time.Time `json:"appliedAt,omitempty"` } +type UpdatePlaceInput struct { + Title *string `json:"title,omitempty"` + Location *string `json:"location,omitempty"` + Notes *string `json:"notes,omitempty"` + ImageURL *string `json:"imageUrl,omitempty"` + Category *string `json:"category,omitempty"` + Cost *string `json:"cost,omitempty"` + Priority *int `json:"priority,omitempty"` + Done *bool `json:"done,omitempty"` +} + type UpdatePostInput struct { Title string `json:"title"` Content string `json:"content"` diff --git a/backend/graph/place.resolvers.go b/backend/graph/place.resolvers.go new file mode 100644 index 0000000..ddda2f1 --- /dev/null +++ b/backend/graph/place.resolvers.go @@ -0,0 +1,116 @@ +package graph + +// 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.95 + +import ( + "context" + "fmt" + + "adam-french.co.uk/backend/graph/model" + "adam-french.co.uk/backend/models" +) + +// CreatePlace is the resolver for the createPlace field. +func (r *mutationResolver) CreatePlace(ctx context.Context, input model.CreatePlaceInput) (*models.Place, error) { + if !IsAdminFromCtx(ctx) { + return nil, fmt.Errorf("admin access required") + } + place := models.Place{ + Title: input.Title, + Location: input.Location, + Notes: input.Notes, + ImageURL: input.ImageURL, + Category: input.Category, + Cost: input.Cost, + } + if input.Priority != nil { + place.Priority = *input.Priority + } + if input.Done != nil { + place.Done = *input.Done + } + if err := r.Store.DB.Create(&place).Error; err != nil { + return nil, err + } + return &place, nil +} + +// UpdatePlace is the resolver for the updatePlace field. +func (r *mutationResolver) UpdatePlace(ctx context.Context, id int, input model.UpdatePlaceInput) (*models.Place, error) { + if !IsAdminFromCtx(ctx) { + return nil, fmt.Errorf("admin access required") + } + var place models.Place + if err := r.Store.DB.First(&place, id).Error; err != nil { + return nil, err + } + if input.Title != nil { + place.Title = *input.Title + } + if input.Location != nil { + place.Location = input.Location + } + if input.Notes != nil { + place.Notes = input.Notes + } + if input.ImageURL != nil { + place.ImageURL = input.ImageURL + } + if input.Category != nil { + place.Category = input.Category + } + if input.Cost != nil { + place.Cost = input.Cost + } + if input.Priority != nil { + place.Priority = *input.Priority + } + if input.Done != nil { + place.Done = *input.Done + } + if err := r.Store.DB.Save(&place).Error; err != nil { + return nil, err + } + return &place, nil +} + +// DeletePlace is the resolver for the deletePlace field. +func (r *mutationResolver) DeletePlace(ctx context.Context, id int) (*models.Place, error) { + if !IsAdminFromCtx(ctx) { + return nil, fmt.Errorf("admin access required") + } + var place models.Place + if err := r.Store.DB.First(&place, id).Error; err != nil { + return nil, err + } + if err := r.Store.DB.Delete(&place).Error; err != nil { + return nil, err + } + return &place, nil +} + +// ID is the resolver for the id field. +func (r *placeResolver) ID(ctx context.Context, obj *models.Place) (int, error) { + return int(obj.ID), nil +} + +// Places is the resolver for the places field. +func (r *queryResolver) Places(ctx context.Context) ([]*models.Place, error) { + var places []models.Place + if err := r.Store.DB.Order("done ASC, priority DESC, created_at DESC").Find(&places).Error; err != nil { + return nil, err + } + result := make([]*models.Place, len(places)) + for i := range places { + result[i] = &places[i] + } + return result, nil +} + +// Place returns PlaceResolver implementation. +func (r *Resolver) Place() PlaceResolver { return &placeResolver{r} } + +type placeResolver struct{ *Resolver } diff --git a/backend/graph/post.resolvers.go b/backend/graph/post.resolvers.go index f2b32f0..fe2588f 100644 --- a/backend/graph/post.resolvers.go +++ b/backend/graph/post.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/rowing.resolvers.go b/backend/graph/rowing.resolvers.go index 08a1ca7..83fc66b 100644 --- a/backend/graph/rowing.resolvers.go +++ b/backend/graph/rowing.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/schema.resolvers.go b/backend/graph/schema.resolvers.go index 9750de1..a5761f4 100644 --- a/backend/graph/schema.resolvers.go +++ b/backend/graph/schema.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 // Mutation returns MutationResolver implementation. func (r *Resolver) Mutation() MutationResolver { return &mutationResolver{r} } @@ -11,5 +11,7 @@ func (r *Resolver) Mutation() MutationResolver { return &mutationResolver{r} } // Query returns QueryResolver implementation. func (r *Resolver) Query() QueryResolver { return &queryResolver{r} } -type mutationResolver struct{ *Resolver } -type queryResolver struct{ *Resolver } +type ( + mutationResolver struct{ *Resolver } + queryResolver struct{ *Resolver } +) diff --git a/backend/graph/schema/place.graphql b/backend/graph/schema/place.graphql new file mode 100644 index 0000000..2f5a2dd --- /dev/null +++ b/backend/graph/schema/place.graphql @@ -0,0 +1,45 @@ +type Place { + id: ID! + createdAt: Time! + updatedAt: Time! + title: String! + location: String + notes: String + imageUrl: String + category: String + cost: String + priority: Int! + done: Boolean! +} + +input CreatePlaceInput { + title: String! + location: String + notes: String + imageUrl: String + category: String + cost: String + priority: Int + done: Boolean +} + +input UpdatePlaceInput { + title: String + location: String + notes: String + imageUrl: String + category: String + cost: String + priority: Int + done: Boolean +} + +extend type Query { + places: [Place!]! +} + +extend type Mutation { + createPlace(input: CreatePlaceInput!): Place! + updatePlace(id: ID!, input: UpdatePlaceInput!): Place! + deletePlace(id: ID!): Place! +} diff --git a/backend/graph/spotify.resolvers.go b/backend/graph/spotify.resolvers.go index 8f8af7c..29cad95 100644 --- a/backend/graph/spotify.resolvers.go +++ b/backend/graph/spotify.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/steam.resolvers.go b/backend/graph/steam.resolvers.go index f91a0fd..8e45152 100644 --- a/backend/graph/steam.resolvers.go +++ b/backend/graph/steam.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/graph/user.resolvers.go b/backend/graph/user.resolvers.go index 74bf8c4..61eff4b 100644 --- a/backend/graph/user.resolvers.go +++ b/backend/graph/user.resolvers.go @@ -3,7 +3,7 @@ package graph // 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.88 +// Code generated by github.com/99designs/gqlgen version v0.17.95 import ( "context" diff --git a/backend/models/models.go b/backend/models/models.go index 5303307..392803c 100644 --- a/backend/models/models.go +++ b/backend/models/models.go @@ -97,6 +97,21 @@ type ProcessedEmail struct { JobAppID *uint `json:"jobAppId"` } +type Place struct { + ID uint `gorm:"primarykey" json:"id"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt"` + Title string `gorm:"not null" json:"title"` + Location *string `json:"location"` + Notes *string `json:"notes"` + ImageURL *string `json:"imageUrl"` + Category *string `json:"category"` + Cost *string `json:"cost"` + Priority int `gorm:"default:0" json:"priority"` + Done bool `gorm:"default:false" json:"done"` +} + type JobApplication struct { ID uint `gorm:"primarykey" json:"id"` CreatedAt time.Time `json:"createdAt"` diff --git a/backend/services/database.go b/backend/services/database.go index 0f6e573..e8b1f28 100644 --- a/backend/services/database.go +++ b/backend/services/database.go @@ -41,6 +41,7 @@ func migrateDatabase(db *gorm.DB) error { &models.JobApplication{}, &models.JobAppReference{}, &models.Bookmark{}, + &models.Place{}, &models.ProcessedEmail{}, ) if err != nil { diff --git a/vue/src/stores/places.js b/vue/src/stores/places.js new file mode 100644 index 0000000..0bc9008 --- /dev/null +++ b/vue/src/stores/places.js @@ -0,0 +1,85 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; +import { gql } from "@/graphql"; + +const PLACE_FIELDS = ` + id + title + location + notes + imageUrl + category + cost + priority + done + createdAt + updatedAt +`; + +export const usePlacesStore = defineStore("places", () => { + const places = ref([]); + const loaded = ref(false); + const loading = ref(false); + const error = ref(null); + + async function fetch() { + loading.value = true; + try { + const data = await gql(`query Places { places { ${PLACE_FIELDS} } }`); + places.value = data.places || []; + loaded.value = true; + error.value = null; + } catch (err) { + error.value = err; + } finally { + loading.value = false; + } + } + + async function create(input) { + const data = await gql( + `mutation CreatePlace($input: CreatePlaceInput!) { + createPlace(input: $input) { ${PLACE_FIELDS} } + }`, + { input }, + ); + places.value = [data.createPlace, ...places.value]; + return data.createPlace; + } + + async function update(id, input) { + const data = await gql( + `mutation UpdatePlace($id: ID!, $input: UpdatePlaceInput!) { + updatePlace(id: $id, input: $input) { ${PLACE_FIELDS} } + }`, + { id, input }, + ); + const idx = places.value.findIndex((p) => p.id === id); + if (idx >= 0) places.value[idx] = data.updatePlace; + return data.updatePlace; + } + + async function toggleDone(place) { + return update(place.id, { done: !place.done }); + } + + async function remove(id) { + await gql( + `mutation DeletePlace($id: ID!) { deletePlace(id: $id) { id } }`, + { id }, + ); + places.value = places.value.filter((p) => p.id !== id); + } + + return { + places, + loaded, + loading, + error, + fetch, + create, + update, + toggleDone, + remove, + }; +}); diff --git a/vue/src/views/admin/Admin.vue b/vue/src/views/admin/Admin.vue index 63de7b7..14530e9 100644 --- a/vue/src/views/admin/Admin.vue +++ b/vue/src/views/admin/Admin.vue @@ -1,23 +1,147 @@ + + diff --git a/vue/src/views/admin/CreatePlace.vue b/vue/src/views/admin/CreatePlace.vue new file mode 100644 index 0000000..981ed6b --- /dev/null +++ b/vue/src/views/admin/CreatePlace.vue @@ -0,0 +1,99 @@ + + + diff --git a/vue/src/views/admin/Login.vue b/vue/src/views/admin/Login.vue index 0747cb0..69ccd35 100644 --- a/vue/src/views/admin/Login.vue +++ b/vue/src/views/admin/Login.vue @@ -10,11 +10,23 @@ const router = useRouter(); const route = useRoute(); const username = ref(""); const password = ref(""); +const submitting = ref(false); +const errorMsg = ref(""); async function handleLogin() { - await auth.logIn(username.value, password.value); - if (auth.loggedIn && route.query.redirect) { - router.push(route.query.redirect); + if (submitting.value) return; + submitting.value = true; + errorMsg.value = ""; + try { + await auth.logIn(username.value, password.value); + if (auth.loggedIn) { + const dest = route.query.redirect || "/admin"; + router.push(dest); + } else { + errorMsg.value = "Invalid username or password"; + } + } finally { + submitting.value = false; } } @@ -24,27 +36,108 @@ function handleLogout() { + + diff --git a/vue/src/views/home/Collage.vue b/vue/src/views/home/Collage.vue index b2b2c33..2f46867 100644 --- a/vue/src/views/home/Collage.vue +++ b/vue/src/views/home/Collage.vue @@ -1,15 +1,137 @@ + + diff --git a/vue/src/views/home/PlacesTable.vue b/vue/src/views/home/PlacesTable.vue new file mode 100644 index 0000000..d0cf5d8 --- /dev/null +++ b/vue/src/views/home/PlacesTable.vue @@ -0,0 +1,178 @@ + + + + +