diff --git a/api/go.mod b/api/go.mod index 93e4aea7..221bc5b8 100644 --- a/api/go.mod +++ b/api/go.mod @@ -3,22 +3,26 @@ module github.com/viktorstrate/photoview/api go 1.13 require ( - github.com/99designs/gqlgen v0.10.2 - github.com/bep/debounce v1.2.0 + github.com/99designs/gqlgen v0.11.2 + github.com/Microsoft/go-winio v0.4.14 // indirect github.com/disintegration/imaging v1.6.2 - github.com/fatih/color v1.9.0 + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/docker v1.13.1 // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect github.com/go-sql-driver/mysql v1.5.0 github.com/golang-migrate/migrate v3.5.4+incompatible github.com/gorilla/mux v1.7.4 github.com/gorilla/websocket v1.4.1 - github.com/h2non/filetype v1.0.10 + github.com/h2non/filetype v1.0.12 github.com/joho/godotenv v1.3.0 - github.com/lib/pq v1.3.0 github.com/nf/cr2 v0.0.0-20180623103828-4699471a17ed - github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 - github.com/vektah/gqlparser v1.2.0 + github.com/opencontainers/go-digest v1.0.0-rc1 // indirect + github.com/urfave/cli v1.22.3 // indirect + github.com/vektah/gqlparser v1.3.1 + github.com/vektah/gqlparser/v2 v2.0.1 github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 github.com/xor-gate/goexif2 v1.1.0 - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 + golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4 golang.org/x/image v0.0.0-20200119044424-58c23975cae1 ) diff --git a/api/go.sum b/api/go.sum index 4dd758e0..ba45185e 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,36 +1,42 @@ github.com/99designs/gqlgen v0.10.2 h1:FfjCqIWejHDJeLpQTI0neoZo5vDO3sdo5oNCucet3A0= github.com/99designs/gqlgen v0.10.2/go.mod h1:aDB7oabSAyZ4kUHLEySsLxnWrBy3lA0A2gWKU+qoHwI= +github.com/99designs/gqlgen v0.11.2 h1:qatIx2DY7YyaUIBd47ORY3Aj/+pJsPLoL7tyuuISJR0= +github.com/99designs/gqlgen v0.11.2/go.mod h1:RgX5GRRdDWNkh4pBrdzNpNPFVsdoUFY2+adM6nb1N+4= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/agnivade/levenshtein v1.0.3 h1:M5ZnqLOoZR8ygVq0FfkXsNOKzMCk0xRiow0R5+5VkQ0= +github.com/agnivade/levenshtein v1.0.3/go.mod h1:4SFRZbbXWLF4MU1T9Qg0pGgH3Pjs+t6ie5efyrwRJXs= +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/bep/debounce v1.2.0 h1:wXds8Kq8qRfwAOpAxHrJDbCXgC5aHSzgQb/0gKsHQqo= -github.com/bep/debounce v1.2.0/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c h1:TUuUh0Xgj97tLMNtWtNvI9mIV6isjEb9lBMNv+77IGM= +github.com/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= -github.com/dsoprea/go-exif v0.0.0-20200126052615-bd04addaf40f h1:yIPu74TXwq1dxn9edEn4p1si4DW/c/h7sgEJ/zMZNcg= -github.com/dsoprea/go-exif v0.0.0-20200126052615-bd04addaf40f/go.mod h1:lOaOt7+UEppOgyvRy749v3do836U/hw0YVJNjoyPaEs= -github.com/dsoprea/go-exif/v2 v2.0.0-20200126052615-bd04addaf40f h1:LJ4lH4r8MgKEC5HeSNRw81lfVOlAM0xELOOvf712H0o= -github.com/dsoprea/go-exif/v2 v2.0.0-20200126052615-bd04addaf40f/go.mod h1:Lm2lMM2zx8p4a34ZemkaUV95AnMl4ZvLbCUbwOvLC2E= -github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696 h1:VGFnZAcLwPpt1sHlAxml+pGLZz9A2s+K/s1YNhPC91Y= -github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696/go.mod h1:Nm/x2ZUNRW6Fe5C3LxdY1PyZY5wmDv/s5dkPJ/VB3iA= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v1.13.1 h1:IkZjBSIc8hBjLpqeAbeE5mca5mNgeatLHBy3GO78BWo= +github.com/docker/docker v1.13.1/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/go-chi/chi v3.3.2+incompatible h1:uQNcQN3NsV1j4ANsPh42P4ew4t6rnRbJb8frvpp31qQ= github.com/go-chi/chi v3.3.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/go-chi/cors v1.0.0 h1:e6x8k7uWbUwYs+aXDoiUzeQFT6l0cygBYyNhD7/1Tg0= -github.com/go-chi/cors v1.0.0/go.mod h1:K2Yje0VW/SJzxiyMYu6iPQYa7hMjQX2i/F491VChg1I= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang-migrate/migrate v3.5.4+incompatible h1:R7OzwvCJTCgwapPCiX6DyBiu2czIUMDCB118gFTKTUA= github.com/golang-migrate/migrate v3.5.4+incompatible/go.mod h1:IsVUlFN5puWOmXrqjgGUfIRIbU7mr8oNBE2tyERd9Wk= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec h1:lJwO/92dFXWeXOZdoGXgptLmNLwynMSHUmU6besqtiw= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.1 h1:KOwqsTYZdeuMacU7CxjMNYEKeBvLbxW+psodrbcEa3A= github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -42,27 +48,30 @@ github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvK github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/h2non/filetype v1.0.10 h1:z+SJfnL6thYJ9kAST+6nPRXp1lMxnOVbMZHNYHMar0s= github.com/h2non/filetype v1.0.10/go.mod h1:isekKqOuhMj+s/7r3rIeTErIRy4Rub5uBWHfvMusLMU= +github.com/h2non/filetype v1.0.12 h1:yHCsIe0y2cvbDARtJhGBTD2ecvqMSTvlIcph9En/Zao= +github.com/h2non/filetype v1.0.12/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007 h1:reVOUXwnhsYv/8UqjvhrMOu5CNT9UapHFLbQ2JcXsmg= +github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047 h1:zCoDWFD5nrJJVjbXiDZcVhOBSzKn3o9LgRLLMRNuru8= github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/nf/cr2 v0.0.0-20180623103828-4699471a17ed h1:QP63yO3XEt8tJ1DgBsNjbOyBGjy2eHy9ITK4Eisr9rg= github.com/nf/cr2 v0.0.0-20180623103828-4699471a17ed/go.mod h1:HazDB3gS/i//QXMMRmTAV7Ni9gAi4mDNTH2HjZ5aVgU= -github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= -github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= @@ -71,51 +80,83 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.3 h1:FpNT6zq26xNpHZy08emi755QwzLPs6Pukqjlc7RfOMU= +github.com/urfave/cli v1.22.3/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= +github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e h1:+w0Zm/9gaWpEAyDlU1eKOuk5twTjAjuevXqcJJw8hrg= github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= github.com/vektah/gqlparser v1.2.0 h1:ntkSCX7F5ZJKl+HIVnmLaO269MruasVpNiMOjX9kgo0= github.com/vektah/gqlparser v1.2.0/go.mod h1:bkVf0FX+Stjg/MHnm8mEyubuaArhNEqfQhF+OTiAL74= -github.com/viktorstrate/photoview v0.0.0-20200119220544-691e4c7dc433 h1:n6jGnDctC9HI7B1rnc5ATQPYaaxQaJtS8bI6oI0QV34= +github.com/vektah/gqlparser v1.3.1 h1:8b0IcD3qZKWJQHSzynbDlrtP3IxVydZ2DZepCGofqfU= +github.com/vektah/gqlparser v1.3.1/go.mod h1:bkVf0FX+Stjg/MHnm8mEyubuaArhNEqfQhF+OTiAL74= +github.com/vektah/gqlparser/v2 v2.0.1 h1:xgl5abVnsd4hkN9rk65OJID9bfcLSMuTaTcZj777q1o= +github.com/vektah/gqlparser/v2 v2.0.1/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 h1:3UeQBvD0TFrlVjOeLOBz+CPAI8dnbqNSVwUwRrkp7vQ= github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0/go.mod h1:IXCdmsXIht47RaVFLEdVnh1t+pgYtTAhQGj73kz+2DM= github.com/xor-gate/goexif2 v1.1.0 h1:OvTZ5iEvsDhRWFjV5xY3wT7uHFna28nSSP7ucau+cXQ= github.com/xor-gate/goexif2 v1.1.0/go.mod h1:eRjn3VSkAwpNpxEx/CGmd0zg0JFGL3akrSMxnJ581AY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4 h1:QmwruyY+bKbDDL0BaglrbZABEali68eoMFhTZpCjYVA= +golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200119044424-58c23975cae1 h1:5h3ngYt7+vXCDZCup/HkCQgW5XwmSvR/nA2JmJ0RErg= golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd h1:oMEQDWVXVNpceQoVd1JN3CQ7LYJJzs5qWqZIUcxXHHw= golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589 h1:rjUrONFu4kLchcZTfp3/96bR8bW8dIa8uz3cR5n0cgM= +golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k= diff --git a/api/graphql/generated.go b/api/graphql/generated.go index 966dc9ea..d53ba484 100644 --- a/api/graphql/generated.go +++ b/api/graphql/generated.go @@ -15,8 +15,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" "github.com/viktorstrate/photoview/api/graphql/models" ) @@ -967,51 +967,45 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } -func (e *executableSchema) Query(ctx context.Context, op *ast.OperationDefinition) *graphql.Response { - ec := executionContext{graphql.GetRequestContext(ctx), e} +func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { + rc := graphql.GetOperationContext(ctx) + ec := executionContext{rc, e} + first := true + + switch rc.Operation.Operation { + case ast.Query: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + data := ec._Query(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + case ast.Mutation: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + data := ec._Mutation(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + case ast.Subscription: + next := ec._Subscription(ctx, rc.Operation.SelectionSet) - buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte { - data := ec._Query(ctx, op.SelectionSet) var buf bytes.Buffer - data.MarshalGQL(&buf) - return buf.Bytes() - }) - - return &graphql.Response{ - Data: buf, - Errors: ec.Errors, - Extensions: ec.Extensions, - } -} - -func (e *executableSchema) Mutation(ctx context.Context, op *ast.OperationDefinition) *graphql.Response { - ec := executionContext{graphql.GetRequestContext(ctx), e} - - buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte { - data := ec._Mutation(ctx, op.SelectionSet) - var buf bytes.Buffer - data.MarshalGQL(&buf) - return buf.Bytes() - }) - - return &graphql.Response{ - Data: buf, - Errors: ec.Errors, - Extensions: ec.Extensions, - } -} - -func (e *executableSchema) Subscription(ctx context.Context, op *ast.OperationDefinition) func() *graphql.Response { - ec := executionContext{graphql.GetRequestContext(ctx), e} - - next := ec._Subscription(ctx, op.SelectionSet) - if ec.Errors != nil { - return graphql.OneShot(&graphql.Response{Data: []byte("null"), Errors: ec.Errors}) - } - - var buf bytes.Buffer - return func() *graphql.Response { - buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte { + return func(ctx context.Context) *graphql.Response { buf.Reset() data := next() @@ -1019,23 +1013,19 @@ func (e *executableSchema) Subscription(ctx context.Context, op *ast.OperationDe return nil } data.MarshalGQL(&buf) - return buf.Bytes() - }) - if buf == nil { - return nil + return &graphql.Response{ + Data: buf.Bytes(), + } } - return &graphql.Response{ - Data: buf, - Errors: ec.Errors, - Extensions: ec.Extensions, - } + default: + return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) } } type executionContext struct { - *graphql.RequestContext + *graphql.OperationContext *executableSchema } @@ -1053,7 +1043,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil } -var parsedSchema = gqlparser.MustLoadSchema( +var sources = []*ast.Source{ &ast.Source{Name: "graphql/schema.graphql", Input: `directive @isAdmin on FIELD_DEFINITION scalar Time @@ -1293,8 +1283,9 @@ type SearchResult { albums: [Album!]! photos: [Photo!]! } -`}, -) +`, BuiltIn: false}, +} +var parsedSchema = gqlparser.MustLoadSchema(sources...) // endregion ************************** generated!.gotpl ************************** @@ -1785,22 +1776,20 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Album_id(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID(), nil @@ -1810,34 +1799,31 @@ func (ec *executionContext) _Album_id(ctx context.Context, field graphql.Collect return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Album_title(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Title, nil @@ -1847,41 +1833,38 @@ func (ec *executionContext) _Album_title(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Album_photos(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Album_photos_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Album().Photos(rctx, obj, args["filter"].(*models.Filter)) @@ -1891,41 +1874,38 @@ func (ec *executionContext) _Album_photos(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.Photo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNPhoto2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Album_subAlbums(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Album_subAlbums_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Album().SubAlbums(rctx, obj, args["filter"].(*models.Filter)) @@ -1935,34 +1915,31 @@ func (ec *executionContext) _Album_subAlbums(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.Album) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Album_parentAlbum(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Album().ParentAlbum(rctx, obj) @@ -1975,28 +1952,25 @@ func (ec *executionContext) _Album_parentAlbum(ctx context.Context, field graphq return graphql.Null } res := resTmp.(*models.Album) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOAlbum2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res) } func (ec *executionContext) _Album_owner(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Album().Owner(rctx, obj) @@ -2006,34 +1980,31 @@ func (ec *executionContext) _Album_owner(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.User) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNUser2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _Album_filePath(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.FilePath(), nil @@ -2043,34 +2014,31 @@ func (ec *executionContext) _Album_filePath(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Album_thumbnail(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Album().Thumbnail(rctx, obj) @@ -2083,28 +2051,25 @@ func (ec *executionContext) _Album_thumbnail(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(*models.Photo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOPhoto2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhoto(ctx, field.Selections, res) } func (ec *executionContext) _Album_path(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Album().Path(rctx, obj) @@ -2114,34 +2079,31 @@ func (ec *executionContext) _Album_path(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.Album) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Album_shares(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Album", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Album().Shares(rctx, obj) @@ -2154,28 +2116,25 @@ func (ec *executionContext) _Album_shares(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.([]*models.ShareToken) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOShareToken2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res) } func (ec *executionContext) _AuthorizeResult_success(ctx context.Context, field graphql.CollectedField, obj *models.AuthorizeResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "AuthorizeResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Success, nil @@ -2185,34 +2144,31 @@ func (ec *executionContext) _AuthorizeResult_success(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _AuthorizeResult_status(ctx context.Context, field graphql.CollectedField, obj *models.AuthorizeResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "AuthorizeResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Status, nil @@ -2222,34 +2178,31 @@ func (ec *executionContext) _AuthorizeResult_status(ctx context.Context, field g return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _AuthorizeResult_token(ctx context.Context, field graphql.CollectedField, obj *models.AuthorizeResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "AuthorizeResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Token, nil @@ -2262,35 +2215,32 @@ func (ec *executionContext) _AuthorizeResult_token(ctx context.Context, field gr return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_authorizeUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_authorizeUser_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().AuthorizeUser(rctx, args["username"].(string), args["password"].(string)) @@ -2300,41 +2250,38 @@ func (ec *executionContext) _Mutation_authorizeUser(ctx context.Context, field g return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.AuthorizeResult) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNAuthorizeResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_registerUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_registerUser_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().RegisterUser(rctx, args["username"].(string), args["password"].(string), args["rootPath"].(string)) @@ -2344,41 +2291,38 @@ func (ec *executionContext) _Mutation_registerUser(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.AuthorizeResult) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNAuthorizeResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_initialSetupWizard(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_initialSetupWizard_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().InitialSetupWizard(rctx, args["username"].(string), args["password"].(string), args["rootPath"].(string)) @@ -2391,28 +2335,25 @@ func (ec *executionContext) _Mutation_initialSetupWizard(ctx context.Context, fi return graphql.Null } res := resTmp.(*models.AuthorizeResult) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOAuthorizeResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_scanAll(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -2442,41 +2383,38 @@ func (ec *executionContext) _Mutation_scanAll(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.ScannerResult) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNScannerResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐScannerResult(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_scanUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_scanUser_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().ScanUser(rctx, args["userId"].(int)) @@ -2486,41 +2424,38 @@ func (ec *executionContext) _Mutation_scanUser(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.ScannerResult) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNScannerResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐScannerResult(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_shareAlbum(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_shareAlbum_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().ShareAlbum(rctx, args["albumId"].(int), args["expire"].(*time.Time), args["password"].(*string)) @@ -2533,35 +2468,32 @@ func (ec *executionContext) _Mutation_shareAlbum(ctx context.Context, field grap return graphql.Null } res := resTmp.(*models.ShareToken) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOShareToken2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_sharePhoto(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_sharePhoto_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().SharePhoto(rctx, args["photoId"].(int), args["expire"].(*time.Time), args["password"].(*string)) @@ -2574,35 +2506,32 @@ func (ec *executionContext) _Mutation_sharePhoto(ctx context.Context, field grap return graphql.Null } res := resTmp.(*models.ShareToken) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOShareToken2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_deleteShareToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_deleteShareToken_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().DeleteShareToken(rctx, args["token"].(string)) @@ -2615,35 +2544,32 @@ func (ec *executionContext) _Mutation_deleteShareToken(ctx context.Context, fiel return graphql.Null } res := resTmp.(*models.ShareToken) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOShareToken2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_updateUser_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -2676,35 +2602,32 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap return graphql.Null } res := resTmp.(*models.User) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOUser2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_createUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_createUser_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -2737,35 +2660,32 @@ func (ec *executionContext) _Mutation_createUser(ctx context.Context, field grap return graphql.Null } res := resTmp.(*models.User) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOUser2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_deleteUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_deleteUser_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -2798,28 +2718,25 @@ func (ec *executionContext) _Mutation_deleteUser(ctx context.Context, field grap return graphql.Null } res := resTmp.(*models.User) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOUser2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _Notification_key(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Notification", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -2829,34 +2746,31 @@ func (ec *executionContext) _Notification_key(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Notification_type(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Notification", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -2866,34 +2780,31 @@ func (ec *executionContext) _Notification_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(models.NotificationType) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNNotificationType2githubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐNotificationType(ctx, field.Selections, res) } func (ec *executionContext) _Notification_header(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Notification", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Header, nil @@ -2903,34 +2814,31 @@ func (ec *executionContext) _Notification_header(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Notification_content(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Notification", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Content, nil @@ -2940,34 +2848,31 @@ func (ec *executionContext) _Notification_content(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Notification_progress(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Notification", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Progress, nil @@ -2980,28 +2885,25 @@ func (ec *executionContext) _Notification_progress(ctx context.Context, field gr return graphql.Null } res := resTmp.(*float64) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) } func (ec *executionContext) _Notification_positive(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Notification", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Positive, nil @@ -3011,34 +2913,31 @@ func (ec *executionContext) _Notification_positive(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Notification_negative(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Notification", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Negative, nil @@ -3048,34 +2947,31 @@ func (ec *executionContext) _Notification_negative(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Notification_timeout(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Notification", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Timeout, nil @@ -3088,28 +2984,25 @@ func (ec *executionContext) _Notification_timeout(ctx context.Context, field gra return graphql.Null } res := resTmp.(*int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } func (ec *executionContext) _Photo_id(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID(), nil @@ -3119,34 +3012,31 @@ func (ec *executionContext) _Photo_id(ctx context.Context, field graphql.Collect return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Photo_title(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Title, nil @@ -3156,34 +3046,31 @@ func (ec *executionContext) _Photo_title(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Photo_path(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Path, nil @@ -3193,34 +3080,31 @@ func (ec *executionContext) _Photo_path(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Photo_thumbnail(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Photo().Thumbnail(rctx, obj) @@ -3230,34 +3114,31 @@ func (ec *executionContext) _Photo_thumbnail(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.PhotoURL) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNPhotoURL2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoURL(ctx, field.Selections, res) } func (ec *executionContext) _Photo_highRes(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Photo().HighRes(rctx, obj) @@ -3267,34 +3148,31 @@ func (ec *executionContext) _Photo_highRes(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.PhotoURL) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNPhotoURL2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoURL(ctx, field.Selections, res) } func (ec *executionContext) _Photo_album(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Photo().Album(rctx, obj) @@ -3304,34 +3182,31 @@ func (ec *executionContext) _Photo_album(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.Album) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNAlbum2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res) } func (ec *executionContext) _Photo_exif(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Photo().Exif(rctx, obj) @@ -3344,28 +3219,25 @@ func (ec *executionContext) _Photo_exif(ctx context.Context, field graphql.Colle return graphql.Null } res := resTmp.(*models.PhotoEXIF) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOPhotoEXIF2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoEXIF(ctx, field.Selections, res) } func (ec *executionContext) _Photo_shares(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Photo().Shares(rctx, obj) @@ -3375,34 +3247,31 @@ func (ec *executionContext) _Photo_shares(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.ShareToken) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNShareToken2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Photo_downloads(ctx context.Context, field graphql.CollectedField, obj *models.Photo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Photo", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Photo().Downloads(rctx, obj) @@ -3412,34 +3281,31 @@ func (ec *executionContext) _Photo_downloads(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.PhotoDownload) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNPhotoDownload2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoDownloadᚄ(ctx, field.Selections, res) } func (ec *executionContext) _PhotoDownload_title(ctx context.Context, field graphql.CollectedField, obj *models.PhotoDownload) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoDownload", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Title, nil @@ -3449,34 +3315,31 @@ func (ec *executionContext) _PhotoDownload_title(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _PhotoDownload_width(ctx context.Context, field graphql.CollectedField, obj *models.PhotoDownload) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoDownload", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Width, nil @@ -3486,34 +3349,31 @@ func (ec *executionContext) _PhotoDownload_width(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _PhotoDownload_height(ctx context.Context, field graphql.CollectedField, obj *models.PhotoDownload) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoDownload", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Height, nil @@ -3523,34 +3383,31 @@ func (ec *executionContext) _PhotoDownload_height(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _PhotoDownload_url(ctx context.Context, field graphql.CollectedField, obj *models.PhotoDownload) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoDownload", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.URL, nil @@ -3560,34 +3417,31 @@ func (ec *executionContext) _PhotoDownload_url(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_id(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID(), nil @@ -3597,34 +3451,31 @@ func (ec *executionContext) _PhotoEXIF_id(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_photo(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Photo(), nil @@ -3637,28 +3488,25 @@ func (ec *executionContext) _PhotoEXIF_photo(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(*models.Photo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOPhoto2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhoto(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_camera(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Camera, nil @@ -3671,28 +3519,25 @@ func (ec *executionContext) _PhotoEXIF_camera(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_maker(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Maker, nil @@ -3705,28 +3550,25 @@ func (ec *executionContext) _PhotoEXIF_maker(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_lens(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Lens, nil @@ -3739,28 +3581,25 @@ func (ec *executionContext) _PhotoEXIF_lens(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_dateShot(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DateShot, nil @@ -3773,28 +3612,25 @@ func (ec *executionContext) _PhotoEXIF_dateShot(ctx context.Context, field graph return graphql.Null } res := resTmp.(*time.Time) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_exposure(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Exposure, nil @@ -3807,28 +3643,25 @@ func (ec *executionContext) _PhotoEXIF_exposure(ctx context.Context, field graph return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_aperture(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Aperture, nil @@ -3841,28 +3674,25 @@ func (ec *executionContext) _PhotoEXIF_aperture(ctx context.Context, field graph return graphql.Null } res := resTmp.(*float64) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_iso(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Iso, nil @@ -3875,28 +3705,25 @@ func (ec *executionContext) _PhotoEXIF_iso(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_focalLength(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.FocalLength, nil @@ -3909,28 +3736,25 @@ func (ec *executionContext) _PhotoEXIF_focalLength(ctx context.Context, field gr return graphql.Null } res := resTmp.(*float64) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_flash(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Flash, nil @@ -3943,28 +3767,25 @@ func (ec *executionContext) _PhotoEXIF_flash(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _PhotoEXIF_exposureProgram(ctx context.Context, field graphql.CollectedField, obj *models.PhotoEXIF) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoEXIF", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ExposureProgram, nil @@ -3977,28 +3798,25 @@ func (ec *executionContext) _PhotoEXIF_exposureProgram(ctx context.Context, fiel return graphql.Null } res := resTmp.(*int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } func (ec *executionContext) _PhotoURL_url(ctx context.Context, field graphql.CollectedField, obj *models.PhotoURL) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoURL", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.URL(), nil @@ -4008,34 +3826,31 @@ func (ec *executionContext) _PhotoURL_url(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _PhotoURL_width(ctx context.Context, field graphql.CollectedField, obj *models.PhotoURL) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoURL", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Width, nil @@ -4045,34 +3860,31 @@ func (ec *executionContext) _PhotoURL_width(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _PhotoURL_height(ctx context.Context, field graphql.CollectedField, obj *models.PhotoURL) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PhotoURL", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Height, nil @@ -4082,34 +3894,31 @@ func (ec *executionContext) _PhotoURL_height(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Query_siteInfo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().SiteInfo(rctx) @@ -4119,41 +3928,38 @@ func (ec *executionContext) _Query_siteInfo(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.SiteInfo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNSiteInfo2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSiteInfo(ctx, field.Selections, res) } func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_user_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -4183,34 +3989,31 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.User) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNUser2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUserᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Query_myUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().MyUser(rctx) @@ -4220,41 +4023,38 @@ func (ec *executionContext) _Query_myUser(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.User) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNUser2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _Query_myAlbums(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_myAlbums_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().MyAlbums(rctx, args["filter"].(*models.Filter), args["onlyRoot"].(*bool), args["showEmpty"].(*bool)) @@ -4264,41 +4064,38 @@ func (ec *executionContext) _Query_myAlbums(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.Album) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Query_album(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_album_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Album(rctx, args["id"].(int)) @@ -4308,41 +4105,38 @@ func (ec *executionContext) _Query_album(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.Album) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNAlbum2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res) } func (ec *executionContext) _Query_myPhotos(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_myPhotos_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().MyPhotos(rctx, args["filter"].(*models.Filter)) @@ -4352,41 +4146,38 @@ func (ec *executionContext) _Query_myPhotos(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.Photo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNPhoto2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Query_photo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_photo_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Photo(rctx, args["id"].(int)) @@ -4396,41 +4187,38 @@ func (ec *executionContext) _Query_photo(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.Photo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNPhoto2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhoto(ctx, field.Selections, res) } func (ec *executionContext) _Query_shareToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_shareToken_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ShareToken(rctx, args["token"].(string), args["password"].(*string)) @@ -4440,41 +4228,38 @@ func (ec *executionContext) _Query_shareToken(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.ShareToken) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNShareToken2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res) } func (ec *executionContext) _Query_search(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_search_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Search(rctx, args["query"].(string), args["limitPhotos"].(*int), args["limitAlbums"].(*int)) @@ -4484,41 +4269,38 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.SearchResult) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNSearchResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSearchResult(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -4531,28 +4313,25 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -4565,28 +4344,25 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _ScannerResult_finished(ctx context.Context, field graphql.CollectedField, obj *models.ScannerResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ScannerResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Finished, nil @@ -4596,34 +4372,31 @@ func (ec *executionContext) _ScannerResult_finished(ctx context.Context, field g return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _ScannerResult_success(ctx context.Context, field graphql.CollectedField, obj *models.ScannerResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ScannerResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Success, nil @@ -4633,34 +4406,31 @@ func (ec *executionContext) _ScannerResult_success(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _ScannerResult_progress(ctx context.Context, field graphql.CollectedField, obj *models.ScannerResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ScannerResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Progress, nil @@ -4673,28 +4443,25 @@ func (ec *executionContext) _ScannerResult_progress(ctx context.Context, field g return graphql.Null } res := resTmp.(*float64) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) } func (ec *executionContext) _ScannerResult_message(ctx context.Context, field graphql.CollectedField, obj *models.ScannerResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ScannerResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Message, nil @@ -4707,28 +4474,25 @@ func (ec *executionContext) _ScannerResult_message(ctx context.Context, field gr return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _SearchResult_query(ctx context.Context, field graphql.CollectedField, obj *models.SearchResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "SearchResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Query, nil @@ -4738,34 +4502,31 @@ func (ec *executionContext) _SearchResult_query(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _SearchResult_albums(ctx context.Context, field graphql.CollectedField, obj *models.SearchResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "SearchResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Albums, nil @@ -4775,34 +4536,31 @@ func (ec *executionContext) _SearchResult_albums(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.Album) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res) } func (ec *executionContext) _SearchResult_photos(ctx context.Context, field graphql.CollectedField, obj *models.SearchResult) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "SearchResult", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Photos, nil @@ -4812,34 +4570,31 @@ func (ec *executionContext) _SearchResult_photos(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.Photo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNPhoto2ᚕᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoᚄ(ctx, field.Selections, res) } func (ec *executionContext) _ShareToken_id(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ShareToken", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID(), nil @@ -4849,34 +4604,31 @@ func (ec *executionContext) _ShareToken_id(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _ShareToken_token(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ShareToken", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Token(), nil @@ -4886,34 +4638,31 @@ func (ec *executionContext) _ShareToken_token(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _ShareToken_owner(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ShareToken", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.ShareToken().Owner(rctx, obj) @@ -4923,34 +4672,31 @@ func (ec *executionContext) _ShareToken_owner(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.User) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNUser2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _ShareToken_expire(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ShareToken", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Expire, nil @@ -4963,28 +4709,25 @@ func (ec *executionContext) _ShareToken_expire(ctx context.Context, field graphq return graphql.Null } res := resTmp.(*time.Time) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _ShareToken_album(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ShareToken", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.ShareToken().Album(rctx, obj) @@ -4997,28 +4740,25 @@ func (ec *executionContext) _ShareToken_album(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*models.Album) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOAlbum2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res) } func (ec *executionContext) _ShareToken_photo(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ShareToken", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.ShareToken().Photo(rctx, obj) @@ -5031,28 +4771,25 @@ func (ec *executionContext) _ShareToken_photo(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*models.Photo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOPhoto2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhoto(ctx, field.Selections, res) } func (ec *executionContext) _SiteInfo_initialSetup(ctx context.Context, field graphql.CollectedField, obj *models.SiteInfo) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "SiteInfo", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InitialSetup, nil @@ -5062,34 +4799,31 @@ func (ec *executionContext) _SiteInfo_initialSetup(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Subscription_notification(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Subscription", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().Notification(rctx) @@ -5099,7 +4833,7 @@ func (ec *executionContext) _Subscription_notification(ctx context.Context, fiel return nil } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return nil @@ -5120,22 +4854,20 @@ func (ec *executionContext) _Subscription_notification(ctx context.Context, fiel } func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID(), nil @@ -5145,34 +4877,31 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _User_username(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Username, nil @@ -5182,34 +4911,31 @@ func (ec *executionContext) _User_username(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _User_rootPath(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -5239,34 +4965,31 @@ func (ec *executionContext) _User_rootPath(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _User_admin(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Admin, nil @@ -5276,34 +4999,31 @@ func (ec *executionContext) _User_admin(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -5313,34 +5033,31 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -5353,28 +5070,25 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -5384,34 +5098,31 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -5421,34 +5132,31 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -5458,34 +5166,31 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -5498,28 +5203,25 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -5529,34 +5231,31 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -5569,28 +5268,25 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -5600,34 +5296,31 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -5640,28 +5333,25 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -5671,34 +5361,31 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -5708,34 +5395,31 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -5745,34 +5429,31 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -5785,28 +5466,25 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -5816,34 +5494,31 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -5856,28 +5531,25 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -5887,34 +5559,31 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, IsMethod: false, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -5927,28 +5596,25 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -5958,34 +5624,31 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -5995,34 +5658,31 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -6035,28 +5695,25 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -6069,28 +5726,25 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -6100,34 +5754,31 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -6137,34 +5788,31 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !ec.HasError(rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -6177,28 +5825,25 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -6211,35 +5856,32 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -6252,28 +5894,25 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -6286,28 +5925,25 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -6320,35 +5956,32 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -6361,28 +5994,25 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -6395,28 +6025,25 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } - ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, IsMethod: true, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + + ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -6429,8 +6056,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -6485,7 +6111,7 @@ func (ec *executionContext) unmarshalInputFilter(ctx context.Context, obj interf var albumImplementors = []string{"Album"} func (ec *executionContext) _Album(ctx context.Context, sel ast.SelectionSet, obj *models.Album) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, albumImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, albumImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -6611,7 +6237,7 @@ func (ec *executionContext) _Album(ctx context.Context, sel ast.SelectionSet, ob var authorizeResultImplementors = []string{"AuthorizeResult"} func (ec *executionContext) _AuthorizeResult(ctx context.Context, sel ast.SelectionSet, obj *models.AuthorizeResult) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, authorizeResultImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, authorizeResultImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -6645,9 +6271,9 @@ func (ec *executionContext) _AuthorizeResult(ctx context.Context, sel ast.Select var mutationImplementors = []string{"Mutation"} func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, mutationImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Mutation", }) @@ -6705,7 +6331,7 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) var notificationImplementors = []string{"Notification"} func (ec *executionContext) _Notification(ctx context.Context, sel ast.SelectionSet, obj *models.Notification) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, notificationImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, notificationImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -6761,7 +6387,7 @@ func (ec *executionContext) _Notification(ctx context.Context, sel ast.Selection var photoImplementors = []string{"Photo"} func (ec *executionContext) _Photo(ctx context.Context, sel ast.SelectionSet, obj *models.Photo) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, photoImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, photoImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -6879,7 +6505,7 @@ func (ec *executionContext) _Photo(ctx context.Context, sel ast.SelectionSet, ob var photoDownloadImplementors = []string{"PhotoDownload"} func (ec *executionContext) _PhotoDownload(ctx context.Context, sel ast.SelectionSet, obj *models.PhotoDownload) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, photoDownloadImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, photoDownloadImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -6921,7 +6547,7 @@ func (ec *executionContext) _PhotoDownload(ctx context.Context, sel ast.Selectio var photoEXIFImplementors = []string{"PhotoEXIF"} func (ec *executionContext) _PhotoEXIF(ctx context.Context, sel ast.SelectionSet, obj *models.PhotoEXIF) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, photoEXIFImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, photoEXIFImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -6970,7 +6596,7 @@ func (ec *executionContext) _PhotoEXIF(ctx context.Context, sel ast.SelectionSet var photoURLImplementors = []string{"PhotoURL"} func (ec *executionContext) _PhotoURL(ctx context.Context, sel ast.SelectionSet, obj *models.PhotoURL) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, photoURLImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, photoURLImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7007,9 +6633,9 @@ func (ec *executionContext) _PhotoURL(ctx context.Context, sel ast.SelectionSet, var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, queryImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", }) @@ -7163,7 +6789,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr var scannerResultImplementors = []string{"ScannerResult"} func (ec *executionContext) _ScannerResult(ctx context.Context, sel ast.SelectionSet, obj *models.ScannerResult) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, scannerResultImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, scannerResultImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7199,7 +6825,7 @@ func (ec *executionContext) _ScannerResult(ctx context.Context, sel ast.Selectio var searchResultImplementors = []string{"SearchResult"} func (ec *executionContext) _SearchResult(ctx context.Context, sel ast.SelectionSet, obj *models.SearchResult) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, searchResultImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, searchResultImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7236,7 +6862,7 @@ func (ec *executionContext) _SearchResult(ctx context.Context, sel ast.Selection var shareTokenImplementors = []string{"ShareToken"} func (ec *executionContext) _ShareToken(ctx context.Context, sel ast.SelectionSet, obj *models.ShareToken) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, shareTokenImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, shareTokenImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7306,7 +6932,7 @@ func (ec *executionContext) _ShareToken(ctx context.Context, sel ast.SelectionSe var siteInfoImplementors = []string{"SiteInfo"} func (ec *executionContext) _SiteInfo(ctx context.Context, sel ast.SelectionSet, obj *models.SiteInfo) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, siteInfoImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, siteInfoImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7333,8 +6959,8 @@ func (ec *executionContext) _SiteInfo(ctx context.Context, sel ast.SelectionSet, var subscriptionImplementors = []string{"Subscription"} func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, subscriptionImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Subscription", }) if len(fields) != 1 { @@ -7353,7 +6979,7 @@ func (ec *executionContext) _Subscription(ctx context.Context, sel ast.Selection var userImplementors = []string{"User"} func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *models.User) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, userImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7395,7 +7021,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj var __DirectiveImplementors = []string{"__Directive"} func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, __DirectiveImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7434,7 +7060,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS var __EnumValueImplementors = []string{"__EnumValue"} func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, __EnumValueImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7470,7 +7096,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS var __FieldImplementors = []string{"__Field"} func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, __FieldImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7516,7 +7142,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, var __InputValueImplementors = []string{"__InputValue"} func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, __InputValueImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7552,7 +7178,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection var __SchemaImplementors = []string{"__Schema"} func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, __SchemaImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7593,7 +7219,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, var __TypeImplementors = []string{"__Type"} func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { - fields := graphql.CollectFields(ec.RequestContext, sel, __TypeImplementors) + fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -7650,11 +7276,11 @@ func (ec *executionContext) marshalNAlbum2ᚕᚖgithubᚗcomᚋviktorstrateᚋph } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -7680,7 +7306,7 @@ func (ec *executionContext) marshalNAlbum2ᚕᚖgithubᚗcomᚋviktorstrateᚋph func (ec *executionContext) marshalNAlbum2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx context.Context, sel ast.SelectionSet, v *models.Album) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7694,7 +7320,7 @@ func (ec *executionContext) marshalNAuthorizeResult2githubᚗcomᚋviktorstrate func (ec *executionContext) marshalNAuthorizeResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx context.Context, sel ast.SelectionSet, v *models.AuthorizeResult) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7709,7 +7335,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -7723,7 +7349,7 @@ func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{} func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalInt(v) if res == graphql.Null { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -7736,7 +7362,7 @@ func (ec *executionContext) marshalNNotification2githubᚗcomᚋviktorstrateᚋp func (ec *executionContext) marshalNNotification2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐNotification(ctx context.Context, sel ast.SelectionSet, v *models.Notification) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7766,11 +7392,11 @@ func (ec *executionContext) marshalNPhoto2ᚕᚖgithubᚗcomᚋviktorstrateᚋph } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -7796,7 +7422,7 @@ func (ec *executionContext) marshalNPhoto2ᚕᚖgithubᚗcomᚋviktorstrateᚋph func (ec *executionContext) marshalNPhoto2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhoto(ctx context.Context, sel ast.SelectionSet, v *models.Photo) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7817,11 +7443,11 @@ func (ec *executionContext) marshalNPhotoDownload2ᚕᚖgithubᚗcomᚋviktorstr } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -7847,7 +7473,7 @@ func (ec *executionContext) marshalNPhotoDownload2ᚕᚖgithubᚗcomᚋviktorstr func (ec *executionContext) marshalNPhotoDownload2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoDownload(ctx context.Context, sel ast.SelectionSet, v *models.PhotoDownload) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7861,7 +7487,7 @@ func (ec *executionContext) marshalNPhotoURL2githubᚗcomᚋviktorstrateᚋphoto func (ec *executionContext) marshalNPhotoURL2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPhotoURL(ctx context.Context, sel ast.SelectionSet, v *models.PhotoURL) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7875,7 +7501,7 @@ func (ec *executionContext) marshalNScannerResult2githubᚗcomᚋviktorstrateᚋ func (ec *executionContext) marshalNScannerResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐScannerResult(ctx context.Context, sel ast.SelectionSet, v *models.ScannerResult) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7889,7 +7515,7 @@ func (ec *executionContext) marshalNSearchResult2githubᚗcomᚋviktorstrateᚋp func (ec *executionContext) marshalNSearchResult2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSearchResult(ctx context.Context, sel ast.SelectionSet, v *models.SearchResult) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7910,11 +7536,11 @@ func (ec *executionContext) marshalNShareToken2ᚕᚖgithubᚗcomᚋviktorstrate } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -7940,7 +7566,7 @@ func (ec *executionContext) marshalNShareToken2ᚕᚖgithubᚗcomᚋviktorstrate func (ec *executionContext) marshalNShareToken2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx context.Context, sel ast.SelectionSet, v *models.ShareToken) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7954,7 +7580,7 @@ func (ec *executionContext) marshalNSiteInfo2githubᚗcomᚋviktorstrateᚋphoto func (ec *executionContext) marshalNSiteInfo2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSiteInfo(ctx context.Context, sel ast.SelectionSet, v *models.SiteInfo) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -7969,7 +7595,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -7989,11 +7615,11 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋviktorstrateᚋpho } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8019,7 +7645,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋviktorstrateᚋpho func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋviktorstrateᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx context.Context, sel ast.SelectionSet, v *models.User) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -8040,11 +7666,11 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8075,7 +7701,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -8111,11 +7737,11 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8160,11 +7786,11 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8201,11 +7827,11 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8231,7 +7857,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -8246,7 +7872,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !ec.HasError(graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -8418,11 +8044,11 @@ func (ec *executionContext) marshalOShareToken2ᚕᚖgithubᚗcomᚋviktorstrate } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8522,11 +8148,11 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8562,11 +8188,11 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8602,11 +8228,11 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -8657,11 +8283,11 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/api/scanner/album_scanner.go b/api/scanner/album_scanner.go index ca480725..6981260c 100644 --- a/api/scanner/album_scanner.go +++ b/api/scanner/album_scanner.go @@ -12,7 +12,6 @@ import ( "strings" "time" - "github.com/bep/debounce" "github.com/h2non/filetype" "github.com/viktorstrate/photoview/api/graphql/models" "github.com/viktorstrate/photoview/api/graphql/notification" @@ -82,7 +81,7 @@ func scan(database *sql.DB, user *models.User) { notifyKey := utils.GenerateToken() processKey := utils.GenerateToken() - scanNotifyDebounce := debounce.New(1 * time.Second) + notifyThrottle := utils.NewThrottle(500 * time.Millisecond) timeout := 3000 notification.BroadcastNotification(&models.Notification{ @@ -181,7 +180,7 @@ func scan(database *sql.DB, user *models.User) { if isNewPhoto { newPhotos.PushBack(photo) - scanNotifyDebounce(func() { + notifyThrottle.Trigger(func() { notification.BroadcastNotification(&models.Notification{ Key: processKey, Type: models.NotificationTypeMessage, @@ -332,7 +331,7 @@ func isPathImage(path string, cache *scanner_cache) bool { func processUnprocessedPhotos(database *sql.DB, user *models.User, notifyKey string) error { processKey := utils.GenerateToken() - processNotifyDebounce := debounce.New(500 * time.Microsecond) + notifyThrottle := utils.NewThrottle(500 * time.Millisecond) rows, err := database.Query(` SELECT photo.* FROM photo JOIN album ON photo.album_id = album.album_id @@ -366,7 +365,7 @@ func processUnprocessedPhotos(database *sql.DB, user *models.User, notifyKey str continue } - processNotifyDebounce(func() { + notifyThrottle.Trigger(func() { var progress float64 = float64(count) / float64(len(photosToProcess)) * 100.0 notification.BroadcastNotification(&models.Notification{ diff --git a/api/utils/Throttle.go b/api/utils/Throttle.go new file mode 100644 index 00000000..a0850d98 --- /dev/null +++ b/api/utils/Throttle.go @@ -0,0 +1,22 @@ +package utils + +import "time" + +type Throttle struct { + interval time.Duration + lastAction time.Time +} + +func NewThrottle(interval time.Duration) Throttle { + return Throttle{ + interval: interval, + lastAction: time.Unix(0, 0), + } +} + +func (t *Throttle) Trigger(action func()) { + if time.Now().After(t.lastAction.Add(t.interval)) { + t.lastAction = time.Now() + action() + } +}