From 4299a3859eb27b7701bd5d05886a426d1b6b5cda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:34:19 +0000 Subject: [PATCH 1/3] chore: bump github.com/99designs/gqlgen Bumps [github.com/99designs/gqlgen](https://github.com/99designs/gqlgen) from 0.17.5-0.20220428154617-9250f9ac1f90 to 0.17.40. - [Release notes](https://github.com/99designs/gqlgen/releases) - [Changelog](https://github.com/99designs/gqlgen/blob/master/CHANGELOG.md) - [Commits](https://github.com/99designs/gqlgen/commits/v0.17.40) --- updated-dependencies: - dependency-name: github.com/99designs/gqlgen dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 10 ++++----- go.sum | 64 +++++++++------------------------------------------------- 2 files changed, 15 insertions(+), 59 deletions(-) diff --git a/go.mod b/go.mod index 855f84d3..d7dbf1ec 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( ariga.io/sqlcomment v0.1.0 entgo.io/contrib v0.4.5 entgo.io/ent v0.12.5 - github.com/99designs/gqlgen v0.17.5-0.20220428154617-9250f9ac1f90 + github.com/99designs/gqlgen v0.17.40 github.com/antonfisher/nested-logrus-formatter v1.3.1 github.com/digitorus/timestamp v0.0.0-20230220124323-d542479a2425 github.com/edwarnicke/gitoid v0.0.0-20220710194850-1be5bfda1f9d @@ -22,7 +22,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/testifysec/archivista-api v0.0.0-20230303165309-a31a92afd132 github.com/testifysec/go-witness v0.1.16 - github.com/vektah/gqlparser/v2 v2.4.7 + github.com/vektah/gqlparser/v2 v2.5.10 golang.org/x/sync v0.5.0 ) @@ -44,7 +44,7 @@ require ( github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.3 // indirect github.com/hashicorp/hcl/v2 v2.13.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect @@ -52,6 +52,7 @@ require ( github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/sosodev/duration v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/vmihailenco/msgpack/v5 v5.0.0-beta.9 // indirect github.com/vmihailenco/tagparser v0.1.2 // indirect @@ -66,8 +67,7 @@ require ( golang.org/x/net v0.17.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.8.1-0.20230428195545-5283a0178901 // indirect + golang.org/x/tools v0.9.3 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 6256bf1e..2ae32f77 100644 --- a/go.sum +++ b/go.sum @@ -7,17 +7,15 @@ entgo.io/contrib v0.4.5 h1:BFaOHwFLE8WZjVJadP0XHCIaxgcC1BAtUvAyw7M/GHk= entgo.io/contrib v0.4.5/go.mod h1:wpZyq2DJgthugFvDBlaqMXj9mV4/9ebyGEn7xlTVQqE= entgo.io/ent v0.12.5 h1:KREM5E4CSoej4zeGa88Ou/gfturAnpUv0mzAjch1sj4= entgo.io/ent v0.12.5/go.mod h1:Y3JVAjtlIk8xVZYSn3t3mf8xlZIn5SAOXZQxD6kKI+Q= -github.com/99designs/gqlgen v0.17.5-0.20220428154617-9250f9ac1f90 h1:nGGP+sUJ6D3guzjVBgoH1PrZxoU4lUdfR/Q8THYrAJI= -github.com/99designs/gqlgen v0.17.5-0.20220428154617-9250f9ac1f90/go.mod h1:SNpLVzaF37rRLSAXtu8FKVp5I4zycneMmFX6NT4XGSU= +github.com/99designs/gqlgen v0.17.40 h1:/l8JcEVQ93wqIfmH9VS1jsAkwm6eAF1NwQn3N+SDqBY= +github.com/99designs/gqlgen v0.17.40/go.mod h1:b62q1USk82GYIVjC60h02YguAZLqYZtvWml8KkhJps4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= 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/antonfisher/nested-logrus-formatter v1.3.1 h1:NFJIr+pzwv5QLHTPyKz9UMEoHck02Q9L0FP13b/xSbQ= github.com/antonfisher/nested-logrus-formatter v1.3.1/go.mod h1:6WTfyWFkBc9+zyBaKIqRrg/KwMqBbodBjgbHjDz7zjA= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= @@ -27,7 +25,6 @@ github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdK github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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= @@ -74,14 +71,12 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -98,15 +93,14 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.3 h1:kmRrRLlInXvng0SmLxmQpQkpbYAvcXm7NPDrgxJa9mE= +github.com/hashicorp/golang-lru/v2 v2.0.3/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -117,10 +111,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= -github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/minio/minio-go v6.0.14+incompatible h1:fnV+GD28LeqdN6vT2XdGKW8Qe/IfjJDswNVuni6km9o= github.com/minio/minio-go v6.0.14+incompatible/go.mod h1:7guKYtitv8dktvNUGrhzmNlA5wrAABTQXCoesZdFQO8= @@ -128,7 +118,6 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -136,10 +125,11 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sosodev/duration v1.1.0 h1:kQcaiGbJaIsRqgQy7VGlZrVw1giWO+lDoX3MCPnpVO4= +github.com/sosodev/duration v1.1.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -148,7 +138,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -160,15 +149,12 @@ github.com/testifysec/archivista-api v0.0.0-20230303165309-a31a92afd132 h1:w/8AC github.com/testifysec/archivista-api v0.0.0-20230303165309-a31a92afd132/go.mod h1:F9iPXqTd/Pj7HICL0CKD1Rv8taBOEr/GZk5KG6Omnas= github.com/testifysec/go-witness v0.1.16 h1:E2lQ5Vsq7vVurDJFvjA1wuLC7slnErx77WGEFUB4DFw= github.com/testifysec/go-witness v0.1.16/go.mod h1:ljKDAQFb949IQMmch/B7kb1pYz1tJ10sSNjqM+HNijQ= -github.com/urfave/cli/v2 v2.4.0/go.mod h1:NX9W0zmTvedE5oDoOMs2RTC8RvdK98NTYZE5LbaEYPg= -github.com/vektah/gqlparser/v2 v2.4.2/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= -github.com/vektah/gqlparser/v2 v2.4.7 h1:yub2WLoSIr+chP1zMv6bjrsgTasfubxGZJeC8ISEpgE= -github.com/vektah/gqlparser/v2 v2.4.7/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.5.10 h1:6zSM4azXC9u4Nxy5YmdmGu4uKamfwsdKTwp5zsEealU= +github.com/vektah/gqlparser/v2 v2.5.10/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= github.com/vmihailenco/msgpack/v5 v5.0.0-beta.9 h1:iBRIniTnWOo0kqkg3k3XR8Vn6OCkVlIuZNo0UoBrKx4= github.com/vmihailenco/msgpack/v5 v5.0.0-beta.9/go.mod h1:HVxBVPUK/+fZMonk4bi1islLa8V3cfnBug0+4dykPzo= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= @@ -180,9 +166,7 @@ go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxx go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -191,8 +175,6 @@ golang.org/x/exp v0.0.0-20221230185412-738e83a70c30/go.mod h1:CxIveKay+FTh1D0yPZ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -200,37 +182,24 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -238,15 +207,9 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.8.1-0.20230428195545-5283a0178901 h1:0wxTF6pSjIIhNt7mo9GvjDfzyCOiWhmICgtO/Ah948s= -golang.org/x/tools v0.8.1-0.20230428195545-5283a0178901/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= +golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -266,18 +229,11 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 9a3879fd7380034d95ef512a00f762d01ebff5cd Mon Sep 17 00:00:00 2001 From: John Kjell Date: Mon, 20 Nov 2023 10:44:54 -0600 Subject: [PATCH 2/3] go generate due to gqlgen version update Signed-off-by: John Kjell --- ent.resolvers.go | 19 +- ent/attestation_update.go | 16 + ent/attestationcollection_update.go | 16 + ent/client.go | 11 +- ent/dsse_update.go | 32 + ent/payloaddigest_update.go | 32 + ent/runtime/runtime.go | 4 +- ent/signature_update.go | 32 + ent/statement_update.go | 16 + ent/subject_update.go | 16 + ent/subjectdigest_update.go | 32 + ent/timestamp_update.go | 32 + generated.go | 2744 ++++++++++++++------------- 13 files changed, 1710 insertions(+), 1292 deletions(-) diff --git a/ent.resolvers.go b/ent.resolvers.go index 9a377f2a..53f4ced7 100644 --- a/ent.resolvers.go +++ b/ent.resolvers.go @@ -1,21 +1,8 @@ -// Copyright 2023 The Archivista Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package archivista // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.40 import ( "context" @@ -24,18 +11,22 @@ import ( "github.com/testifysec/archivista/ent" ) +// Node is the resolver for the node field. func (r *queryResolver) Node(ctx context.Context, id int) (ent.Noder, error) { return r.client.Noder(ctx, id) } +// Nodes is the resolver for the nodes field. func (r *queryResolver) Nodes(ctx context.Context, ids []int) ([]ent.Noder, error) { return r.client.Noders(ctx, ids) } +// Dsses is the resolver for the dsses field. func (r *queryResolver) Dsses(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, where *ent.DsseWhereInput) (*ent.DsseConnection, error) { return r.client.Dsse.Query().Paginate(ctx, after, first, before, last, ent.WithDsseFilter(where.Filter)) } +// Subjects is the resolver for the subjects field. func (r *queryResolver) Subjects(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, where *ent.SubjectWhereInput) (*ent.SubjectConnection, error) { return r.client.Subject.Query().Paginate(ctx, after, first, before, last, ent.WithSubjectFilter(where.Filter)) } diff --git a/ent/attestation_update.go b/ent/attestation_update.go index 7f6b1d49..e9dcc74c 100644 --- a/ent/attestation_update.go +++ b/ent/attestation_update.go @@ -34,6 +34,14 @@ func (au *AttestationUpdate) SetType(s string) *AttestationUpdate { return au } +// SetNillableType sets the "type" field if the given value is not nil. +func (au *AttestationUpdate) SetNillableType(s *string) *AttestationUpdate { + if s != nil { + au.SetType(*s) + } + return au +} + // SetAttestationCollectionID sets the "attestation_collection" edge to the AttestationCollection entity by ID. func (au *AttestationUpdate) SetAttestationCollectionID(id int) *AttestationUpdate { au.mutation.SetAttestationCollectionID(id) @@ -166,6 +174,14 @@ func (auo *AttestationUpdateOne) SetType(s string) *AttestationUpdateOne { return auo } +// SetNillableType sets the "type" field if the given value is not nil. +func (auo *AttestationUpdateOne) SetNillableType(s *string) *AttestationUpdateOne { + if s != nil { + auo.SetType(*s) + } + return auo +} + // SetAttestationCollectionID sets the "attestation_collection" edge to the AttestationCollection entity by ID. func (auo *AttestationUpdateOne) SetAttestationCollectionID(id int) *AttestationUpdateOne { auo.mutation.SetAttestationCollectionID(id) diff --git a/ent/attestationcollection_update.go b/ent/attestationcollection_update.go index 63959913..72664757 100644 --- a/ent/attestationcollection_update.go +++ b/ent/attestationcollection_update.go @@ -35,6 +35,14 @@ func (acu *AttestationCollectionUpdate) SetName(s string) *AttestationCollection return acu } +// SetNillableName sets the "name" field if the given value is not nil. +func (acu *AttestationCollectionUpdate) SetNillableName(s *string) *AttestationCollectionUpdate { + if s != nil { + acu.SetName(*s) + } + return acu +} + // AddAttestationIDs adds the "attestations" edge to the Attestation entity by IDs. func (acu *AttestationCollectionUpdate) AddAttestationIDs(ids ...int) *AttestationCollectionUpdate { acu.mutation.AddAttestationIDs(ids...) @@ -248,6 +256,14 @@ func (acuo *AttestationCollectionUpdateOne) SetName(s string) *AttestationCollec return acuo } +// SetNillableName sets the "name" field if the given value is not nil. +func (acuo *AttestationCollectionUpdateOne) SetNillableName(s *string) *AttestationCollectionUpdateOne { + if s != nil { + acuo.SetName(*s) + } + return acuo +} + // AddAttestationIDs adds the "attestations" edge to the Attestation entity by IDs. func (acuo *AttestationCollectionUpdateOne) AddAttestationIDs(ids ...int) *AttestationCollectionUpdateOne { acuo.mutation.AddAttestationIDs(ids...) diff --git a/ent/client.go b/ent/client.go index bca59122..7f59d125 100644 --- a/ent/client.go +++ b/ent/client.go @@ -55,9 +55,7 @@ type Client struct { // NewClient creates a new client configured with the given options. func NewClient(opts ...Option) *Client { - cfg := config{log: log.Println, hooks: &hooks{}, inters: &inters{}} - cfg.options(opts...) - client := &Client{config: cfg} + client := &Client{config: newConfig(opts...)} client.init() return client } @@ -93,6 +91,13 @@ type ( Option func(*config) ) +// newConfig creates a new config for the client. +func newConfig(opts ...Option) config { + cfg := config{log: log.Println, hooks: &hooks{}, inters: &inters{}} + cfg.options(opts...) + return cfg +} + // options applies the options on the config object. func (c *config) options(opts ...Option) { for _, opt := range opts { diff --git a/ent/dsse_update.go b/ent/dsse_update.go index 9527e7bf..77bf8fc8 100644 --- a/ent/dsse_update.go +++ b/ent/dsse_update.go @@ -36,12 +36,28 @@ func (du *DsseUpdate) SetGitoidSha256(s string) *DsseUpdate { return du } +// SetNillableGitoidSha256 sets the "gitoid_sha256" field if the given value is not nil. +func (du *DsseUpdate) SetNillableGitoidSha256(s *string) *DsseUpdate { + if s != nil { + du.SetGitoidSha256(*s) + } + return du +} + // SetPayloadType sets the "payload_type" field. func (du *DsseUpdate) SetPayloadType(s string) *DsseUpdate { du.mutation.SetPayloadType(s) return du } +// SetNillablePayloadType sets the "payload_type" field if the given value is not nil. +func (du *DsseUpdate) SetNillablePayloadType(s *string) *DsseUpdate { + if s != nil { + du.SetPayloadType(*s) + } + return du +} + // SetStatementID sets the "statement" edge to the Statement entity by ID. func (du *DsseUpdate) SetStatementID(id int) *DsseUpdate { du.mutation.SetStatementID(id) @@ -349,12 +365,28 @@ func (duo *DsseUpdateOne) SetGitoidSha256(s string) *DsseUpdateOne { return duo } +// SetNillableGitoidSha256 sets the "gitoid_sha256" field if the given value is not nil. +func (duo *DsseUpdateOne) SetNillableGitoidSha256(s *string) *DsseUpdateOne { + if s != nil { + duo.SetGitoidSha256(*s) + } + return duo +} + // SetPayloadType sets the "payload_type" field. func (duo *DsseUpdateOne) SetPayloadType(s string) *DsseUpdateOne { duo.mutation.SetPayloadType(s) return duo } +// SetNillablePayloadType sets the "payload_type" field if the given value is not nil. +func (duo *DsseUpdateOne) SetNillablePayloadType(s *string) *DsseUpdateOne { + if s != nil { + duo.SetPayloadType(*s) + } + return duo +} + // SetStatementID sets the "statement" edge to the Statement entity by ID. func (duo *DsseUpdateOne) SetStatementID(id int) *DsseUpdateOne { duo.mutation.SetStatementID(id) diff --git a/ent/payloaddigest_update.go b/ent/payloaddigest_update.go index 91da51ae..95ad6c7c 100644 --- a/ent/payloaddigest_update.go +++ b/ent/payloaddigest_update.go @@ -34,12 +34,28 @@ func (pdu *PayloadDigestUpdate) SetAlgorithm(s string) *PayloadDigestUpdate { return pdu } +// SetNillableAlgorithm sets the "algorithm" field if the given value is not nil. +func (pdu *PayloadDigestUpdate) SetNillableAlgorithm(s *string) *PayloadDigestUpdate { + if s != nil { + pdu.SetAlgorithm(*s) + } + return pdu +} + // SetValue sets the "value" field. func (pdu *PayloadDigestUpdate) SetValue(s string) *PayloadDigestUpdate { pdu.mutation.SetValue(s) return pdu } +// SetNillableValue sets the "value" field if the given value is not nil. +func (pdu *PayloadDigestUpdate) SetNillableValue(s *string) *PayloadDigestUpdate { + if s != nil { + pdu.SetValue(*s) + } + return pdu +} + // SetDsseID sets the "dsse" edge to the Dsse entity by ID. func (pdu *PayloadDigestUpdate) SetDsseID(id int) *PayloadDigestUpdate { pdu.mutation.SetDsseID(id) @@ -185,12 +201,28 @@ func (pduo *PayloadDigestUpdateOne) SetAlgorithm(s string) *PayloadDigestUpdateO return pduo } +// SetNillableAlgorithm sets the "algorithm" field if the given value is not nil. +func (pduo *PayloadDigestUpdateOne) SetNillableAlgorithm(s *string) *PayloadDigestUpdateOne { + if s != nil { + pduo.SetAlgorithm(*s) + } + return pduo +} + // SetValue sets the "value" field. func (pduo *PayloadDigestUpdateOne) SetValue(s string) *PayloadDigestUpdateOne { pduo.mutation.SetValue(s) return pduo } +// SetNillableValue sets the "value" field if the given value is not nil. +func (pduo *PayloadDigestUpdateOne) SetNillableValue(s *string) *PayloadDigestUpdateOne { + if s != nil { + pduo.SetValue(*s) + } + return pduo +} + // SetDsseID sets the "dsse" edge to the Dsse entity by ID. func (pduo *PayloadDigestUpdateOne) SetDsseID(id int) *PayloadDigestUpdateOne { pduo.mutation.SetDsseID(id) diff --git a/ent/runtime/runtime.go b/ent/runtime/runtime.go index e1a2fbd9..5e8e846c 100644 --- a/ent/runtime/runtime.go +++ b/ent/runtime/runtime.go @@ -5,6 +5,6 @@ package runtime // The schema-stitching logic is generated in github.com/testifysec/archivista/ent/runtime.go const ( - Version = "v0.12.4" // Version of ent codegen. - Sum = "h1:LddPnAyxls/O7DTXZvUGDj0NZIdGSu317+aoNLJWbD8=" // Sum of ent codegen. + Version = "v0.12.5" // Version of ent codegen. + Sum = "h1:KREM5E4CSoej4zeGa88Ou/gfturAnpUv0mzAjch1sj4=" // Sum of ent codegen. ) diff --git a/ent/signature_update.go b/ent/signature_update.go index 7776db94..f2484061 100644 --- a/ent/signature_update.go +++ b/ent/signature_update.go @@ -35,12 +35,28 @@ func (su *SignatureUpdate) SetKeyID(s string) *SignatureUpdate { return su } +// SetNillableKeyID sets the "key_id" field if the given value is not nil. +func (su *SignatureUpdate) SetNillableKeyID(s *string) *SignatureUpdate { + if s != nil { + su.SetKeyID(*s) + } + return su +} + // SetSignature sets the "signature" field. func (su *SignatureUpdate) SetSignature(s string) *SignatureUpdate { su.mutation.SetSignature(s) return su } +// SetNillableSignature sets the "signature" field if the given value is not nil. +func (su *SignatureUpdate) SetNillableSignature(s *string) *SignatureUpdate { + if s != nil { + su.SetSignature(*s) + } + return su +} + // SetDsseID sets the "dsse" edge to the Dsse entity by ID. func (su *SignatureUpdate) SetDsseID(id int) *SignatureUpdate { su.mutation.SetDsseID(id) @@ -267,12 +283,28 @@ func (suo *SignatureUpdateOne) SetKeyID(s string) *SignatureUpdateOne { return suo } +// SetNillableKeyID sets the "key_id" field if the given value is not nil. +func (suo *SignatureUpdateOne) SetNillableKeyID(s *string) *SignatureUpdateOne { + if s != nil { + suo.SetKeyID(*s) + } + return suo +} + // SetSignature sets the "signature" field. func (suo *SignatureUpdateOne) SetSignature(s string) *SignatureUpdateOne { suo.mutation.SetSignature(s) return suo } +// SetNillableSignature sets the "signature" field if the given value is not nil. +func (suo *SignatureUpdateOne) SetNillableSignature(s *string) *SignatureUpdateOne { + if s != nil { + suo.SetSignature(*s) + } + return suo +} + // SetDsseID sets the "dsse" edge to the Dsse entity by ID. func (suo *SignatureUpdateOne) SetDsseID(id int) *SignatureUpdateOne { suo.mutation.SetDsseID(id) diff --git a/ent/statement_update.go b/ent/statement_update.go index 0c3704e8..4010210b 100644 --- a/ent/statement_update.go +++ b/ent/statement_update.go @@ -36,6 +36,14 @@ func (su *StatementUpdate) SetPredicate(s string) *StatementUpdate { return su } +// SetNillablePredicate sets the "predicate" field if the given value is not nil. +func (su *StatementUpdate) SetNillablePredicate(s *string) *StatementUpdate { + if s != nil { + su.SetPredicate(*s) + } + return su +} + // AddSubjectIDs adds the "subjects" edge to the Subject entity by IDs. func (su *StatementUpdate) AddSubjectIDs(ids ...int) *StatementUpdate { su.mutation.AddSubjectIDs(ids...) @@ -335,6 +343,14 @@ func (suo *StatementUpdateOne) SetPredicate(s string) *StatementUpdateOne { return suo } +// SetNillablePredicate sets the "predicate" field if the given value is not nil. +func (suo *StatementUpdateOne) SetNillablePredicate(s *string) *StatementUpdateOne { + if s != nil { + suo.SetPredicate(*s) + } + return suo +} + // AddSubjectIDs adds the "subjects" edge to the Subject entity by IDs. func (suo *StatementUpdateOne) AddSubjectIDs(ids ...int) *StatementUpdateOne { suo.mutation.AddSubjectIDs(ids...) diff --git a/ent/subject_update.go b/ent/subject_update.go index 50daa4eb..bac4bb07 100644 --- a/ent/subject_update.go +++ b/ent/subject_update.go @@ -35,6 +35,14 @@ func (su *SubjectUpdate) SetName(s string) *SubjectUpdate { return su } +// SetNillableName sets the "name" field if the given value is not nil. +func (su *SubjectUpdate) SetNillableName(s *string) *SubjectUpdate { + if s != nil { + su.SetName(*s) + } + return su +} + // AddSubjectDigestIDs adds the "subject_digests" edge to the SubjectDigest entity by IDs. func (su *SubjectUpdate) AddSubjectDigestIDs(ids ...int) *SubjectUpdate { su.mutation.AddSubjectDigestIDs(ids...) @@ -253,6 +261,14 @@ func (suo *SubjectUpdateOne) SetName(s string) *SubjectUpdateOne { return suo } +// SetNillableName sets the "name" field if the given value is not nil. +func (suo *SubjectUpdateOne) SetNillableName(s *string) *SubjectUpdateOne { + if s != nil { + suo.SetName(*s) + } + return suo +} + // AddSubjectDigestIDs adds the "subject_digests" edge to the SubjectDigest entity by IDs. func (suo *SubjectUpdateOne) AddSubjectDigestIDs(ids ...int) *SubjectUpdateOne { suo.mutation.AddSubjectDigestIDs(ids...) diff --git a/ent/subjectdigest_update.go b/ent/subjectdigest_update.go index 079fc1c5..d56813d0 100644 --- a/ent/subjectdigest_update.go +++ b/ent/subjectdigest_update.go @@ -34,12 +34,28 @@ func (sdu *SubjectDigestUpdate) SetAlgorithm(s string) *SubjectDigestUpdate { return sdu } +// SetNillableAlgorithm sets the "algorithm" field if the given value is not nil. +func (sdu *SubjectDigestUpdate) SetNillableAlgorithm(s *string) *SubjectDigestUpdate { + if s != nil { + sdu.SetAlgorithm(*s) + } + return sdu +} + // SetValue sets the "value" field. func (sdu *SubjectDigestUpdate) SetValue(s string) *SubjectDigestUpdate { sdu.mutation.SetValue(s) return sdu } +// SetNillableValue sets the "value" field if the given value is not nil. +func (sdu *SubjectDigestUpdate) SetNillableValue(s *string) *SubjectDigestUpdate { + if s != nil { + sdu.SetValue(*s) + } + return sdu +} + // SetSubjectID sets the "subject" edge to the Subject entity by ID. func (sdu *SubjectDigestUpdate) SetSubjectID(id int) *SubjectDigestUpdate { sdu.mutation.SetSubjectID(id) @@ -185,12 +201,28 @@ func (sduo *SubjectDigestUpdateOne) SetAlgorithm(s string) *SubjectDigestUpdateO return sduo } +// SetNillableAlgorithm sets the "algorithm" field if the given value is not nil. +func (sduo *SubjectDigestUpdateOne) SetNillableAlgorithm(s *string) *SubjectDigestUpdateOne { + if s != nil { + sduo.SetAlgorithm(*s) + } + return sduo +} + // SetValue sets the "value" field. func (sduo *SubjectDigestUpdateOne) SetValue(s string) *SubjectDigestUpdateOne { sduo.mutation.SetValue(s) return sduo } +// SetNillableValue sets the "value" field if the given value is not nil. +func (sduo *SubjectDigestUpdateOne) SetNillableValue(s *string) *SubjectDigestUpdateOne { + if s != nil { + sduo.SetValue(*s) + } + return sduo +} + // SetSubjectID sets the "subject" edge to the Subject entity by ID. func (sduo *SubjectDigestUpdateOne) SetSubjectID(id int) *SubjectDigestUpdateOne { sduo.mutation.SetSubjectID(id) diff --git a/ent/timestamp_update.go b/ent/timestamp_update.go index efcf8231..cb343868 100644 --- a/ent/timestamp_update.go +++ b/ent/timestamp_update.go @@ -35,12 +35,28 @@ func (tu *TimestampUpdate) SetType(s string) *TimestampUpdate { return tu } +// SetNillableType sets the "type" field if the given value is not nil. +func (tu *TimestampUpdate) SetNillableType(s *string) *TimestampUpdate { + if s != nil { + tu.SetType(*s) + } + return tu +} + // SetTimestamp sets the "timestamp" field. func (tu *TimestampUpdate) SetTimestamp(t time.Time) *TimestampUpdate { tu.mutation.SetTimestamp(t) return tu } +// SetNillableTimestamp sets the "timestamp" field if the given value is not nil. +func (tu *TimestampUpdate) SetNillableTimestamp(t *time.Time) *TimestampUpdate { + if t != nil { + tu.SetTimestamp(*t) + } + return tu +} + // SetSignatureID sets the "signature" edge to the Signature entity by ID. func (tu *TimestampUpdate) SetSignatureID(id int) *TimestampUpdate { tu.mutation.SetSignatureID(id) @@ -168,12 +184,28 @@ func (tuo *TimestampUpdateOne) SetType(s string) *TimestampUpdateOne { return tuo } +// SetNillableType sets the "type" field if the given value is not nil. +func (tuo *TimestampUpdateOne) SetNillableType(s *string) *TimestampUpdateOne { + if s != nil { + tuo.SetType(*s) + } + return tuo +} + // SetTimestamp sets the "timestamp" field. func (tuo *TimestampUpdateOne) SetTimestamp(t time.Time) *TimestampUpdateOne { tuo.mutation.SetTimestamp(t) return tuo } +// SetNillableTimestamp sets the "timestamp" field if the given value is not nil. +func (tuo *TimestampUpdateOne) SetNillableTimestamp(t *time.Time) *TimestampUpdateOne { + if t != nil { + tuo.SetTimestamp(*t) + } + return tuo +} + // SetSignatureID sets the "signature" edge to the Signature entity by ID. func (tuo *TimestampUpdateOne) SetSignatureID(id int) *TimestampUpdateOne { tuo.mutation.SetSignatureID(id) diff --git a/generated.go b/generated.go index 3a63f8df..0b240b0c 100644 --- a/generated.go +++ b/generated.go @@ -5,6 +5,7 @@ package archivista import ( "bytes" "context" + "embed" "errors" "fmt" "strconv" @@ -25,6 +26,7 @@ import ( // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { return &executableSchema{ + schema: cfg.Schema, resolvers: cfg.Resolvers, directives: cfg.Directives, complexity: cfg.Complexity, @@ -32,6 +34,7 @@ func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { } type Config struct { + Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot @@ -156,17 +159,21 @@ type QueryResolver interface { } type executableSchema struct { + schema *ast.Schema resolvers ResolverRoot directives DirectiveRoot complexity ComplexityRoot } func (e *executableSchema) Schema() *ast.Schema { + if e.schema != nil { + return e.schema + } return parsedSchema } func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { - ec := executionContext{nil, e} + ec := executionContext{nil, e, 0, 0, nil} _ = ec switch typeName + "." + field { @@ -600,7 +607,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { rc := graphql.GetOperationContext(ctx) - ec := executionContext{rc, e} + ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)} inputUnmarshalMap := graphql.BuildUnmarshalerMap( ec.unmarshalInputAttestationCollectionWhereInput, ec.unmarshalInputAttestationWhereInput, @@ -617,18 +624,33 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { switch rc.Operation.Operation { case ast.Query: return func(ctx context.Context) *graphql.Response { - if !first { - return nil + var response graphql.Response + var data graphql.Marshaler + if first { + first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) + data = ec._Query(ctx, rc.Operation.SelectionSet) + } else { + if atomic.LoadInt32(&ec.pendingDeferred) > 0 { + result := <-ec.deferredResults + atomic.AddInt32(&ec.pendingDeferred, -1) + data = result.Result + response.Path = result.Path + response.Label = result.Label + response.Errors = result.Errors + } else { + return nil + } } - first = false - ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) - data := ec._Query(ctx, rc.Operation.SelectionSet) var buf bytes.Buffer data.MarshalGQL(&buf) - - return &graphql.Response{ - Data: buf.Bytes(), + response.Data = buf.Bytes() + if atomic.LoadInt32(&ec.deferred) > 0 { + hasNext := atomic.LoadInt32(&ec.pendingDeferred) > 0 + response.HasNext = &hasNext } + + return &response } default: @@ -639,611 +661,58 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { type executionContext struct { *graphql.OperationContext *executableSchema + deferred int32 + pendingDeferred int32 + deferredResults chan graphql.DeferredResult +} + +func (ec *executionContext) processDeferredGroup(dg graphql.DeferredGroup) { + atomic.AddInt32(&ec.pendingDeferred, 1) + go func() { + ctx := graphql.WithFreshResponseContext(dg.Context) + dg.FieldSet.Dispatch(ctx) + ds := graphql.DeferredResult{ + Path: dg.Path, + Label: dg.Label, + Result: dg.FieldSet, + Errors: graphql.GetErrors(ctx), + } + // null fields should bubble up + if dg.FieldSet.Invalids > 0 { + ds.Result = graphql.Null + } + ec.deferredResults <- ds + }() } func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { if ec.DisableIntrospection { return nil, errors.New("introspection disabled") } - return introspection.WrapSchema(parsedSchema), nil + return introspection.WrapSchema(ec.Schema()), nil } func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { if ec.DisableIntrospection { return nil, errors.New("introspection disabled") } - return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil + return introspection.WrapTypeFromDef(ec.Schema(), ec.Schema().Types[name]), nil +} + +//go:embed "archivista.graphql" "ent.graphql" +var sourcesFS embed.FS + +func sourceData(filename string) string { + data, err := sourcesFS.ReadFile(filename) + if err != nil { + panic(fmt.Sprintf("codegen problem: %s not available", filename)) + } + return string(data) } var sources = []*ast.Source{ - {Name: "archivista.graphql", Input: `scalar Time -`, BuiltIn: false}, - {Name: "ent.graphql", Input: `directive @goField(forceResolver: Boolean, name: String) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION -directive @goModel(model: String, models: [String!]) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION -type Attestation implements Node { - id: ID! - type: String! - attestationCollection: AttestationCollection! -} -type AttestationCollection implements Node { - id: ID! - name: String! - attestations: [Attestation!] - statement: Statement! -} -""" -AttestationCollectionWhereInput is used for filtering AttestationCollection objects. -Input was generated by ent. -""" -input AttestationCollectionWhereInput { - not: AttestationCollectionWhereInput - and: [AttestationCollectionWhereInput!] - or: [AttestationCollectionWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """name field predicates""" - name: String - nameNEQ: String - nameIn: [String!] - nameNotIn: [String!] - nameGT: String - nameGTE: String - nameLT: String - nameLTE: String - nameContains: String - nameHasPrefix: String - nameHasSuffix: String - nameEqualFold: String - nameContainsFold: String - """attestations edge predicates""" - hasAttestations: Boolean - hasAttestationsWith: [AttestationWhereInput!] - """statement edge predicates""" - hasStatement: Boolean - hasStatementWith: [StatementWhereInput!] -} -""" -AttestationWhereInput is used for filtering Attestation objects. -Input was generated by ent. -""" -input AttestationWhereInput { - not: AttestationWhereInput - and: [AttestationWhereInput!] - or: [AttestationWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """type field predicates""" - type: String - typeNEQ: String - typeIn: [String!] - typeNotIn: [String!] - typeGT: String - typeGTE: String - typeLT: String - typeLTE: String - typeContains: String - typeHasPrefix: String - typeHasSuffix: String - typeEqualFold: String - typeContainsFold: String - """attestation_collection edge predicates""" - hasAttestationCollection: Boolean - hasAttestationCollectionWith: [AttestationCollectionWhereInput!] -} -""" -Define a Relay Cursor type: -https://relay.dev/graphql/connections.htm#sec-Cursor -""" -scalar Cursor -type Dsse implements Node { - id: ID! - gitoidSha256: String! - payloadType: String! - statement: Statement - signatures: [Signature!] - payloadDigests: [PayloadDigest!] -} -"""A connection to a list of items.""" -type DsseConnection { - """A list of edges.""" - edges: [DsseEdge] - """Information to aid in pagination.""" - pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" - totalCount: Int! -} -"""An edge in a connection.""" -type DsseEdge { - """The item at the end of the edge.""" - node: Dsse - """A cursor for use in pagination.""" - cursor: Cursor! -} -""" -DsseWhereInput is used for filtering Dsse objects. -Input was generated by ent. -""" -input DsseWhereInput { - not: DsseWhereInput - and: [DsseWhereInput!] - or: [DsseWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """gitoid_sha256 field predicates""" - gitoidSha256: String - gitoidSha256NEQ: String - gitoidSha256In: [String!] - gitoidSha256NotIn: [String!] - gitoidSha256GT: String - gitoidSha256GTE: String - gitoidSha256LT: String - gitoidSha256LTE: String - gitoidSha256Contains: String - gitoidSha256HasPrefix: String - gitoidSha256HasSuffix: String - gitoidSha256EqualFold: String - gitoidSha256ContainsFold: String - """payload_type field predicates""" - payloadType: String - payloadTypeNEQ: String - payloadTypeIn: [String!] - payloadTypeNotIn: [String!] - payloadTypeGT: String - payloadTypeGTE: String - payloadTypeLT: String - payloadTypeLTE: String - payloadTypeContains: String - payloadTypeHasPrefix: String - payloadTypeHasSuffix: String - payloadTypeEqualFold: String - payloadTypeContainsFold: String - """statement edge predicates""" - hasStatement: Boolean - hasStatementWith: [StatementWhereInput!] - """signatures edge predicates""" - hasSignatures: Boolean - hasSignaturesWith: [SignatureWhereInput!] - """payload_digests edge predicates""" - hasPayloadDigests: Boolean - hasPayloadDigestsWith: [PayloadDigestWhereInput!] -} -""" -An object with an ID. -Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) -""" -interface Node @goModel(model: "github.com/testifysec/archivista/ent.Noder") { - """The id of the object.""" - id: ID! -} -"""Possible directions in which to order a list of items when provided an ` + "`" + `orderBy` + "`" + ` argument.""" -enum OrderDirection { - """Specifies an ascending order for a given ` + "`" + `orderBy` + "`" + ` argument.""" - ASC - """Specifies a descending order for a given ` + "`" + `orderBy` + "`" + ` argument.""" - DESC -} -""" -Information about pagination in a connection. -https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo -""" -type PageInfo { - """When paginating forwards, are there more items?""" - hasNextPage: Boolean! - """When paginating backwards, are there more items?""" - hasPreviousPage: Boolean! - """When paginating backwards, the cursor to continue.""" - startCursor: Cursor - """When paginating forwards, the cursor to continue.""" - endCursor: Cursor -} -type PayloadDigest implements Node { - id: ID! - algorithm: String! - value: String! - dsse: Dsse -} -""" -PayloadDigestWhereInput is used for filtering PayloadDigest objects. -Input was generated by ent. -""" -input PayloadDigestWhereInput { - not: PayloadDigestWhereInput - and: [PayloadDigestWhereInput!] - or: [PayloadDigestWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """algorithm field predicates""" - algorithm: String - algorithmNEQ: String - algorithmIn: [String!] - algorithmNotIn: [String!] - algorithmGT: String - algorithmGTE: String - algorithmLT: String - algorithmLTE: String - algorithmContains: String - algorithmHasPrefix: String - algorithmHasSuffix: String - algorithmEqualFold: String - algorithmContainsFold: String - """value field predicates""" - value: String - valueNEQ: String - valueIn: [String!] - valueNotIn: [String!] - valueGT: String - valueGTE: String - valueLT: String - valueLTE: String - valueContains: String - valueHasPrefix: String - valueHasSuffix: String - valueEqualFold: String - valueContainsFold: String - """dsse edge predicates""" - hasDsse: Boolean - hasDsseWith: [DsseWhereInput!] -} -type Query { - """Fetches an object given its ID.""" - node( - """ID of the object.""" - id: ID! - ): Node - """Lookup nodes by a list of IDs.""" - nodes( - """The list of node IDs.""" - ids: [ID!]! - ): [Node]! - dsses( - """Returns the elements in the list that come after the specified cursor.""" - after: Cursor - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the elements in the list that come before the specified cursor.""" - before: Cursor - - """Returns the last _n_ elements from the list.""" - last: Int - - """Filtering options for Dsses returned from the connection.""" - where: DsseWhereInput - ): DsseConnection! - subjects( - """Returns the elements in the list that come after the specified cursor.""" - after: Cursor - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the elements in the list that come before the specified cursor.""" - before: Cursor - - """Returns the last _n_ elements from the list.""" - last: Int - - """Filtering options for Subjects returned from the connection.""" - where: SubjectWhereInput - ): SubjectConnection! -} -type Signature implements Node { - id: ID! - keyID: String! - signature: String! - dsse: Dsse - timestamps: [Timestamp!] -} -""" -SignatureWhereInput is used for filtering Signature objects. -Input was generated by ent. -""" -input SignatureWhereInput { - not: SignatureWhereInput - and: [SignatureWhereInput!] - or: [SignatureWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """key_id field predicates""" - keyID: String - keyIDNEQ: String - keyIDIn: [String!] - keyIDNotIn: [String!] - keyIDGT: String - keyIDGTE: String - keyIDLT: String - keyIDLTE: String - keyIDContains: String - keyIDHasPrefix: String - keyIDHasSuffix: String - keyIDEqualFold: String - keyIDContainsFold: String - """signature field predicates""" - signature: String - signatureNEQ: String - signatureIn: [String!] - signatureNotIn: [String!] - signatureGT: String - signatureGTE: String - signatureLT: String - signatureLTE: String - signatureContains: String - signatureHasPrefix: String - signatureHasSuffix: String - signatureEqualFold: String - signatureContainsFold: String - """dsse edge predicates""" - hasDsse: Boolean - hasDsseWith: [DsseWhereInput!] - """timestamps edge predicates""" - hasTimestamps: Boolean - hasTimestampsWith: [TimestampWhereInput!] -} -type Statement implements Node { - id: ID! - predicate: String! - subjects( - """Returns the elements in the list that come after the specified cursor.""" - after: Cursor - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the elements in the list that come before the specified cursor.""" - before: Cursor - - """Returns the last _n_ elements from the list.""" - last: Int - - """Filtering options for Subjects returned from the connection.""" - where: SubjectWhereInput - ): SubjectConnection! - attestationCollections: AttestationCollection - dsse: [Dsse!] -} -""" -StatementWhereInput is used for filtering Statement objects. -Input was generated by ent. -""" -input StatementWhereInput { - not: StatementWhereInput - and: [StatementWhereInput!] - or: [StatementWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """predicate field predicates""" - predicate: String - predicateNEQ: String - predicateIn: [String!] - predicateNotIn: [String!] - predicateGT: String - predicateGTE: String - predicateLT: String - predicateLTE: String - predicateContains: String - predicateHasPrefix: String - predicateHasSuffix: String - predicateEqualFold: String - predicateContainsFold: String - """subjects edge predicates""" - hasSubjects: Boolean - hasSubjectsWith: [SubjectWhereInput!] - """attestation_collections edge predicates""" - hasAttestationCollections: Boolean - hasAttestationCollectionsWith: [AttestationCollectionWhereInput!] - """dsse edge predicates""" - hasDsse: Boolean - hasDsseWith: [DsseWhereInput!] -} -type Subject implements Node { - id: ID! - name: String! - subjectDigests: [SubjectDigest!] - statement: Statement -} -"""A connection to a list of items.""" -type SubjectConnection { - """A list of edges.""" - edges: [SubjectEdge] - """Information to aid in pagination.""" - pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" - totalCount: Int! -} -type SubjectDigest implements Node { - id: ID! - algorithm: String! - value: String! - subject: Subject -} -""" -SubjectDigestWhereInput is used for filtering SubjectDigest objects. -Input was generated by ent. -""" -input SubjectDigestWhereInput { - not: SubjectDigestWhereInput - and: [SubjectDigestWhereInput!] - or: [SubjectDigestWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """algorithm field predicates""" - algorithm: String - algorithmNEQ: String - algorithmIn: [String!] - algorithmNotIn: [String!] - algorithmGT: String - algorithmGTE: String - algorithmLT: String - algorithmLTE: String - algorithmContains: String - algorithmHasPrefix: String - algorithmHasSuffix: String - algorithmEqualFold: String - algorithmContainsFold: String - """value field predicates""" - value: String - valueNEQ: String - valueIn: [String!] - valueNotIn: [String!] - valueGT: String - valueGTE: String - valueLT: String - valueLTE: String - valueContains: String - valueHasPrefix: String - valueHasSuffix: String - valueEqualFold: String - valueContainsFold: String - """subject edge predicates""" - hasSubject: Boolean - hasSubjectWith: [SubjectWhereInput!] -} -"""An edge in a connection.""" -type SubjectEdge { - """The item at the end of the edge.""" - node: Subject - """A cursor for use in pagination.""" - cursor: Cursor! -} -""" -SubjectWhereInput is used for filtering Subject objects. -Input was generated by ent. -""" -input SubjectWhereInput { - not: SubjectWhereInput - and: [SubjectWhereInput!] - or: [SubjectWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """name field predicates""" - name: String - nameNEQ: String - nameIn: [String!] - nameNotIn: [String!] - nameGT: String - nameGTE: String - nameLT: String - nameLTE: String - nameContains: String - nameHasPrefix: String - nameHasSuffix: String - nameEqualFold: String - nameContainsFold: String - """subject_digests edge predicates""" - hasSubjectDigests: Boolean - hasSubjectDigestsWith: [SubjectDigestWhereInput!] - """statement edge predicates""" - hasStatement: Boolean - hasStatementWith: [StatementWhereInput!] -} -type Timestamp implements Node { - id: ID! - type: String! - timestamp: Time! - signature: Signature -} -""" -TimestampWhereInput is used for filtering Timestamp objects. -Input was generated by ent. -""" -input TimestampWhereInput { - not: TimestampWhereInput - and: [TimestampWhereInput!] - or: [TimestampWhereInput!] - """id field predicates""" - id: ID - idNEQ: ID - idIn: [ID!] - idNotIn: [ID!] - idGT: ID - idGTE: ID - idLT: ID - idLTE: ID - """type field predicates""" - type: String - typeNEQ: String - typeIn: [String!] - typeNotIn: [String!] - typeGT: String - typeGTE: String - typeLT: String - typeLTE: String - typeContains: String - typeHasPrefix: String - typeHasSuffix: String - typeEqualFold: String - typeContainsFold: String - """timestamp field predicates""" - timestamp: Time - timestampNEQ: Time - timestampIn: [Time!] - timestampNotIn: [Time!] - timestampGT: Time - timestampGTE: Time - timestampLT: Time - timestampLTE: Time - """signature edge predicates""" - hasSignature: Boolean - hasSignatureWith: [SignatureWhereInput!] -} -`, BuiltIn: false}, + {Name: "archivista.graphql", Input: sourceData("archivista.graphql"), BuiltIn: false}, + {Name: "ent.graphql", Input: sourceData("ent.graphql"), BuiltIn: false}, } var parsedSchema = gqlparser.MustLoadSchema(sources...) @@ -2759,7 +2228,7 @@ func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field g ctx = graphql.WithFieldContext(ctx, fc) if fc.Args, err = ec.field_Query_node_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return + return fc, err } return fc, nil } @@ -2814,7 +2283,7 @@ func (ec *executionContext) fieldContext_Query_nodes(ctx context.Context, field ctx = graphql.WithFieldContext(ctx, fc) if fc.Args, err = ec.field_Query_nodes_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return + return fc, err } return fc, nil } @@ -2877,7 +2346,7 @@ func (ec *executionContext) fieldContext_Query_dsses(ctx context.Context, field ctx = graphql.WithFieldContext(ctx, fc) if fc.Args, err = ec.field_Query_dsses_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return + return fc, err } return fc, nil } @@ -2940,7 +2409,7 @@ func (ec *executionContext) fieldContext_Query_subjects(ctx context.Context, fie ctx = graphql.WithFieldContext(ctx, fc) if fc.Args, err = ec.field_Query_subjects_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return + return fc, err } return fc, nil } @@ -3014,7 +2483,7 @@ func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field ctx = graphql.WithFieldContext(ctx, fc) if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return + return fc, err } return fc, nil } @@ -3458,7 +2927,7 @@ func (ec *executionContext) fieldContext_Statement_subjects(ctx context.Context, ctx = graphql.WithFieldContext(ctx, fc) if fc.Args, err = ec.field_Statement_subjects_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return + return fc, err } return fc, nil } @@ -5790,7 +5259,7 @@ func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, fiel ctx = graphql.WithFieldContext(ctx, fc) if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return + return fc, err } return fc, nil } @@ -5978,7 +5447,7 @@ func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, ctx = graphql.WithFieldContext(ctx, fc) if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return + return fc, err } return fc, nil } @@ -6149,232 +5618,265 @@ func (ec *executionContext) unmarshalInputAttestationCollectionWhereInput(ctx co asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "name", "nameNEQ", "nameIn", "nameNotIn", "nameGT", "nameGTE", "nameLT", "nameLTE", "nameContains", "nameHasPrefix", "nameHasSuffix", "nameEqualFold", "nameContainsFold", "hasAttestations", "hasAttestationsWith", "hasStatement", "hasStatementWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOAttestationCollectionWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInput(ctx, v) + data, err := ec.unmarshalOAttestationCollectionWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOAttestationCollectionWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOAttestationCollectionWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOAttestationCollectionWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOAttestationCollectionWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "name": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - it.Name, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Name = data case "nameNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameNEQ")) - it.NameNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameNEQ = data case "nameIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameIn")) - it.NameIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.NameIn = data case "nameNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameNotIn")) - it.NameNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.NameNotIn = data case "nameGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameGT")) - it.NameGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameGT = data case "nameGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameGTE")) - it.NameGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameGTE = data case "nameLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameLT")) - it.NameLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameLT = data case "nameLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameLTE")) - it.NameLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameLTE = data case "nameContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameContains")) - it.NameContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameContains = data case "nameHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameHasPrefix")) - it.NameHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameHasPrefix = data case "nameHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameHasSuffix")) - it.NameHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameHasSuffix = data case "nameEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameEqualFold")) - it.NameEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameEqualFold = data case "nameContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameContainsFold")) - it.NameContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameContainsFold = data case "hasAttestations": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasAttestations")) - it.HasAttestations, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasAttestations = data case "hasAttestationsWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasAttestationsWith")) - it.HasAttestationsWith, err = ec.unmarshalOAttestationWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOAttestationWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasAttestationsWith = data case "hasStatement": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasStatement")) - it.HasStatement, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasStatement = data case "hasStatementWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasStatementWith")) - it.HasStatementWith, err = ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasStatementWith = data } } @@ -6388,216 +5890,247 @@ func (ec *executionContext) unmarshalInputAttestationWhereInput(ctx context.Cont asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "type", "typeNEQ", "typeIn", "typeNotIn", "typeGT", "typeGTE", "typeLT", "typeLTE", "typeContains", "typeHasPrefix", "typeHasSuffix", "typeEqualFold", "typeContainsFold", "hasAttestationCollection", "hasAttestationCollectionWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOAttestationWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationWhereInput(ctx, v) + data, err := ec.unmarshalOAttestationWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOAttestationWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOAttestationWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOAttestationWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOAttestationWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "type": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) - it.Type, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Type = data case "typeNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeNEQ")) - it.TypeNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeNEQ = data case "typeIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeIn")) - it.TypeIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.TypeIn = data case "typeNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeNotIn")) - it.TypeNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.TypeNotIn = data case "typeGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeGT")) - it.TypeGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeGT = data case "typeGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeGTE")) - it.TypeGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeGTE = data case "typeLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeLT")) - it.TypeLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeLT = data case "typeLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeLTE")) - it.TypeLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeLTE = data case "typeContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeContains")) - it.TypeContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeContains = data case "typeHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeHasPrefix")) - it.TypeHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeHasPrefix = data case "typeHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeHasSuffix")) - it.TypeHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeHasSuffix = data case "typeEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeEqualFold")) - it.TypeEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeEqualFold = data case "typeContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeContainsFold")) - it.TypeContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeContainsFold = data case "hasAttestationCollection": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasAttestationCollection")) - it.HasAttestationCollection, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasAttestationCollection = data case "hasAttestationCollectionWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasAttestationCollectionWith")) - it.HasAttestationCollectionWith, err = ec.unmarshalOAttestationCollectionWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOAttestationCollectionWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasAttestationCollectionWith = data } } @@ -6611,352 +6144,400 @@ func (ec *executionContext) unmarshalInputDsseWhereInput(ctx context.Context, ob asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "gitoidSha256", "gitoidSha256NEQ", "gitoidSha256In", "gitoidSha256NotIn", "gitoidSha256GT", "gitoidSha256GTE", "gitoidSha256LT", "gitoidSha256LTE", "gitoidSha256Contains", "gitoidSha256HasPrefix", "gitoidSha256HasSuffix", "gitoidSha256EqualFold", "gitoidSha256ContainsFold", "payloadType", "payloadTypeNEQ", "payloadTypeIn", "payloadTypeNotIn", "payloadTypeGT", "payloadTypeGTE", "payloadTypeLT", "payloadTypeLTE", "payloadTypeContains", "payloadTypeHasPrefix", "payloadTypeHasSuffix", "payloadTypeEqualFold", "payloadTypeContainsFold", "hasStatement", "hasStatementWith", "hasSignatures", "hasSignaturesWith", "hasPayloadDigests", "hasPayloadDigestsWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalODsseWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInput(ctx, v) + data, err := ec.unmarshalODsseWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) + data, err := ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) + data, err := ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "gitoidSha256": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256")) - it.GitoidSha256, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256 = data case "gitoidSha256NEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256NEQ")) - it.GitoidSha256NEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256NEQ = data case "gitoidSha256In": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256In")) - it.GitoidSha256In, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.GitoidSha256In = data case "gitoidSha256NotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256NotIn")) - it.GitoidSha256NotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.GitoidSha256NotIn = data case "gitoidSha256GT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256GT")) - it.GitoidSha256GT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256GT = data case "gitoidSha256GTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256GTE")) - it.GitoidSha256GTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256GTE = data case "gitoidSha256LT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256LT")) - it.GitoidSha256LT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256LT = data case "gitoidSha256LTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256LTE")) - it.GitoidSha256LTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256LTE = data case "gitoidSha256Contains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256Contains")) - it.GitoidSha256Contains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256Contains = data case "gitoidSha256HasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256HasPrefix")) - it.GitoidSha256HasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256HasPrefix = data case "gitoidSha256HasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256HasSuffix")) - it.GitoidSha256HasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256HasSuffix = data case "gitoidSha256EqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256EqualFold")) - it.GitoidSha256EqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256EqualFold = data case "gitoidSha256ContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitoidSha256ContainsFold")) - it.GitoidSha256ContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.GitoidSha256ContainsFold = data case "payloadType": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadType")) - it.PayloadType, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadType = data case "payloadTypeNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeNEQ")) - it.PayloadTypeNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeNEQ = data case "payloadTypeIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeIn")) - it.PayloadTypeIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.PayloadTypeIn = data case "payloadTypeNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeNotIn")) - it.PayloadTypeNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.PayloadTypeNotIn = data case "payloadTypeGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeGT")) - it.PayloadTypeGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeGT = data case "payloadTypeGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeGTE")) - it.PayloadTypeGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeGTE = data case "payloadTypeLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeLT")) - it.PayloadTypeLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeLT = data case "payloadTypeLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeLTE")) - it.PayloadTypeLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeLTE = data case "payloadTypeContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeContains")) - it.PayloadTypeContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeContains = data case "payloadTypeHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeHasPrefix")) - it.PayloadTypeHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeHasPrefix = data case "payloadTypeHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeHasSuffix")) - it.PayloadTypeHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeHasSuffix = data case "payloadTypeEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeEqualFold")) - it.PayloadTypeEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeEqualFold = data case "payloadTypeContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("payloadTypeContainsFold")) - it.PayloadTypeContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PayloadTypeContainsFold = data case "hasStatement": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasStatement")) - it.HasStatement, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasStatement = data case "hasStatementWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasStatementWith")) - it.HasStatementWith, err = ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasStatementWith = data case "hasSignatures": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSignatures")) - it.HasSignatures, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasSignatures = data case "hasSignaturesWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSignaturesWith")) - it.HasSignaturesWith, err = ec.unmarshalOSignatureWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSignatureWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasSignaturesWith = data case "hasPayloadDigests": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasPayloadDigests")) - it.HasPayloadDigests, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasPayloadDigests = data case "hasPayloadDigestsWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasPayloadDigestsWith")) - it.HasPayloadDigestsWith, err = ec.unmarshalOPayloadDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐPayloadDigestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOPayloadDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐPayloadDigestWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasPayloadDigestsWith = data } } @@ -6970,320 +6551,364 @@ func (ec *executionContext) unmarshalInputPayloadDigestWhereInput(ctx context.Co asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "algorithm", "algorithmNEQ", "algorithmIn", "algorithmNotIn", "algorithmGT", "algorithmGTE", "algorithmLT", "algorithmLTE", "algorithmContains", "algorithmHasPrefix", "algorithmHasSuffix", "algorithmEqualFold", "algorithmContainsFold", "value", "valueNEQ", "valueIn", "valueNotIn", "valueGT", "valueGTE", "valueLT", "valueLTE", "valueContains", "valueHasPrefix", "valueHasSuffix", "valueEqualFold", "valueContainsFold", "hasDsse", "hasDsseWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOPayloadDigestWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐPayloadDigestWhereInput(ctx, v) + data, err := ec.unmarshalOPayloadDigestWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐPayloadDigestWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOPayloadDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐPayloadDigestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOPayloadDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐPayloadDigestWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOPayloadDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐPayloadDigestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOPayloadDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐPayloadDigestWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "algorithm": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithm")) - it.Algorithm, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Algorithm = data case "algorithmNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmNEQ")) - it.AlgorithmNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmNEQ = data case "algorithmIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmIn")) - it.AlgorithmIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.AlgorithmIn = data case "algorithmNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmNotIn")) - it.AlgorithmNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.AlgorithmNotIn = data case "algorithmGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmGT")) - it.AlgorithmGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmGT = data case "algorithmGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmGTE")) - it.AlgorithmGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmGTE = data case "algorithmLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmLT")) - it.AlgorithmLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmLT = data case "algorithmLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmLTE")) - it.AlgorithmLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmLTE = data case "algorithmContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmContains")) - it.AlgorithmContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmContains = data case "algorithmHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmHasPrefix")) - it.AlgorithmHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmHasPrefix = data case "algorithmHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmHasSuffix")) - it.AlgorithmHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmHasSuffix = data case "algorithmEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmEqualFold")) - it.AlgorithmEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmEqualFold = data case "algorithmContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmContainsFold")) - it.AlgorithmContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmContainsFold = data case "value": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) - it.Value, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Value = data case "valueNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueNEQ")) - it.ValueNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueNEQ = data case "valueIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueIn")) - it.ValueIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.ValueIn = data case "valueNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueNotIn")) - it.ValueNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.ValueNotIn = data case "valueGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueGT")) - it.ValueGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueGT = data case "valueGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueGTE")) - it.ValueGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueGTE = data case "valueLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueLT")) - it.ValueLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueLT = data case "valueLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueLTE")) - it.ValueLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueLTE = data case "valueContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueContains")) - it.ValueContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueContains = data case "valueHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueHasPrefix")) - it.ValueHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueHasPrefix = data case "valueHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueHasSuffix")) - it.ValueHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueHasSuffix = data case "valueEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueEqualFold")) - it.ValueEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueEqualFold = data case "valueContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueContainsFold")) - it.ValueContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueContainsFold = data case "hasDsse": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasDsse")) - it.HasDsse, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasDsse = data case "hasDsseWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasDsseWith")) - it.HasDsseWith, err = ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) + data, err := ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasDsseWith = data } } @@ -7297,336 +6922,382 @@ func (ec *executionContext) unmarshalInputSignatureWhereInput(ctx context.Contex asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "keyID", "keyIDNEQ", "keyIDIn", "keyIDNotIn", "keyIDGT", "keyIDGTE", "keyIDLT", "keyIDLTE", "keyIDContains", "keyIDHasPrefix", "keyIDHasSuffix", "keyIDEqualFold", "keyIDContainsFold", "signature", "signatureNEQ", "signatureIn", "signatureNotIn", "signatureGT", "signatureGTE", "signatureLT", "signatureLTE", "signatureContains", "signatureHasPrefix", "signatureHasSuffix", "signatureEqualFold", "signatureContainsFold", "hasDsse", "hasDsseWith", "hasTimestamps", "hasTimestampsWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOSignatureWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInput(ctx, v) + data, err := ec.unmarshalOSignatureWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOSignatureWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSignatureWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOSignatureWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSignatureWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "keyID": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyID")) - it.KeyID, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyID = data case "keyIDNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDNEQ")) - it.KeyIDNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDNEQ = data case "keyIDIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDIn")) - it.KeyIDIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.KeyIDIn = data case "keyIDNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDNotIn")) - it.KeyIDNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.KeyIDNotIn = data case "keyIDGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDGT")) - it.KeyIDGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDGT = data case "keyIDGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDGTE")) - it.KeyIDGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDGTE = data case "keyIDLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDLT")) - it.KeyIDLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDLT = data case "keyIDLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDLTE")) - it.KeyIDLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDLTE = data case "keyIDContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDContains")) - it.KeyIDContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDContains = data case "keyIDHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDHasPrefix")) - it.KeyIDHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDHasPrefix = data case "keyIDHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDHasSuffix")) - it.KeyIDHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDHasSuffix = data case "keyIDEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDEqualFold")) - it.KeyIDEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDEqualFold = data case "keyIDContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyIDContainsFold")) - it.KeyIDContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.KeyIDContainsFold = data case "signature": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signature")) - it.Signature, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Signature = data case "signatureNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureNEQ")) - it.SignatureNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureNEQ = data case "signatureIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureIn")) - it.SignatureIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.SignatureIn = data case "signatureNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureNotIn")) - it.SignatureNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.SignatureNotIn = data case "signatureGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureGT")) - it.SignatureGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureGT = data case "signatureGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureGTE")) - it.SignatureGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureGTE = data case "signatureLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureLT")) - it.SignatureLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureLT = data case "signatureLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureLTE")) - it.SignatureLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureLTE = data case "signatureContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureContains")) - it.SignatureContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureContains = data case "signatureHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureHasPrefix")) - it.SignatureHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureHasPrefix = data case "signatureHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureHasSuffix")) - it.SignatureHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureHasSuffix = data case "signatureEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureEqualFold")) - it.SignatureEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureEqualFold = data case "signatureContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("signatureContainsFold")) - it.SignatureContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.SignatureContainsFold = data case "hasDsse": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasDsse")) - it.HasDsse, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasDsse = data case "hasDsseWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasDsseWith")) - it.HasDsseWith, err = ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) + data, err := ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasDsseWith = data case "hasTimestamps": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTimestamps")) - it.HasTimestamps, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasTimestamps = data case "hasTimestampsWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasTimestampsWith")) - it.HasTimestampsWith, err = ec.unmarshalOTimestampWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐTimestampWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTimestampWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐTimestampWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasTimestampsWith = data } } @@ -7640,248 +7311,283 @@ func (ec *executionContext) unmarshalInputStatementWhereInput(ctx context.Contex asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "predicate", "predicateNEQ", "predicateIn", "predicateNotIn", "predicateGT", "predicateGTE", "predicateLT", "predicateLTE", "predicateContains", "predicateHasPrefix", "predicateHasSuffix", "predicateEqualFold", "predicateContainsFold", "hasSubjects", "hasSubjectsWith", "hasAttestationCollections", "hasAttestationCollectionsWith", "hasDsse", "hasDsseWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOStatementWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInput(ctx, v) + data, err := ec.unmarshalOStatementWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "predicate": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicate")) - it.Predicate, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Predicate = data case "predicateNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateNEQ")) - it.PredicateNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateNEQ = data case "predicateIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateIn")) - it.PredicateIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.PredicateIn = data case "predicateNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateNotIn")) - it.PredicateNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.PredicateNotIn = data case "predicateGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateGT")) - it.PredicateGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateGT = data case "predicateGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateGTE")) - it.PredicateGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateGTE = data case "predicateLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateLT")) - it.PredicateLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateLT = data case "predicateLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateLTE")) - it.PredicateLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateLTE = data case "predicateContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateContains")) - it.PredicateContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateContains = data case "predicateHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateHasPrefix")) - it.PredicateHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateHasPrefix = data case "predicateHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateHasSuffix")) - it.PredicateHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateHasSuffix = data case "predicateEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateEqualFold")) - it.PredicateEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateEqualFold = data case "predicateContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("predicateContainsFold")) - it.PredicateContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.PredicateContainsFold = data case "hasSubjects": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSubjects")) - it.HasSubjects, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasSubjects = data case "hasSubjectsWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSubjectsWith")) - it.HasSubjectsWith, err = ec.unmarshalOSubjectWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSubjectWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasSubjectsWith = data case "hasAttestationCollections": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasAttestationCollections")) - it.HasAttestationCollections, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasAttestationCollections = data case "hasAttestationCollectionsWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasAttestationCollectionsWith")) - it.HasAttestationCollectionsWith, err = ec.unmarshalOAttestationCollectionWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOAttestationCollectionWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐAttestationCollectionWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasAttestationCollectionsWith = data case "hasDsse": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasDsse")) - it.HasDsse, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasDsse = data case "hasDsseWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasDsseWith")) - it.HasDsseWith, err = ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) + data, err := ec.unmarshalODsseWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐDsseWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasDsseWith = data } } @@ -7895,320 +7601,364 @@ func (ec *executionContext) unmarshalInputSubjectDigestWhereInput(ctx context.Co asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "algorithm", "algorithmNEQ", "algorithmIn", "algorithmNotIn", "algorithmGT", "algorithmGTE", "algorithmLT", "algorithmLTE", "algorithmContains", "algorithmHasPrefix", "algorithmHasSuffix", "algorithmEqualFold", "algorithmContainsFold", "value", "valueNEQ", "valueIn", "valueNotIn", "valueGT", "valueGTE", "valueLT", "valueLTE", "valueContains", "valueHasPrefix", "valueHasSuffix", "valueEqualFold", "valueContainsFold", "hasSubject", "hasSubjectWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOSubjectDigestWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectDigestWhereInput(ctx, v) + data, err := ec.unmarshalOSubjectDigestWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectDigestWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOSubjectDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectDigestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSubjectDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectDigestWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOSubjectDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectDigestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSubjectDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectDigestWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "algorithm": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithm")) - it.Algorithm, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Algorithm = data case "algorithmNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmNEQ")) - it.AlgorithmNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmNEQ = data case "algorithmIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmIn")) - it.AlgorithmIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.AlgorithmIn = data case "algorithmNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmNotIn")) - it.AlgorithmNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.AlgorithmNotIn = data case "algorithmGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmGT")) - it.AlgorithmGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmGT = data case "algorithmGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmGTE")) - it.AlgorithmGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmGTE = data case "algorithmLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmLT")) - it.AlgorithmLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmLT = data case "algorithmLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmLTE")) - it.AlgorithmLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmLTE = data case "algorithmContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmContains")) - it.AlgorithmContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmContains = data case "algorithmHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmHasPrefix")) - it.AlgorithmHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmHasPrefix = data case "algorithmHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmHasSuffix")) - it.AlgorithmHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmHasSuffix = data case "algorithmEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmEqualFold")) - it.AlgorithmEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmEqualFold = data case "algorithmContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("algorithmContainsFold")) - it.AlgorithmContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.AlgorithmContainsFold = data case "value": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) - it.Value, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Value = data case "valueNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueNEQ")) - it.ValueNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueNEQ = data case "valueIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueIn")) - it.ValueIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.ValueIn = data case "valueNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueNotIn")) - it.ValueNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.ValueNotIn = data case "valueGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueGT")) - it.ValueGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueGT = data case "valueGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueGTE")) - it.ValueGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueGTE = data case "valueLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueLT")) - it.ValueLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueLT = data case "valueLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueLTE")) - it.ValueLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueLTE = data case "valueContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueContains")) - it.ValueContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueContains = data case "valueHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueHasPrefix")) - it.ValueHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueHasPrefix = data case "valueHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueHasSuffix")) - it.ValueHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueHasSuffix = data case "valueEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueEqualFold")) - it.ValueEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueEqualFold = data case "valueContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("valueContainsFold")) - it.ValueContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.ValueContainsFold = data case "hasSubject": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSubject")) - it.HasSubject, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasSubject = data case "hasSubjectWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSubjectWith")) - it.HasSubjectWith, err = ec.unmarshalOSubjectWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSubjectWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasSubjectWith = data } } @@ -8222,232 +7972,265 @@ func (ec *executionContext) unmarshalInputSubjectWhereInput(ctx context.Context, asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "name", "nameNEQ", "nameIn", "nameNotIn", "nameGT", "nameGTE", "nameLT", "nameLTE", "nameContains", "nameHasPrefix", "nameHasSuffix", "nameEqualFold", "nameContainsFold", "hasSubjectDigests", "hasSubjectDigestsWith", "hasStatement", "hasStatementWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOSubjectWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInput(ctx, v) + data, err := ec.unmarshalOSubjectWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOSubjectWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSubjectWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOSubjectWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSubjectWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "name": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - it.Name, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Name = data case "nameNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameNEQ")) - it.NameNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameNEQ = data case "nameIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameIn")) - it.NameIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.NameIn = data case "nameNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameNotIn")) - it.NameNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.NameNotIn = data case "nameGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameGT")) - it.NameGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameGT = data case "nameGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameGTE")) - it.NameGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameGTE = data case "nameLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameLT")) - it.NameLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameLT = data case "nameLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameLTE")) - it.NameLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameLTE = data case "nameContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameContains")) - it.NameContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameContains = data case "nameHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameHasPrefix")) - it.NameHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameHasPrefix = data case "nameHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameHasSuffix")) - it.NameHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameHasSuffix = data case "nameEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameEqualFold")) - it.NameEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameEqualFold = data case "nameContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameContainsFold")) - it.NameContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.NameContainsFold = data case "hasSubjectDigests": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSubjectDigests")) - it.HasSubjectDigests, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasSubjectDigests = data case "hasSubjectDigestsWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSubjectDigestsWith")) - it.HasSubjectDigestsWith, err = ec.unmarshalOSubjectDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectDigestWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSubjectDigestWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSubjectDigestWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasSubjectDigestsWith = data case "hasStatement": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasStatement")) - it.HasStatement, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasStatement = data case "hasStatementWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasStatementWith")) - it.HasStatementWith, err = ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOStatementWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐStatementWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasStatementWith = data } } @@ -8461,280 +8244,319 @@ func (ec *executionContext) unmarshalInputTimestampWhereInput(ctx context.Contex asMap[k] = v } - for k, v := range asMap { + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "type", "typeNEQ", "typeIn", "typeNotIn", "typeGT", "typeGTE", "typeLT", "typeLTE", "typeContains", "typeHasPrefix", "typeHasSuffix", "typeEqualFold", "typeContainsFold", "timestamp", "timestampNEQ", "timestampIn", "timestampNotIn", "timestampGT", "timestampGTE", "timestampLT", "timestampLTE", "hasSignature", "hasSignatureWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "not": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - it.Not, err = ec.unmarshalOTimestampWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐTimestampWhereInput(ctx, v) + data, err := ec.unmarshalOTimestampWhereInput2ᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐTimestampWhereInput(ctx, v) if err != nil { return it, err } + it.Not = data case "and": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - it.And, err = ec.unmarshalOTimestampWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐTimestampWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTimestampWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐTimestampWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.And = data case "or": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - it.Or, err = ec.unmarshalOTimestampWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐTimestampWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOTimestampWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐTimestampWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.Or = data case "id": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) - it.ID, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.ID = data case "idNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) - it.IDNEQ, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDNEQ = data case "idIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) - it.IDIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDIn = data case "idNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) - it.IDNotIn, err = ec.unmarshalOID2ᚕintᚄ(ctx, v) + data, err := ec.unmarshalOID2ᚕintᚄ(ctx, v) if err != nil { return it, err } + it.IDNotIn = data case "idGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) - it.IDGT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGT = data case "idGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) - it.IDGTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDGTE = data case "idLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) - it.IDLT, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLT = data case "idLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) - it.IDLTE, err = ec.unmarshalOID2ᚖint(ctx, v) + data, err := ec.unmarshalOID2ᚖint(ctx, v) if err != nil { return it, err } + it.IDLTE = data case "type": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) - it.Type, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.Type = data case "typeNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeNEQ")) - it.TypeNEQ, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeNEQ = data case "typeIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeIn")) - it.TypeIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.TypeIn = data case "typeNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeNotIn")) - it.TypeNotIn, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } + it.TypeNotIn = data case "typeGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeGT")) - it.TypeGT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeGT = data case "typeGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeGTE")) - it.TypeGTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeGTE = data case "typeLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeLT")) - it.TypeLT, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeLT = data case "typeLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeLTE")) - it.TypeLTE, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeLTE = data case "typeContains": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeContains")) - it.TypeContains, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeContains = data case "typeHasPrefix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeHasPrefix")) - it.TypeHasPrefix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeHasPrefix = data case "typeHasSuffix": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeHasSuffix")) - it.TypeHasSuffix, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeHasSuffix = data case "typeEqualFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeEqualFold")) - it.TypeEqualFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeEqualFold = data case "typeContainsFold": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("typeContainsFold")) - it.TypeContainsFold, err = ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } + it.TypeContainsFold = data case "timestamp": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timestamp")) - it.Timestamp, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) if err != nil { return it, err } + it.Timestamp = data case "timestampNEQ": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timestampNEQ")) - it.TimestampNEQ, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) if err != nil { return it, err } + it.TimestampNEQ = data case "timestampIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timestampIn")) - it.TimestampIn, err = ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) if err != nil { return it, err } + it.TimestampIn = data case "timestampNotIn": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timestampNotIn")) - it.TimestampNotIn, err = ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) if err != nil { return it, err } + it.TimestampNotIn = data case "timestampGT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timestampGT")) - it.TimestampGT, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) if err != nil { return it, err } + it.TimestampGT = data case "timestampGTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timestampGTE")) - it.TimestampGTE, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) if err != nil { return it, err } + it.TimestampGTE = data case "timestampLT": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timestampLT")) - it.TimestampLT, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) if err != nil { return it, err } + it.TimestampLT = data case "timestampLTE": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timestampLTE")) - it.TimestampLTE, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) if err != nil { return it, err } + it.TimestampLTE = data case "hasSignature": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSignature")) - it.HasSignature, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } + it.HasSignature = data case "hasSignatureWith": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasSignatureWith")) - it.HasSignatureWith, err = ec.unmarshalOSignatureWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOSignatureWhereInput2ᚕᚖgithubᚗcomᚋtestifysecᚋarchivistaᚋentᚐSignatureWhereInputᚄ(ctx, v) if err != nil { return it, err } + it.HasSignatureWith = data } } @@ -8807,30 +8629,27 @@ var attestationImplementors = []string{"Attestation", "Node"} func (ec *executionContext) _Attestation(ctx context.Context, sel ast.SelectionSet, obj *ent.Attestation) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, attestationImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Attestation") case "id": - out.Values[i] = ec._Attestation_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "type": - out.Values[i] = ec._Attestation_type(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "attestationCollection": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -8838,23 +8657,51 @@ func (ec *executionContext) _Attestation(ctx context.Context, sel ast.SelectionS }() res = ec._Attestation_attestationCollection(ctx, field, obj) if res == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&fs.Invalids, 1) } return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -8862,30 +8709,27 @@ var attestationCollectionImplementors = []string{"AttestationCollection", "Node" func (ec *executionContext) _AttestationCollection(ctx context.Context, sel ast.SelectionSet, obj *ent.AttestationCollection) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, attestationCollectionImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("AttestationCollection") case "id": - out.Values[i] = ec._AttestationCollection_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "name": - out.Values[i] = ec._AttestationCollection_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "attestations": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -8895,14 +8739,30 @@ func (ec *executionContext) _AttestationCollection(ctx context.Context, sel ast. return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "statement": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -8910,23 +8770,51 @@ func (ec *executionContext) _AttestationCollection(ctx context.Context, sel ast. }() res = ec._AttestationCollection_statement(ctx, field, obj) if res == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&fs.Invalids, 1) } return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -8934,37 +8822,32 @@ var dsseImplementors = []string{"Dsse", "Node"} func (ec *executionContext) _Dsse(ctx context.Context, sel ast.SelectionSet, obj *ent.Dsse) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, dsseImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Dsse") case "id": - out.Values[i] = ec._Dsse_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "gitoidSha256": - out.Values[i] = ec._Dsse_gitoidSha256(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "payloadType": - out.Values[i] = ec._Dsse_payloadType(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "statement": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -8974,14 +8857,30 @@ func (ec *executionContext) _Dsse(ctx context.Context, sel ast.SelectionSet, obj return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "signatures": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -8991,14 +8890,30 @@ func (ec *executionContext) _Dsse(ctx context.Context, sel ast.SelectionSet, obj return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "payloadDigests": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9008,18 +8923,46 @@ func (ec *executionContext) _Dsse(ctx context.Context, sel ast.SelectionSet, obj return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9027,38 +8970,45 @@ var dsseConnectionImplementors = []string{"DsseConnection"} func (ec *executionContext) _DsseConnection(ctx context.Context, sel ast.SelectionSet, obj *ent.DsseConnection) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, dsseConnectionImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("DsseConnection") case "edges": - out.Values[i] = ec._DsseConnection_edges(ctx, field, obj) - case "pageInfo": - out.Values[i] = ec._DsseConnection_pageInfo(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "totalCount": - out.Values[i] = ec._DsseConnection_totalCount(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9066,31 +9016,40 @@ var dsseEdgeImplementors = []string{"DsseEdge"} func (ec *executionContext) _DsseEdge(ctx context.Context, sel ast.SelectionSet, obj *ent.DsseEdge) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, dsseEdgeImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("DsseEdge") case "node": - out.Values[i] = ec._DsseEdge_node(ctx, field, obj) - case "cursor": - out.Values[i] = ec._DsseEdge_cursor(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9098,42 +9057,47 @@ var pageInfoImplementors = []string{"PageInfo"} func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *entgql.PageInfo[int]) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, pageInfoImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("PageInfo") case "hasNextPage": - out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "hasPreviousPage": - out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "startCursor": - out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) - case "endCursor": - out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) - default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9141,37 +9105,32 @@ var payloadDigestImplementors = []string{"PayloadDigest", "Node"} func (ec *executionContext) _PayloadDigest(ctx context.Context, sel ast.SelectionSet, obj *ent.PayloadDigest) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, payloadDigestImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("PayloadDigest") case "id": - out.Values[i] = ec._PayloadDigest_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "algorithm": - out.Values[i] = ec._PayloadDigest_algorithm(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "value": - out.Values[i] = ec._PayloadDigest_value(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "dsse": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9181,18 +9140,46 @@ func (ec *executionContext) _PayloadDigest(ctx context.Context, sel ast.Selectio return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9205,7 +9192,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }) out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ Object: field.Name, @@ -9218,7 +9205,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "node": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9229,16 +9216,15 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } - out.Concurrently(i, func() graphql.Marshaler { - return rrm(innerCtx) - }) + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "nodes": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9246,22 +9232,21 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_nodes(ctx, field) if res == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&fs.Invalids, 1) } return res } rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } - out.Concurrently(i, func() graphql.Marshaler { - return rrm(innerCtx) - }) + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "dsses": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9269,22 +9254,21 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_dsses(ctx, field) if res == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&fs.Invalids, 1) } return res } rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } - out.Concurrently(i, func() graphql.Marshaler { - return rrm(innerCtx) - }) + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "subjects": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9292,38 +9276,45 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_subjects(ctx, field) if res == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&fs.Invalids, 1) } return res } rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } - out.Concurrently(i, func() graphql.Marshaler { - return rrm(innerCtx) - }) + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "__type": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Query___type(ctx, field) }) - case "__schema": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Query___schema(ctx, field) }) - default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9331,37 +9322,32 @@ var signatureImplementors = []string{"Signature", "Node"} func (ec *executionContext) _Signature(ctx context.Context, sel ast.SelectionSet, obj *ent.Signature) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, signatureImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Signature") case "id": - out.Values[i] = ec._Signature_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "keyID": - out.Values[i] = ec._Signature_keyID(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "signature": - out.Values[i] = ec._Signature_signature(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "dsse": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9371,14 +9357,30 @@ func (ec *executionContext) _Signature(ctx context.Context, sel ast.SelectionSet return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "timestamps": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9388,18 +9390,46 @@ func (ec *executionContext) _Signature(ctx context.Context, sel ast.SelectionSet return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9407,30 +9437,27 @@ var statementImplementors = []string{"Statement", "Node"} func (ec *executionContext) _Statement(ctx context.Context, sel ast.SelectionSet, obj *ent.Statement) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, statementImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Statement") case "id": - out.Values[i] = ec._Statement_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "predicate": - out.Values[i] = ec._Statement_predicate(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "subjects": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9438,19 +9465,35 @@ func (ec *executionContext) _Statement(ctx context.Context, sel ast.SelectionSet }() res = ec._Statement_subjects(ctx, field, obj) if res == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&fs.Invalids, 1) } return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "attestationCollections": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9460,14 +9503,30 @@ func (ec *executionContext) _Statement(ctx context.Context, sel ast.SelectionSet return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "dsse": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9477,18 +9536,46 @@ func (ec *executionContext) _Statement(ctx context.Context, sel ast.SelectionSet return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9496,30 +9583,27 @@ var subjectImplementors = []string{"Subject", "Node"} func (ec *executionContext) _Subject(ctx context.Context, sel ast.SelectionSet, obj *ent.Subject) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, subjectImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Subject") case "id": - out.Values[i] = ec._Subject_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "name": - out.Values[i] = ec._Subject_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "subjectDigests": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9529,14 +9613,30 @@ func (ec *executionContext) _Subject(ctx context.Context, sel ast.SelectionSet, return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "statement": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9546,18 +9646,46 @@ func (ec *executionContext) _Subject(ctx context.Context, sel ast.SelectionSet, return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9565,38 +9693,45 @@ var subjectConnectionImplementors = []string{"SubjectConnection"} func (ec *executionContext) _SubjectConnection(ctx context.Context, sel ast.SelectionSet, obj *ent.SubjectConnection) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, subjectConnectionImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("SubjectConnection") case "edges": - out.Values[i] = ec._SubjectConnection_edges(ctx, field, obj) - case "pageInfo": - out.Values[i] = ec._SubjectConnection_pageInfo(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "totalCount": - out.Values[i] = ec._SubjectConnection_totalCount(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9604,37 +9739,32 @@ var subjectDigestImplementors = []string{"SubjectDigest", "Node"} func (ec *executionContext) _SubjectDigest(ctx context.Context, sel ast.SelectionSet, obj *ent.SubjectDigest) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, subjectDigestImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("SubjectDigest") case "id": - out.Values[i] = ec._SubjectDigest_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "algorithm": - out.Values[i] = ec._SubjectDigest_algorithm(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "value": - out.Values[i] = ec._SubjectDigest_value(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "subject": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9644,18 +9774,46 @@ func (ec *executionContext) _SubjectDigest(ctx context.Context, sel ast.Selectio return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9663,31 +9821,40 @@ var subjectEdgeImplementors = []string{"SubjectEdge"} func (ec *executionContext) _SubjectEdge(ctx context.Context, sel ast.SelectionSet, obj *ent.SubjectEdge) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, subjectEdgeImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("SubjectEdge") case "node": - out.Values[i] = ec._SubjectEdge_node(ctx, field, obj) - case "cursor": - out.Values[i] = ec._SubjectEdge_cursor(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9695,37 +9862,32 @@ var timestampImplementors = []string{"Timestamp", "Node"} func (ec *executionContext) _Timestamp(ctx context.Context, sel ast.SelectionSet, obj *ent.Timestamp) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, timestampImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Timestamp") case "id": - out.Values[i] = ec._Timestamp_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "type": - out.Values[i] = ec._Timestamp_type(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "timestamp": - out.Values[i] = ec._Timestamp_timestamp(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) + atomic.AddUint32(&out.Invalids, 1) } case "signature": field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9735,18 +9897,46 @@ func (ec *executionContext) _Timestamp(ctx context.Context, sel ast.SelectionSet return res } - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9754,52 +9944,55 @@ var __DirectiveImplementors = []string{"__Directive"} func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Directive") case "name": - out.Values[i] = ec.___Directive_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "description": - out.Values[i] = ec.___Directive_description(ctx, field, obj) - case "locations": - out.Values[i] = ec.___Directive_locations(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "args": - out.Values[i] = ec.___Directive_args(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "isRepeatable": - out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9807,42 +10000,47 @@ var __EnumValueImplementors = []string{"__EnumValue"} func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__EnumValue") case "name": - out.Values[i] = ec.___EnumValue_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "description": - out.Values[i] = ec.___EnumValue_description(ctx, field, obj) - case "isDeprecated": - out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "deprecationReason": - out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) - default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9850,56 +10048,57 @@ var __FieldImplementors = []string{"__Field"} func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Field") case "name": - out.Values[i] = ec.___Field_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "description": - out.Values[i] = ec.___Field_description(ctx, field, obj) - case "args": - out.Values[i] = ec.___Field_args(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "type": - out.Values[i] = ec.___Field_type(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "isDeprecated": - out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "deprecationReason": - out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) - default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9907,42 +10106,47 @@ var __InputValueImplementors = []string{"__InputValue"} func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__InputValue") case "name": - out.Values[i] = ec.___InputValue_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "description": - out.Values[i] = ec.___InputValue_description(ctx, field, obj) - case "type": - out.Values[i] = ec.___InputValue_type(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "defaultValue": - out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) - default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -9950,53 +10154,54 @@ var __SchemaImplementors = []string{"__Schema"} func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Schema") case "description": - out.Values[i] = ec.___Schema_description(ctx, field, obj) - case "types": - out.Values[i] = ec.___Schema_types(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "queryType": - out.Values[i] = ec.___Schema_queryType(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "mutationType": - out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) - case "subscriptionType": - out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) - case "directives": - out.Values[i] = ec.___Schema_directives(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } @@ -10004,63 +10209,56 @@ var __TypeImplementors = []string{"__Type"} func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) + out := graphql.NewFieldSet(fields) - var invalids uint32 + deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Type") case "kind": - out.Values[i] = ec.___Type_kind(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalids++ + out.Invalids++ } case "name": - out.Values[i] = ec.___Type_name(ctx, field, obj) - case "description": - out.Values[i] = ec.___Type_description(ctx, field, obj) - case "fields": - out.Values[i] = ec.___Type_fields(ctx, field, obj) - case "interfaces": - out.Values[i] = ec.___Type_interfaces(ctx, field, obj) - case "possibleTypes": - out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) - case "enumValues": - out.Values[i] = ec.___Type_enumValues(ctx, field, obj) - case "inputFields": - out.Values[i] = ec.___Type_inputFields(ctx, field, obj) - case "ofType": - out.Values[i] = ec.___Type_ofType(ctx, field, obj) - case "specifiedByURL": - out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) - default: panic("unknown field " + strconv.Quote(field.Name)) } } - out.Dispatch() - if invalids > 0 { + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + return out } From a3e0f72084ad73be5013fa88902b1460193150cf Mon Sep 17 00:00:00 2001 From: John Kjell Date: Mon, 20 Nov 2023 12:21:22 -0600 Subject: [PATCH 3/3] Add license to ent.resolvers.go Signed-off-by: John Kjell --- ent.resolvers.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ent.resolvers.go b/ent.resolvers.go index 53f4ced7..769d0c16 100644 --- a/ent.resolvers.go +++ b/ent.resolvers.go @@ -1,3 +1,17 @@ +// Copyright 2023 The Archivista Contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package archivista // This file will be automatically regenerated based on the schema, any resolver implementations