Simon Ser: 3 api: import github.com/vektah/dataloaden api/graph: add missing non-null types go generate 7 files changed, 407 insertions(+), 139 deletions(-)
Thanks! To git@git.sr.ht:~sircmpwn/meta.sr.ht 5509e09..098c373 master -> master
Copy & paste the following snippet into your terminal to import this patchset into git:
curl -s https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/28122/mbox | git am -3Learn more about email & git
Create a new generate.go file which imports github.com/vektah/dataloaden. This fixes this kind of error because go mod now knows about the dependency: /home/simon/go/pkg/mod/github.com/cpuguy83/go-md2man/v2@v2.0.0-20190314233015-f79a8a8ca69d/md2man/md2man.go:4:2: missing go.sum entry for module providing package github.com/russross/blackfriday/v2 (imported by github.com/cpuguy83/go-md2man/v2/md2man); to add: go get github.com/cpuguy83/go-md2man/v2/md2man@v2.0.0-20190314233015-f79a8a8ca69d /home/simon/go/pkg/mod/github.com/99designs/gqlgen@v0.14.0/internal/imports/prune.go:15:2: missing go.sum entry for module providing package golang.org/x/tools/go/ast/astutil (imported by github.com/99designs/gqlgen/internal/imports); to add: go get github.com/99designs/gqlgen/internal/imports@v0.14.0 /home/simon/go/pkg/mod/github.com/99designs/gqlgen@v0.14.0/internal/code/packages.go:9:2: missing go.sum entry for module providing package golang.org/x/tools/go/packages (imported by github.com/99designs/gqlgen/internal/code); to add: go get github.com/99designs/gqlgen/internal/code@v0.14.0 /home/simon/go/pkg/mod/github.com/99designs/gqlgen@v0.14.0/internal/imports/prune.go:16:2: missing go.sum entry for module providing package golang.org/x/tools/imports (imported by github.com/99designs/gqlgen/internal/imports); to add: go get github.com/99designs/gqlgen/internal/imports@v0.14.0 graph/generate.go:10: running "go": exit status 1 /home/simon/go/pkg/mod/github.com/vektah/dataloaden@v0.2.1-0.20190515034641-a19b9a6e7c9e/pkg/generator/generator.go:13:2: missing go.sum entry for module providing package golang.org/x/tools/go/packages (imported by github.com/vektah/dataloaden/pkg/generator); to add: go get github.com/vektah/dataloaden/pkg/generator@v0.2.1-0.20190515034641-a19b9a6e7c9e /home/simon/go/pkg/mod/github.com/vektah/dataloaden@v0.2.1-0.20190515034641-a19b9a6e7c9e/pkg/generator/generator.go:14:2: missing go.sum entry for module providing package golang.org/x/tools/imports (imported by github.com/vektah/dataloaden/pkg/generator); to add: go get github.com/vektah/dataloaden/pkg/generator@v0.2.1-0.20190515034641-a19b9a6e7c9e loaders/middleware.go:3: running "./gen": exit status 1 --- api/go.mod | 1 + api/go.sum | 12 +++++++----- api/loaders/generate.go | 14 ++++++++++++++ api/loaders/middleware.go | 6 ------ 4 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 api/loaders/generate.go diff --git a/api/go.mod b/api/go.mod index 525aa9cefdec..030e87729f47 100644 --- a/api/go.mod +++ b/api/go.mod @@ -15,6 +15,7 @@ require ( github.com/mitchellh/mapstructure v1.3.2 // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e github.com/vektah/gqlparser/v2 v2.2.0 golang.org/x/crypto v0.0.0-20211202192323-5770296d904e gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect diff --git a/api/go.sum b/api/go.sum index 66c9337d8235..e6282aeb5563 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,7 +1,5 @@ git.sr.ht/~sircmpwn/core-go v0.0.0-20211218082756-f762ad220360 h1:KZwWE8xwafnRCldGTHeeuYH3QKhlrgsCqukIgXHzUgs= git.sr.ht/~sircmpwn/core-go v0.0.0-20211218082756-f762ad220360/go.mod h1:uUqzeO5OLl/nRZfPk0igIAweRZiVwUmu/OGYfjS9fWc= -git.sr.ht/~sircmpwn/core-go v0.0.0-20211206081520-dd20891a2811 h1:pngL/SqTlsJ8oBYqbD9Zkzb6MpMqW77wo6qhPTkDsQE= -git.sr.ht/~sircmpwn/core-go v0.0.0-20211206081520-dd20891a2811/go.mod h1:uUqzeO5OLl/nRZfPk0igIAweRZiVwUmu/OGYfjS9fWc= git.sr.ht/~sircmpwn/dowork v0.0.0-20210820133136-d3970e97def3 h1:9WCv5cK67s2SiY/R4DWT/OchEsFnfYDz3lbevKxZ4QI= git.sr.ht/~sircmpwn/dowork v0.0.0-20210820133136-d3970e97def3/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw= git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3 h1:4wDp4BKF7NQqoh73VXpZsB/t1OEhDpz/zEpmdQfbjDk= @@ -180,11 +178,13 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -199,13 +199,13 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec h1:DGmKwyZwEB8dI7tbLt/I/gQuP559o/0FrAkHKlQM/Ks= -github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec/go.mod h1:owBmyHYMLkxyrugmfwE/DLJyW8Ro9mkphwuVErQ0iUw= github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec h1:DGmKwyZwEB8dI7tbLt/I/gQuP559o/0FrAkHKlQM/Ks= github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec h1:DGmKwyZwEB8dI7tbLt/I/gQuP559o/0FrAkHKlQM/Ks= github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec/go.mod h1:owBmyHYMLkxyrugmfwE/DLJyW8Ro9mkphwuVErQ0iUw= +github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec/go.mod h1:owBmyHYMLkxyrugmfwE/DLJyW8Ro9mkphwuVErQ0iUw= github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e h1:+w0Zm/9gaWpEAyDlU1eKOuk5twTjAjuevXqcJJw8hrg= github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= github.com/vektah/gqlparser v1.3.1 h1:8b0IcD3qZKWJQHSzynbDlrtP3IxVydZ2DZepCGofqfU= @@ -222,6 +222,7 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -278,6 +279,7 @@ golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 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= diff --git a/api/loaders/generate.go b/api/loaders/generate.go new file mode 100644 index 000000000000..d50a63ab39c7 --- /dev/null +++ b/api/loaders/generate.go @@ -0,0 +1,14 @@ +//go:build generate +// +build generate + +package loaders + +import ( + _ "github.com/vektah/dataloaden" +) + +//go:generate ./gen UsersByIDLoader int api/graph/model.User +//go:generate ./gen UsersByNameLoader string api/graph/model.User +//go:generate ./gen UsersByEmailLoader string api/graph/model.User +//go:generate ./gen OAuthClientsByIDLoader int api/graph/model.OAuthClient +//go:generate ./gen OAuthClientsByUUIDLoader string api/graph/model.OAuthClient diff --git a/api/loaders/middleware.go b/api/loaders/middleware.go index 2db453cacafa..76cd5bcd4ac6 100644 --- a/api/loaders/middleware.go +++ b/api/loaders/middleware.go @@ -1,11 +1,5 @@ package loaders -//go:generate ./gen UsersByIDLoader int api/graph/model.User -//go:generate ./gen UsersByNameLoader string api/graph/model.User -//go:generate ./gen UsersByEmailLoader string api/graph/model.User -//go:generate ./gen OAuthClientsByIDLoader int api/graph/model.OAuthClient -//go:generate ./gen OAuthClientsByUUIDLoader string api/graph/model.OAuthClient - import ( "context" "database/sql" -- 2.34.1
builds.sr.ht <builds@sr.ht>meta.sr.ht/patches: SUCCESS in 3m24s [api: import github.com/vektah/dataloaden][0] from [Simon Ser][1] [0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/28122 [1]: mailto:contact@emersion.fr ✓ #668589 SUCCESS meta.sr.ht/patches/debian.yml https://builds.sr.ht/~sircmpwn/job/668589 ✓ #668588 SUCCESS meta.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/668588 ✓ #668587 SUCCESS meta.sr.ht/patches/alpine.yml https://builds.sr.ht/~sircmpwn/job/668587
Entries of the lists cannot be null. --- api/graph/schema.graphqls | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/graph/schema.graphqls b/api/graph/schema.graphqls index 2eda6adbc8a6..c5f14ade7bf9 100644 --- a/api/graph/schema.graphqls +++ b/api/graph/schema.graphqls @@ -375,13 +375,13 @@ type Query { webhook: WebhookPayload! "Returns OAuth grants issued for the authenticated user" - oauthGrants: [OAuthGrant]! @private + oauthGrants: [OAuthGrant!]! @private "List of OAuth clients this user administrates" - oauthClients: [OAuthClient]! @private + oauthClients: [OAuthClient!]! @private "Returns a list of personal OAuth tokens issued" - personalAccessTokens: [OAuthPersonalToken]! @private + personalAccessTokens: [OAuthPersonalToken!]! @private ### ### ### The following resolvers are for internal use. ### -- 2.34.1
--- api/graph/api/generated.go | 467 +++++++++++++++++++++++++--------- api/graph/model/models_gen.go | 40 ++- 2 files changed, 382 insertions(+), 125 deletions(-) diff --git a/api/graph/api/generated.go b/api/graph/api/generated.go index a73ff20bb30b..ddc3cb1c5cbd 100644 --- a/api/graph/api/generated.go +++ b/api/graph/api/generated.go @@ -1518,19 +1518,27 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er var sources = []*ast.Source{ {Name: "graph/schema.graphqls", Input: `# This schema definition is available in the public domain, or under the terms # of CC-0, at your choice. + scalar Cursor scalar Time -# This is used to decorate fields which are only accessible with a personal -# access token, and are not available to clients using OAuth 2.0 access tokens. +""" +This is used to decorate fields which are only accessible with a personal +access token, and are not available to clients using OAuth 2.0 access tokens. +""" directive @private on FIELD_DEFINITION -# This used to decorate fields which are for internal use, and are not -# available to normal API users. +""" +This used to decorate fields which are for internal use, and are not +available to normal API users. +""" directive @internal on FIELD_DEFINITION + directive @anoninternal on FIELD_DEFINITION -# Used to provide a human-friendly description of an access scope. +""" +Used to provide a human-friendly description of an access scope. +""" directive @scopehelp(details: String!) on ENUM_VALUE enum AccessScope { @@ -1546,10 +1554,12 @@ enum AccessKind { RW @scopehelp(details: "read and write") } -# Decorates fields for which access requires a particular OAuth 2.0 scope with -# read or write access. For the meta.sr.ht API, you have access to all public -# information without any special permissions - user profile information, -# public keys, and so on. +""" +Decorates fields for which access requires a particular OAuth 2.0 scope with +read or write access. For the meta.sr.ht API, you have access to all public +information without any special permissions - user profile information, +public keys, and so on. +""" directive @access(scope: AccessScope!, kind: AccessKind!) on FIELD_DEFINITION | ENUM_VALUE # https://semver.org @@ -1557,9 +1567,11 @@ type Version { major: Int! minor: Int! patch: Int! - # If this API version is scheduled for deprecation, this is the date on which - # it will stop working; or null if this API version is not scheduled for - # deprecation. + """ + If this API version is scheduled for deprecation, this is the date on which + it will stop working; or null if this API version is not scheduled for + deprecation. + """ deprecationDate: Time } @@ -1567,8 +1579,10 @@ interface Entity { id: Int! created: Time! updated: Time! - # The canonical name of this entity. For users, this is their username - # prefixed with '~'. Additional entity types will be supported in the future. + """ + The canonical name of this entity. For users, this is their username + prefixed with '~'. Additional entity types will be supported in the future. + """ canonicalName: String! } @@ -1678,7 +1692,7 @@ type OAuthPersonalTokenRegistration { } enum WebhookEvent { - # Used for user profile webhooks + "Used for user profile webhooks" PROFILE_UPDATE @access(scope: PROFILE, kind: RO) PGP_KEY_ADDED @access(scope: PGP_KEYS, kind: RO) PGP_KEY_REMOVED @access(scope: PGP_KEYS, kind: RO) @@ -1692,14 +1706,16 @@ interface WebhookSubscription { query: String! url: String! - # If this webhook was registered by an authorized OAuth 2.0 client, this - # field is non-null. + """ + If this webhook was registered by an authorized OAuth 2.0 client, this + field is non-null. + """ client: OAuthClient @private - # All deliveries which have been sent to this webhook. + "All deliveries which have been sent to this webhook." deliveries(cursor: Cursor): WebhookDeliveryCursor! - # Returns a sample payload for this subscription, for testing purposes + "Returns a sample payload for this subscription, for testing purposes" sample(event: WebhookEvent!): String! } @@ -1720,10 +1736,12 @@ type WebhookDelivery { subscription: WebhookSubscription! requestBody: String! - # These details are provided only after a response is received from the - # remote server. If a response is sent whose Content-Type is not text/*, or - # cannot be decoded as UTF-8, the response body will be null. It will be - # truncated after 64 KiB. + """ + These details are provided only after a response is received from the + remote server. If a response is sent whose Content-Type is not text/*, or + cannot be decoded as UTF-8, the response body will be null. It will be + truncated after 64 KiB. + """ responseBody: String responseHeaders: String responseStatus: Int @@ -1759,139 +1777,161 @@ type SSHKeyEvent implements WebhookPayload { key: SSHKey! } -# A cursor for enumerating a list of audit log entries -# -# If there are additional results available, the cursor object may be passed -# back into the same endpoint to retrieve another page. If the cursor is null, -# there are no remaining results to return. +""" +A cursor for enumerating a list of audit log entries + +If there are additional results available, the cursor object may be passed +back into the same endpoint to retrieve another page. If the cursor is null, +there are no remaining results to return. +""" type AuditLogCursor { results: [AuditLogEntry!]! cursor: Cursor } -# A cursor for enumerating a list of invoices -# -# If there are additional results available, the cursor object may be passed -# back into the same endpoint to retrieve another page. If the cursor is null, -# there are no remaining results to return. +""" +A cursor for enumerating a list of invoices + +If there are additional results available, the cursor object may be passed +back into the same endpoint to retrieve another page. If the cursor is null, +there are no remaining results to return. +""" type InvoiceCursor { results: [Invoice!]! cursor: Cursor } -# A cursor for enumerating a list of SSH keys -# -# If there are additional results available, the cursor object may be passed -# back into the same endpoint to retrieve another page. If the cursor is null, -# there are no remaining results to return. +""" +A cursor for enumerating a list of SSH keys + +If there are additional results available, the cursor object may be passed +back into the same endpoint to retrieve another page. If the cursor is null, +there are no remaining results to return. +""" type SSHKeyCursor { results: [SSHKey!]! cursor: Cursor } -# A cursor for enumerating a list of PGP keys -# -# If there are additional results available, the cursor object may be passed -# back into the same endpoint to retrieve another page. If the cursor is null, -# there are no remaining results to return. +""" +A cursor for enumerating a list of PGP keys + +If there are additional results available, the cursor object may be passed +back into the same endpoint to retrieve another page. If the cursor is null, +there are no remaining results to return. +""" type PGPKeyCursor { results: [PGPKey!]! cursor: Cursor } -# A cursor for enumerating a list of webhook deliveries -# -# If there are additional results available, the cursor object may be passed -# back into the same endpoint to retrieve another page. If the cursor is null, -# there are no remaining results to return. +""" +A cursor for enumerating a list of webhook deliveries + +If there are additional results available, the cursor object may be passed +back into the same endpoint to retrieve another page. If the cursor is null, +there are no remaining results to return. +""" type WebhookDeliveryCursor { results: [WebhookDelivery!]! cursor: Cursor } -# A cursor for enumerating a list of webhook subscriptions -# -# If there are additional results available, the cursor object may be passed -# back into the same endpoint to retrieve another page. If the cursor is null, -# there are no remaining results to return. +""" +A cursor for enumerating a list of webhook subscriptions + +If there are additional results available, the cursor object may be passed +back into the same endpoint to retrieve another page. If the cursor is null, +there are no remaining results to return. +""" type WebhookSubscriptionCursor { results: [WebhookSubscription!]! cursor: Cursor } type Query { - # Returns API version information. + "Returns API version information." version: Version! - # Returns the authenticated user. + "Returns the authenticated user." me: User! @access(scope: PROFILE, kind: RO) - # Returns a specific user + "Returns a specific user" userByID(id: Int!): User @access(scope: PROFILE, kind: RO) userByName(username: String!): User @access(scope: PROFILE, kind: RO) userByEmail(email: String!): User @access(scope: PROFILE, kind: RO) - # Returns a specific SSH key by its fingerprint, in hexadecimal + "Returns a specific SSH key by its fingerprint, in hexadecimal" sshKeyByFingerprint(fingerprint: String!): SSHKey @access(scope: SSH_KEYS, kind: RO) - # Returns a specific PGP key by its fingerprint, in hexadecimal. + "Returns a specific PGP key by its fingerprint, in hexadecimal." pgpKeyByFingerprint(fingerprint: String!): PGPKey @access(scope: PGP_KEYS, kind: RO) - # Returns invoices for the authenticated user. + "Returns invoices for the authenticated user." invoices(cursor: Cursor): InvoiceCursor! @access(scope: BILLING, kind: RO) - # Returns the audit log for the authenticated user. + "Returns the audit log for the authenticated user." auditLog(cursor: Cursor): AuditLogCursor! @access(scope: AUDIT_LOG, kind: RO) - # Returns a list of user profile webhook subscriptions. For clients - # authenticated with a personal access token, this returns all webhooks - # configured by all GraphQL clients for your account. For clients - # authenticated with an OAuth 2.0 access token, this returns only webhooks - # registered for your client. + """ + Returns a list of user profile webhook subscriptions. For clients + authenticated with a personal access token, this returns all webhooks + configured by all GraphQL clients for your account. For clients + authenticated with an OAuth 2.0 access token, this returns only webhooks + registered for your client. + """ profileWebhooks(cursor: Cursor): WebhookSubscriptionCursor! - # Returns details of a user profile webhook subscription by its ID. + "Returns details of a user profile webhook subscription by its ID." profileWebhook(id: Int!): WebhookSubscription - # Returns information about the webhook currently being processed. This is - # not valid during normal queries over HTTP, and will return an error if used - # outside of a webhook context. + """ + Returns information about the webhook currently being processed. This is + not valid during normal queries over HTTP, and will return an error if used + outside of a webhook context. + """ webhook: WebhookPayload! - # Returns OAuth grants issued for the authenticated user - oauthGrants: [OAuthGrant]! @private + "Returns OAuth grants issued for the authenticated user" + oauthGrants: [OAuthGrant!]! @private - # List of OAuth clients this user administrates - oauthClients: [OAuthClient]! @private + "List of OAuth clients this user administrates" + oauthClients: [OAuthClient!]! @private - # Returns a list of personal OAuth tokens issued - personalAccessTokens: [OAuthPersonalToken]! @private + "Returns a list of personal OAuth tokens issued" + personalAccessTokens: [OAuthPersonalToken!]! @private ### ### ### The following resolvers are for internal use. ### ### ### - # Returns a specific OAuth client (by database ID) + "Returns a specific OAuth client (by database ID)" oauthClientByID(id: Int!): OAuthClient @internal - # Returns a specific OAuth client (by UUID) + "Returns a specific OAuth client (by UUID)" oauthClientByUUID(uuid: String!): OAuthClient @internal - # Returns the revocation status of a given OAuth 2.0 token hash (SHA-512). If - # the token or client ID has been revoked, this returns true, and the key - # should not be trusted. Client ID is optional for personal access tokens. + """ + Returns the revocation status of a given OAuth 2.0 token hash (SHA-512). If + the token or client ID has been revoked, this returns true, and the key + should not be trusted. Client ID is optional for personal access tokens. + """ tokenRevocationStatus(hash: String!, clientId: String): Boolean! @internal } +""" +Omit these fields to leave them unchanged, or set them to null to clear +their value. +""" input UserInput { - # Omit these fields to leave them unchanged, or set them to null to clear - # their value. url: String location: String bio: String - # Note: changing the user's email address will not take effect immediately; - # the user is sent an email to confirm the change first. + """ + Note: changing the user's email address will not take effect immediately; + the user is sent an email to confirm the change first. + """ email: String } @@ -1910,67 +1950,81 @@ type Mutation { createSSHKey(key: String!): SSHKey! @access(scope: SSH_KEYS, kind: RW) deleteSSHKey(id: Int!): SSHKey @access(scope: SSH_KEYS, kind: RW) - # Causes the "last used" time of this SSH key to be updated. + """ + Causes the "last used" time of this SSH key to be updated. + """ updateSSHKey(id: Int!): SSHKey! @access(scope: SSH_KEYS, kind: RO) - # Creates a new user profile webhook subscription. When an event from the - # provided list of events occurs, the 'query' parameter (a GraphQL query) - # will be evaluated and the results will be sent to the provided URL as the - # body of an HTTP POST request. The list of events must include at least one - # event, and no duplicates. - # - # This query is evaluated in the webhook context, such that query { webhook } - # may be used to access details of the event which trigged the webhook. The - # query may not make any mutations. + """ + Creates a new user profile webhook subscription. When an event from the + provided list of events occurs, the 'query' parameter (a GraphQL query) + will be evaluated and the results will be sent to the provided URL as the + body of an HTTP POST request. The list of events must include at least one + event, and no duplicates. + + This query is evaluated in the webhook context, such that query { webhook } + may be used to access details of the event which trigged the webhook. The + query may not make any mutations. + """ createWebhook(config: ProfileWebhookInput!): WebhookSubscription! - # Deletes a user profile webhook. Any events already queued may still be - # delivered after this request completes. Clients authenticated with a - # personal access token may delete any webhook registered for their account, - # but authorized OAuth 2.0 clients may only delete their own webhooks. - # Manually deleting a webhook configured by a third-party client may cause - # unexpected behavior with the third-party integration. + """ + Deletes a user profile webhook. Any events already queued may still be + delivered after this request completes. Clients authenticated with a + personal access token may delete any webhook registered for their account, + but authorized OAuth 2.0 clients may only delete their own webhooks. + Manually deleting a webhook configured by a third-party client may cause + unexpected behavior with the third-party integration. + """ deleteWebhook(id: Int!): WebhookSubscription ### ### ### The following resolvers are for internal use. ### ### ### - # Registers a new account. + "Registers a new account." registerAccount(email: String!, username: String!, password: String!, pgpKey: String, invite: String): User @anoninternal - # Registers an OAuth client. Only OAuth 2.0 confidental clients are - # supported. + """ + Registers an OAuth client. Only OAuth 2.0 confidental clients are + supported. + """ registerOAuthClient( redirectUri: String!, clientName: String!, clientDescription: String, clientUrl: String): OAuthClientRegistration! @internal - # Revokes this OAuth client, revoking all tokens for it and preventing future - # use. + """ + Revokes this OAuth client, revoking all tokens for it and preventing future + use. + """ revokeOAuthClient(uuid: String!): OAuthClient @internal - # Revokes a specific OAuth grant. + "Revokes a specific OAuth grant." revokeOAuthGrant(hash: String!): OAuthGrant @internal - # Issues an OAuth personal access token. + "Issues an OAuth personal access token." issuePersonalAccessToken(grants: String, comment: String): OAuthPersonalTokenRegistration! @internal - # Revokes a personal access token. + "Revokes a personal access token." revokePersonalAccessToken(id: Int!): OAuthPersonalToken @internal - # Issues an OAuth 2.0 authorization code. Used after the user has consented - # to the access grant request. + """ + Issues an OAuth 2.0 authorization code. Used after the user has consented + to the access grant request. + """ issueAuthorizationCode(clientUUID: String!, grants: String!): String! @internal - # Completes the OAuth 2.0 grant process and issues an OAuth token for a - # specific OAuth client. + """ + Completes the OAuth 2.0 grant process and issues an OAuth token for a + specific OAuth client. + """ issueOAuthGrant(authorization: String!, clientSecret: String!): OAuthGrantRegistration @internal } @@ -6518,7 +6572,7 @@ func (ec *executionContext) _Query_oauthGrants(ctx context.Context, field graphq } res := resTmp.([]*model.OAuthGrant) fc.Result = res - return ec.marshalNOAuthGrant2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthGrant(ctx, field.Selections, res) + return ec.marshalNOAuthGrant2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthGrantᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Query_oauthClients(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { @@ -6573,7 +6627,7 @@ func (ec *executionContext) _Query_oauthClients(ctx context.Context, field graph } res := resTmp.([]*model.OAuthClient) fc.Result = res - return ec.marshalNOAuthClient2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthClient(ctx, field.Selections, res) + return ec.marshalNOAuthClient2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthClientᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Query_personalAccessTokens(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { @@ -6628,7 +6682,7 @@ func (ec *executionContext) _Query_personalAccessTokens(ctx context.Context, fie } res := resTmp.([]*model.OAuthPersonalToken) fc.Result = res - return ec.marshalNOAuthPersonalToken2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthPersonalToken(ctx, field.Selections, res) + return ec.marshalNOAuthPersonalToken2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthPersonalTokenᚄ(ctx, field.Selections, res) } func (ec *executionContext) _Query_oauthClientByID(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { @@ -8588,6 +8642,41 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } +func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsRepeatable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { defer func() { if r := recover(); r != nil { @@ -9540,7 +9629,10 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputProfileWebhookInput(ctx context.Context, obj interface{}) (model.ProfileWebhookInput, error) { var it model.ProfileWebhookInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -11047,6 +11139,11 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS if out.Values[i] == graphql.Null { invalids++ } + case "isRepeatable": + out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -11332,6 +11429,13 @@ func (ec *executionContext) marshalNAuditLogEntry2ᚕᚖgitᚗsrᚗhtᚋאsircmp } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11419,6 +11523,13 @@ func (ec *executionContext) marshalNInvoice2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋm } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11450,7 +11561,7 @@ func (ec *executionContext) marshalNOAuthClient2gitᚗsrᚗhtᚋאsircmpwnᚋmet return ec._OAuthClient(ctx, sel, &v) } -func (ec *executionContext) marshalNOAuthClient2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthClient(ctx context.Context, sel ast.SelectionSet, v []*model.OAuthClient) graphql.Marshaler { +func (ec *executionContext) marshalNOAuthClient2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthClientᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.OAuthClient) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11474,7 +11585,7 @@ func (ec *executionContext) marshalNOAuthClient2ᚕᚖgitᚗsrᚗhtᚋאsircmpwn if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOOAuthClient2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthClient(ctx, sel, v[i]) + ret[i] = ec.marshalNOAuthClient2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthClient(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11484,6 +11595,13 @@ func (ec *executionContext) marshalNOAuthClient2ᚕᚖgitᚗsrᚗhtᚋאsircmpwn } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11511,7 +11629,7 @@ func (ec *executionContext) marshalNOAuthClientRegistration2ᚖgitᚗsrᚗhtᚋ return ec._OAuthClientRegistration(ctx, sel, v) } -func (ec *executionContext) marshalNOAuthGrant2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthGrant(ctx context.Context, sel ast.SelectionSet, v []*model.OAuthGrant) graphql.Marshaler { +func (ec *executionContext) marshalNOAuthGrant2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthGrantᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.OAuthGrant) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11535,7 +11653,7 @@ func (ec *executionContext) marshalNOAuthGrant2ᚕᚖgitᚗsrᚗhtᚋאsircmpwn if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOOAuthGrant2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthGrant(ctx, sel, v[i]) + ret[i] = ec.marshalNOAuthGrant2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthGrant(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11545,6 +11663,13 @@ func (ec *executionContext) marshalNOAuthGrant2ᚕᚖgitᚗsrᚗhtᚋאsircmpwn } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11558,7 +11683,7 @@ func (ec *executionContext) marshalNOAuthGrant2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋm return ec._OAuthGrant(ctx, sel, v) } -func (ec *executionContext) marshalNOAuthPersonalToken2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthPersonalToken(ctx context.Context, sel ast.SelectionSet, v []*model.OAuthPersonalToken) graphql.Marshaler { +func (ec *executionContext) marshalNOAuthPersonalToken2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthPersonalTokenᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.OAuthPersonalToken) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -11582,7 +11707,7 @@ func (ec *executionContext) marshalNOAuthPersonalToken2ᚕᚖgitᚗsrᚗhtᚋאs if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOOAuthPersonalToken2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthPersonalToken(ctx, sel, v[i]) + ret[i] = ec.marshalNOAuthPersonalToken2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋmetaᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐOAuthPersonalToken(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11592,6 +11717,13 @@ func (ec *executionContext) marshalNOAuthPersonalToken2ᚕᚖgitᚗsrᚗhtᚋאs } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11657,6 +11789,13 @@ func (ec *executionContext) marshalNPGPKey2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋme } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11727,6 +11866,13 @@ func (ec *executionContext) marshalNSSHKey2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋme } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11856,6 +12002,13 @@ func (ec *executionContext) marshalNWebhookDelivery2ᚕᚖgitᚗsrᚗhtᚋאsirc } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11948,6 +12101,13 @@ func (ec *executionContext) marshalNWebhookEvent2ᚕgitᚗsrᚗhtᚋאsircmpwn } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12005,6 +12165,13 @@ func (ec *executionContext) marshalNWebhookSubscription2ᚕgitᚗsrᚗhtᚋאsir } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12060,6 +12227,13 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12133,6 +12307,13 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12182,6 +12363,13 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12223,6 +12411,13 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12461,6 +12656,13 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12501,6 +12703,13 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12541,6 +12750,13 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12588,6 +12804,13 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } diff --git a/api/graph/model/models_gen.go b/api/graph/model/models_gen.go index 02b28e55df3f..602ea04e54bf 100644 --- a/api/graph/model/models_gen.go +++ b/api/graph/model/models_gen.go @@ -23,11 +23,21 @@ type WebhookSubscription interface { IsWebhookSubscription() } +// A cursor for enumerating a list of audit log entries +// +// If there are additional results available, the cursor object may be passed +// back into the same endpoint to retrieve another page. If the cursor is null, +// there are no remaining results to return. type AuditLogCursor struct { Results []*AuditLogEntry `json:"results"` Cursor *model.Cursor `json:"cursor"` } +// A cursor for enumerating a list of invoices +// +// If there are additional results available, the cursor object may be passed +// back into the same endpoint to retrieve another page. If the cursor is null, +// there are no remaining results to return. type InvoiceCursor struct { Results []*Invoice `json:"results"` Cursor *model.Cursor `json:"cursor"` @@ -49,6 +59,11 @@ type OAuthPersonalTokenRegistration struct { Secret string `json:"secret"` } +// A cursor for enumerating a list of PGP keys +// +// If there are additional results available, the cursor object may be passed +// back into the same endpoint to retrieve another page. If the cursor is null, +// there are no remaining results to return. type PGPKeyCursor struct { Results []*PGPKey `json:"results"` Cursor *model.Cursor `json:"cursor"` @@ -78,6 +93,11 @@ type ProfileWebhookInput struct { Query string `json:"query"` } +// A cursor for enumerating a list of SSH keys +// +// If there are additional results available, the cursor object may be passed +// back into the same endpoint to retrieve another page. If the cursor is null, +// there are no remaining results to return. type SSHKeyCursor struct { Results []*SSHKey `json:"results"` Cursor *model.Cursor `json:"cursor"` @@ -93,17 +113,30 @@ type SSHKeyEvent struct { func (SSHKeyEvent) IsWebhookPayload() {} type Version struct { - Major int `json:"major"` - Minor int `json:"minor"` - Patch int `json:"patch"` + Major int `json:"major"` + Minor int `json:"minor"` + Patch int `json:"patch"` + // If this API version is scheduled for deprecation, this is the date on which + // it will stop working; or null if this API version is not scheduled for + // deprecation. DeprecationDate *time.Time `json:"deprecationDate"` } +// A cursor for enumerating a list of webhook deliveries +// +// If there are additional results available, the cursor object may be passed +// back into the same endpoint to retrieve another page. If the cursor is null, +// there are no remaining results to return. type WebhookDeliveryCursor struct { Results []*WebhookDelivery `json:"results"` Cursor *model.Cursor `json:"cursor"` } +// A cursor for enumerating a list of webhook subscriptions +// +// If there are additional results available, the cursor object may be passed +// back into the same endpoint to retrieve another page. If the cursor is null, +// there are no remaining results to return. type WebhookSubscriptionCursor struct { Results []WebhookSubscription `json:"results"` Cursor *model.Cursor `json:"cursor"` @@ -251,6 +284,7 @@ func (e UserType) MarshalGQL(w io.Writer) { type WebhookEvent string const ( + // Used for user profile webhooks WebhookEventProfileUpdate WebhookEvent = "PROFILE_UPDATE" WebhookEventPGPKeyAdded WebhookEvent = "PGP_KEY_ADDED" WebhookEventPGPKeyRemoved WebhookEvent = "PGP_KEY_REMOVED" -- 2.34.1
Thanks! To git@git.sr.ht:~sircmpwn/meta.sr.ht 5509e09..098c373 master -> master