From 4ea3efec5f68b30657be48b92f6101c6356a234f Mon Sep 17 00:00:00 2001 From: UnAfraid Date: Mon, 30 Sep 2024 21:33:37 +0300 Subject: [PATCH] Updated dependencies --- go.mod | 28 +- go.sum | 69 +- pkg/api/internal/resolver/generated.go | 858 +++++++++++++++++++------ pkg/api/router.go | 2 +- 4 files changed, 710 insertions(+), 247 deletions(-) diff --git a/go.mod b/go.mod index 85a684f..3e02b38 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/UnAfraid/wg-ui go 1.23 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.54 github.com/UnAfraid/searchindex v0.0.0-20230707222905-bbf56d7105a6 github.com/go-chi/chi/v5 v5.1.0 github.com/golang-jwt/jwt/v5 v5.2.1 @@ -11,19 +11,19 @@ require ( github.com/gorilla/websocket v1.5.3 github.com/graph-gophers/dataloader/v7 v7.1.0 github.com/kelseyhightower/envconfig v1.4.0 - github.com/rs/cors v1.11.0 + github.com/rs/cors v1.11.1 github.com/sirupsen/logrus v1.9.3 - github.com/vektah/gqlparser/v2 v2.5.16 - github.com/vishvananda/netlink v1.2.1-beta.2 - go.etcd.io/bbolt v1.3.10 - go.uber.org/automaxprocs v1.5.3 - golang.org/x/crypto v0.26.0 + github.com/vektah/gqlparser/v2 v2.5.17 + github.com/vishvananda/netlink v1.3.0 + go.etcd.io/bbolt v1.3.11 + go.uber.org/automaxprocs v1.6.0 + golang.org/x/crypto v0.27.0 golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 ) require ( - github.com/agnivade/levenshtein v1.1.1 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/agnivade/levenshtein v1.2.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect @@ -39,12 +39,12 @@ require ( github.com/urfave/cli/v2 v2.27.4 // indirect github.com/vishvananda/netns v0.0.4 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect - golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.28.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/text v0.17.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.25.0 // indirect golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index cd642d8..eb5a549 100644 --- a/go.sum +++ b/go.sum @@ -1,25 +1,25 @@ -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= -github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE= -github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk= +github.com/99designs/gqlgen v0.17.54 h1:AsF49k/7RJlwA00RQYsYN0T8cQuaosnV/7G1dHC3Uh8= +github.com/99designs/gqlgen v0.17.54/go.mod h1:77/+pVe6zlTsz++oUg2m8VLgzdUPHxjoAG3BxI5y8Rc= +github.com/PuerkitoBio/goquery v1.9.3 h1:mpJr/ikUA9/GNJB/DBZcGeFDXUtosHRyRrwh7KGdTG0= +github.com/PuerkitoBio/goquery v1.9.3/go.mod h1:1ndLHPdTz+DyQPICCWYlYQMPl0oXZj0G6D4LCYA6u4U= github.com/UnAfraid/searchindex v0.0.0-20230707222905-bbf56d7105a6 h1:QApMS8Er+YY4CELLYfWngiWiT37O06Q0/beviYeIHbA= github.com/UnAfraid/searchindex v0.0.0-20230707222905-bbf56d7105a6/go.mod h1:i0ERwbL7iSvPKgEXjW8ooFCNMpO/fXq/btcH5f+1sEk= -github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= -github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/agnivade/levenshtein v1.2.0 h1:U9L4IOT0Y3i0TIlUIDJ7rVUziKi/zPbrJGaFrtYH3SY= +github.com/agnivade/levenshtein v1.2.0/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss= github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= 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.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= -github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo= +github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= @@ -60,8 +60,8 @@ 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/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= -github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= @@ -76,36 +76,35 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8= github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= -github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs= -github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vektah/gqlparser/v2 v2.5.17 h1:9At7WblLV7/36nulgekUgIaqHZWn5hxqluxrxGUhOmI= +github.com/vektah/gqlparser/v2 v2.5.17/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vishvananda/netlink v1.3.0 h1:X7l42GfcV4S6E4vHTsw48qbrV+9PVojNfIhZcwQdrZk= +github.com/vishvananda/netlink v1.3.0/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs= github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= -go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= -go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= -go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= -go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= +go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= +golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 h1:/jFs0duh4rdb8uIfPMv78iAJGcPKDeqAFnaLBropIC4= golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA= golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 h1:CawjfCvYQH2OU3/TnxLx97WDSUDRABfT18pCOYwc2GE= diff --git a/pkg/api/internal/resolver/generated.go b/pkg/api/internal/resolver/generated.go index ef5f722..6feb195 100644 --- a/pkg/api/internal/resolver/generated.go +++ b/pkg/api/internal/resolver/generated.go @@ -2231,341 +2231,733 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) func (ec *executionContext) field_Mutation_createPeer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.CreatePeerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNCreatePeerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐCreatePeerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_createPeer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_createPeer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.CreatePeerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.CreatePeerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNCreatePeerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐCreatePeerInput(ctx, tmp) + } + + var zeroVal model.CreatePeerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_createServer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.CreateServerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNCreateServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐCreateServerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_createServer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_createServer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.CreateServerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.CreateServerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNCreateServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐCreateServerInput(ctx, tmp) + } + + var zeroVal model.CreateServerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_createUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.CreateUserInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNCreateUserInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐCreateUserInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_createUser_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_createUser_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.CreateUserInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.CreateUserInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNCreateUserInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐCreateUserInput(ctx, tmp) + } + + var zeroVal model.CreateUserInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_deletePeer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.DeletePeerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNDeletePeerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐDeletePeerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_deletePeer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_deletePeer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.DeletePeerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.DeletePeerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNDeletePeerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐDeletePeerInput(ctx, tmp) + } + + var zeroVal model.DeletePeerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_deleteServer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.DeleteServerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNDeleteServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐDeleteServerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_deleteServer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_deleteServer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.DeleteServerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.DeleteServerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNDeleteServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐDeleteServerInput(ctx, tmp) + } + + var zeroVal model.DeleteServerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_deleteUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.DeleteUserInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNDeleteUserInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐDeleteUserInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_deleteUser_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_deleteUser_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.DeleteUserInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.DeleteUserInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNDeleteUserInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐDeleteUserInput(ctx, tmp) + } + + var zeroVal model.DeleteUserInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_generateWireguardKey_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.GenerateWireguardKeyInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNGenerateWireguardKeyInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐGenerateWireguardKeyInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_generateWireguardKey_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_generateWireguardKey_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.GenerateWireguardKeyInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.GenerateWireguardKeyInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNGenerateWireguardKeyInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐGenerateWireguardKeyInput(ctx, tmp) + } + + var zeroVal model.GenerateWireguardKeyInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_importForeignServer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.ImportForeignServerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNImportForeignServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐImportForeignServerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_importForeignServer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_importForeignServer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.ImportForeignServerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.ImportForeignServerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNImportForeignServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐImportForeignServerInput(ctx, tmp) + } + + var zeroVal model.ImportForeignServerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_signIn_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.SignInInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNSignInInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐSignInInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_signIn_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_signIn_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.SignInInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.SignInInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNSignInInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐSignInInput(ctx, tmp) + } + + var zeroVal model.SignInInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_startServer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.StartServerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNStartServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐStartServerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_startServer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_startServer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.StartServerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.StartServerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNStartServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐStartServerInput(ctx, tmp) + } + + var zeroVal model.StartServerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_stopServer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.StopServerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNStopServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐStopServerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_stopServer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_stopServer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.StopServerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.StopServerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNStopServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐStopServerInput(ctx, tmp) + } + + var zeroVal model.StopServerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_updatePeer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.UpdatePeerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNUpdatePeerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐUpdatePeerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_updatePeer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_updatePeer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.UpdatePeerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.UpdatePeerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNUpdatePeerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐUpdatePeerInput(ctx, tmp) + } + + var zeroVal model.UpdatePeerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_updateServer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.UpdateServerInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNUpdateServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐUpdateServerInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_updateServer_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_updateServer_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.UpdateServerInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.UpdateServerInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNUpdateServerInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐUpdateServerInput(ctx, tmp) + } + + var zeroVal model.UpdateServerInput + return zeroVal, nil +} func (ec *executionContext) field_Mutation_updateUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.UpdateUserInput - if tmp, ok := rawArgs["input"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNUpdateUserInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐUpdateUserInput(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Mutation_updateUser_argsInput(ctx, rawArgs) + if err != nil { + return nil, err } args["input"] = arg0 return args, nil } +func (ec *executionContext) field_Mutation_updateUser_argsInput( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.UpdateUserInput, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["input"] + if !ok { + var zeroVal model.UpdateUserInput + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNUpdateUserInput2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐUpdateUserInput(ctx, tmp) + } + + var zeroVal model.UpdateUserInput + return zeroVal, nil +} func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query___type_argsName(ctx, rawArgs) + if err != nil { + return nil, err } args["name"] = arg0 return args, nil } +func (ec *executionContext) field_Query___type_argsName( + ctx context.Context, + rawArgs map[string]interface{}, +) (string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["name"] + if !ok { + var zeroVal string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + if tmp, ok := rawArgs["name"]; ok { + return ec.unmarshalNString2string(ctx, tmp) + } + + var zeroVal string + return zeroVal, nil +} func (ec *executionContext) field_Query_node_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 model.ID - if tmp, ok := rawArgs["id"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - arg0, err = ec.unmarshalNID2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐID(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_node_argsID(ctx, rawArgs) + if err != nil { + return nil, err } args["id"] = arg0 return args, nil } +func (ec *executionContext) field_Query_node_argsID( + ctx context.Context, + rawArgs map[string]interface{}, +) (model.ID, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["id"] + if !ok { + var zeroVal model.ID + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) + if tmp, ok := rawArgs["id"]; ok { + return ec.unmarshalNID2githubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐID(ctx, tmp) + } + + var zeroVal model.ID + return zeroVal, nil +} func (ec *executionContext) field_Query_nodes_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 []*model.ID - if tmp, ok := rawArgs["ids"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ids")) - arg0, err = ec.unmarshalNID2ᚕᚖgithubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐIDᚄ(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_nodes_argsIds(ctx, rawArgs) + if err != nil { + return nil, err } args["ids"] = arg0 return args, nil } +func (ec *executionContext) field_Query_nodes_argsIds( + ctx context.Context, + rawArgs map[string]interface{}, +) ([]*model.ID, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["ids"] + if !ok { + var zeroVal []*model.ID + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("ids")) + if tmp, ok := rawArgs["ids"]; ok { + return ec.unmarshalNID2ᚕᚖgithubᚗcomᚋUnAfraidᚋwgᚑuiᚋpkgᚋapiᚋinternalᚋmodelᚐIDᚄ(ctx, tmp) + } + + var zeroVal []*model.ID + return zeroVal, nil +} func (ec *executionContext) field_Query_peers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["query"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_peers_argsQuery(ctx, rawArgs) + if err != nil { + return nil, err } args["query"] = arg0 return args, nil } +func (ec *executionContext) field_Query_peers_argsQuery( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["query"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) + if tmp, ok := rawArgs["query"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} func (ec *executionContext) field_Query_servers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["query"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_servers_argsQuery(ctx, rawArgs) + if err != nil { + return nil, err } args["query"] = arg0 - var arg1 *bool - if tmp, ok := rawArgs["enabled"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) - arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) - if err != nil { - return nil, err - } + arg1, err := ec.field_Query_servers_argsEnabled(ctx, rawArgs) + if err != nil { + return nil, err } args["enabled"] = arg1 return args, nil } +func (ec *executionContext) field_Query_servers_argsQuery( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["query"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) + if tmp, ok := rawArgs["query"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} + +func (ec *executionContext) field_Query_servers_argsEnabled( + ctx context.Context, + rawArgs map[string]interface{}, +) (*bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["enabled"] + if !ok { + var zeroVal *bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) + if tmp, ok := rawArgs["enabled"]; ok { + return ec.unmarshalOBoolean2ᚖbool(ctx, tmp) + } + + var zeroVal *bool + return zeroVal, nil +} func (ec *executionContext) field_Query_users_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["query"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) - arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field_Query_users_argsQuery(ctx, rawArgs) + if err != nil { + return nil, err } args["query"] = arg0 return args, nil } +func (ec *executionContext) field_Query_users_argsQuery( + ctx context.Context, + rawArgs map[string]interface{}, +) (*string, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["query"] + if !ok { + var zeroVal *string + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) + if tmp, ok := rawArgs["query"]; ok { + return ec.unmarshalOString2ᚖstring(ctx, tmp) + } + + var zeroVal *string + return zeroVal, nil +} func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field___Type_enumValues_argsIncludeDeprecated(ctx, rawArgs) + if err != nil { + return nil, err } args["includeDeprecated"] = arg0 return args, nil } +func (ec *executionContext) field___Type_enumValues_argsIncludeDeprecated( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["includeDeprecated"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + if tmp, ok := rawArgs["includeDeprecated"]; ok { + return ec.unmarshalOBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) - if err != nil { - return nil, err - } + arg0, err := ec.field___Type_fields_argsIncludeDeprecated(ctx, rawArgs) + if err != nil { + return nil, err } args["includeDeprecated"] = arg0 return args, nil } +func (ec *executionContext) field___Type_fields_argsIncludeDeprecated( + ctx context.Context, + rawArgs map[string]interface{}, +) (bool, error) { + // We won't call the directive if the argument is null. + // Set call_argument_directives_with_null to true to call directives + // even if the argument is null. + _, ok := rawArgs["includeDeprecated"] + if !ok { + var zeroVal bool + return zeroVal, nil + } + + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + if tmp, ok := rawArgs["includeDeprecated"]; ok { + return ec.unmarshalOBoolean2bool(ctx, tmp) + } + + var zeroVal bool + return zeroVal, nil +} // endregion ***************************** args.gotpl ***************************** @@ -4395,9 +4787,11 @@ func (ec *executionContext) _Mutation_createUser(ctx context.Context, field grap ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateUser(rctx, fc.Args["input"].(model.CreateUserInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.CreateUserPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -4476,9 +4870,11 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateUser(rctx, fc.Args["input"].(model.UpdateUserInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.UpdateUserPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -4557,9 +4953,11 @@ func (ec *executionContext) _Mutation_deleteUser(ctx context.Context, field grap ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().DeleteUser(rctx, fc.Args["input"].(model.DeleteUserInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.DeleteUserPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -4638,9 +5036,11 @@ func (ec *executionContext) _Mutation_generateWireguardKey(ctx context.Context, ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().GenerateWireguardKey(rctx, fc.Args["input"].(model.GenerateWireguardKeyInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.GenerateWireguardKeyPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -4721,9 +5121,11 @@ func (ec *executionContext) _Mutation_createServer(ctx context.Context, field gr ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateServer(rctx, fc.Args["input"].(model.CreateServerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.CreateServerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -4802,9 +5204,11 @@ func (ec *executionContext) _Mutation_updateServer(ctx context.Context, field gr ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdateServer(rctx, fc.Args["input"].(model.UpdateServerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.UpdateServerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -4883,9 +5287,11 @@ func (ec *executionContext) _Mutation_deleteServer(ctx context.Context, field gr ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().DeleteServer(rctx, fc.Args["input"].(model.DeleteServerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.DeleteServerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -4964,9 +5370,11 @@ func (ec *executionContext) _Mutation_startServer(ctx context.Context, field gra ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().StartServer(rctx, fc.Args["input"].(model.StartServerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.StartServerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -5045,9 +5453,11 @@ func (ec *executionContext) _Mutation_stopServer(ctx context.Context, field grap ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().StopServer(rctx, fc.Args["input"].(model.StopServerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.StopServerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -5126,9 +5536,11 @@ func (ec *executionContext) _Mutation_createPeer(ctx context.Context, field grap ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreatePeer(rctx, fc.Args["input"].(model.CreatePeerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.CreatePeerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -5207,9 +5619,11 @@ func (ec *executionContext) _Mutation_updatePeer(ctx context.Context, field grap ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().UpdatePeer(rctx, fc.Args["input"].(model.UpdatePeerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.UpdatePeerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -5288,9 +5702,11 @@ func (ec *executionContext) _Mutation_deletePeer(ctx context.Context, field grap ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().DeletePeer(rctx, fc.Args["input"].(model.DeletePeerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.DeletePeerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -5369,9 +5785,11 @@ func (ec *executionContext) _Mutation_importForeignServer(ctx context.Context, f ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().ImportForeignServer(rctx, fc.Args["input"].(model.ImportForeignServerInput)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.ImportForeignServerPayload + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -5494,9 +5912,11 @@ func (ec *executionContext) _Peer_server(ctx context.Context, field graphql.Coll ctx = rctx // use context from middleware stack in children return ec.resolvers.Peer().Server(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.Server + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -5953,9 +6373,11 @@ func (ec *executionContext) _Peer_stats(ctx context.Context, field graphql.Colle ctx = rctx // use context from middleware stack in children return ec.resolvers.Peer().Stats(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.PeerStats + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -6024,9 +6446,11 @@ func (ec *executionContext) _Peer_createUser(ctx context.Context, field graphql. ctx = rctx // use context from middleware stack in children return ec.resolvers.Peer().CreateUser(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.User + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -6099,9 +6523,11 @@ func (ec *executionContext) _Peer_updateUser(ctx context.Context, field graphql. ctx = rctx // use context from middleware stack in children return ec.resolvers.Peer().UpdateUser(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.User + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -6174,9 +6600,11 @@ func (ec *executionContext) _Peer_deleteUser(ctx context.Context, field graphql. ctx = rctx // use context from middleware stack in children return ec.resolvers.Peer().DeleteUser(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.User + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -6851,9 +7279,11 @@ func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.Col ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Viewer(rctx) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.User + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -6929,9 +7359,11 @@ func (ec *executionContext) _Query_node(ctx context.Context, field graphql.Colle ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Node(rctx, fc.Args["id"].(model.ID)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal model.Node + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -7001,9 +7433,11 @@ func (ec *executionContext) _Query_nodes(ctx context.Context, field graphql.Coll ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Nodes(rctx, fc.Args["ids"].([]*model.ID)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal []model.Node + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -7076,9 +7510,11 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Users(rctx, fc.Args["query"].(*string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal []*model.User + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -7165,9 +7601,11 @@ func (ec *executionContext) _Query_servers(ctx context.Context, field graphql.Co ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Servers(rctx, fc.Args["query"].(*string), fc.Args["enabled"].(*bool)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal []*model.Server + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -7282,9 +7720,11 @@ func (ec *executionContext) _Query_peers(ctx context.Context, field graphql.Coll ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Peers(rctx, fc.Args["query"].(*string)) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal []*model.Peer + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -7393,9 +7833,11 @@ func (ec *executionContext) _Query_foreignServers(ctx context.Context, field gra ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ForeignServers(rctx) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal []*model.ForeignServer + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -8132,9 +8574,11 @@ func (ec *executionContext) _Server_peers(ctx context.Context, field graphql.Col ctx = rctx // use context from middleware stack in children return ec.resolvers.Server().Peers(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal []*model.Peer + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -8229,9 +8673,11 @@ func (ec *executionContext) _Server_interfaceStats(ctx context.Context, field gr ctx = rctx // use context from middleware stack in children return obj.InterfaceStats, nil } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.ServerInterfaceStats + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -8338,9 +8784,11 @@ func (ec *executionContext) _Server_createUser(ctx context.Context, field graphq ctx = rctx // use context from middleware stack in children return ec.resolvers.Server().CreateUser(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.User + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -8413,9 +8861,11 @@ func (ec *executionContext) _Server_updateUser(ctx context.Context, field graphq ctx = rctx // use context from middleware stack in children return ec.resolvers.Server().UpdateUser(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.User + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -8488,9 +8938,11 @@ func (ec *executionContext) _Server_deleteUser(ctx context.Context, field graphq ctx = rctx // use context from middleware stack in children return ec.resolvers.Server().DeleteUser(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.User + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -10522,9 +10974,11 @@ func (ec *executionContext) _Subscription_userChanged(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().UserChanged(rctx) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.UserChangedEvent + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -10606,9 +11060,11 @@ func (ec *executionContext) _Subscription_serverChanged(ctx context.Context, fie ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().ServerChanged(rctx) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.ServerChangedEvent + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -10690,9 +11146,11 @@ func (ec *executionContext) _Subscription_peerChanged(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().PeerChanged(rctx) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal *model.PeerChangedEvent + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -10774,9 +11232,11 @@ func (ec *executionContext) _Subscription_nodeChanged(ctx context.Context, field ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().NodeChanged(rctx) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal model.NodeChangedEvent + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, nil, directive0) } @@ -11281,9 +11741,11 @@ func (ec *executionContext) _User_servers(ctx context.Context, field graphql.Col ctx = rctx // use context from middleware stack in children return ec.resolvers.User().Servers(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal []*model.Server + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } @@ -11384,9 +11846,11 @@ func (ec *executionContext) _User_peers(ctx context.Context, field graphql.Colle ctx = rctx // use context from middleware stack in children return ec.resolvers.User().Peers(rctx, obj) } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Authenticated == nil { - return nil, errors.New("directive authenticated is not implemented") + var zeroVal []*model.Peer + return zeroVal, errors.New("directive authenticated is not implemented") } return ec.directives.Authenticated(ctx, obj, directive0) } diff --git a/pkg/api/router.go b/pkg/api/router.go index 3a3b8cf..4a68151 100755 --- a/pkg/api/router.go +++ b/pkg/api/router.go @@ -83,7 +83,7 @@ func NewRouter( if conf.HttpServer.APQCacheEnabled { gqlHandler.Use(extension.AutomaticPersistedQuery{ - Cache: lru.New(1000), + Cache: lru.New[string](1000), }) }