@@ 16,6 16,7 @@ import (
"github.com/99designs/gqlgen/graphql/introspection"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
+ model1 "sourcecraft.dev/bigbes/sr-ht-core/model"
"sourcecraft.dev/bigbes/sr-ht-spec/graph/model"
)
@@ 37,9 38,12 @@ type Config struct {
}
type ResolverRoot interface {
+ Mutation() MutationResolver
Project() ProjectResolver
Query() QueryResolver
Space() SpaceResolver
+ UserWebhookSubscription() UserWebhookSubscriptionResolver
+ WebhookDelivery() WebhookDeliveryResolver
}
type DirectiveRoot struct {
@@ 65,6 69,11 @@ type ComplexityRoot struct {
Type func(childComplexity int) int
}
+ Mutation struct {
+ CreateUserWebhook func(childComplexity int, config model.UserWebhookInput) int
+ DeleteUserWebhook func(childComplexity int, id int) int
+ }
+
Project struct {
Meta func(childComplexity int) int
Name func(childComplexity int) int
@@ 89,15 98,25 @@ type ComplexityRoot struct {
Title func(childComplexity int) int
}
+ ProposalEvent struct {
+ Date func(childComplexity int) int
+ Event func(childComplexity int) int
+ Proposal func(childComplexity int) int
+ UUID func(childComplexity int) int
+ }
+
Query struct {
- Document func(childComplexity int, space string, id *string, path *string, rev *string) int
- Documents func(childComplexity int, space string, rev *string) int
- Project func(childComplexity int, owner string, name string) int
- Projects func(childComplexity int) int
- Proposals func(childComplexity int, space string, state model.ProposalState) int
- Search func(childComplexity int, query string, spaces []string, limit *int, offset *int) int
- Space func(childComplexity int, owner string, name string) int
- Spaces func(childComplexity int) int
+ Document func(childComplexity int, space string, id *string, path *string, rev *string) int
+ Documents func(childComplexity int, space string, rev *string) int
+ Project func(childComplexity int, owner string, name string) int
+ Projects func(childComplexity int) int
+ Proposals func(childComplexity int, space string, state model.ProposalState) int
+ Search func(childComplexity int, query string, spaces []string, limit *int, offset *int) int
+ Space func(childComplexity int, owner string, name string) int
+ Spaces func(childComplexity int) int
+ UserWebhook func(childComplexity int, id int) int
+ UserWebhooks func(childComplexity int, cursor *model1.Cursor) int
+ Webhook func(childComplexity int) int
}
SearchHit struct {
@@ 126,8 145,42 @@ type ComplexityRoot struct {
Owner func(childComplexity int) int
Ref func(childComplexity int) int
}
+
+ UserWebhookSubscription struct {
+ Deliveries func(childComplexity int, cursor *model1.Cursor) int
+ Events func(childComplexity int) int
+ ID func(childComplexity int) int
+ Query func(childComplexity int) int
+ Sample func(childComplexity int, event model.WebhookEvent) int
+ URL func(childComplexity int) int
+ }
+
+ WebhookDelivery struct {
+ Date func(childComplexity int) int
+ Event func(childComplexity int) int
+ RequestBody func(childComplexity int) int
+ ResponseBody func(childComplexity int) int
+ ResponseHeaders func(childComplexity int) int
+ ResponseStatus func(childComplexity int) int
+ Subscription func(childComplexity int) int
+ UUID func(childComplexity int) int
+ }
+
+ WebhookDeliveryCursor struct {
+ Cursor func(childComplexity int) int
+ Results func(childComplexity int) int
+ }
+
+ WebhookSubscriptionCursor struct {
+ Cursor func(childComplexity int) int
+ Results func(childComplexity int) int
+ }
}
+type MutationResolver interface {
+ CreateUserWebhook(ctx context.Context, config model.UserWebhookInput) (model.WebhookSubscription, error)
+ DeleteUserWebhook(ctx context.Context, id int) (model.WebhookSubscription, error)
+}
type ProjectResolver interface {
Spaces(ctx context.Context, obj *model.Project) ([]*model.Space, error)
}
@@ 140,10 193,20 @@ type QueryResolver interface {
Projects(ctx context.Context) ([]*model.Project, error)
Project(ctx context.Context, owner string, name string) (*model.Project, error)
Proposals(ctx context.Context, space string, state model.ProposalState) ([]*model.Proposal, error)
+ UserWebhooks(ctx context.Context, cursor *model1.Cursor) (*model.WebhookSubscriptionCursor, error)
+ UserWebhook(ctx context.Context, id int) (model.WebhookSubscription, error)
+ Webhook(ctx context.Context) (model.WebhookPayload, error)
}
type SpaceResolver interface {
ApprovedRev(ctx context.Context, obj *model.Space) (string, error)
}
+type UserWebhookSubscriptionResolver interface {
+ Deliveries(ctx context.Context, obj *model.UserWebhookSubscription, cursor *model1.Cursor) (*model.WebhookDeliveryCursor, error)
+ Sample(ctx context.Context, obj *model.UserWebhookSubscription, event model.WebhookEvent) (string, error)
+}
+type WebhookDeliveryResolver interface {
+ Subscription(ctx context.Context, obj *model.WebhookDelivery) (model.WebhookSubscription, error)
+}
type executableSchema struct {
resolvers ResolverRoot
@@ 272,6 335,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Document.Type(childComplexity), true
+ case "Mutation.createUserWebhook":
+ if e.complexity.Mutation.CreateUserWebhook == nil {
+ break
+ }
+
+ args, err := ec.field_Mutation_createUserWebhook_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Mutation.CreateUserWebhook(childComplexity, args["config"].(model.UserWebhookInput)), true
+
+ case "Mutation.deleteUserWebhook":
+ if e.complexity.Mutation.DeleteUserWebhook == nil {
+ break
+ }
+
+ args, err := ec.field_Mutation_deleteUserWebhook_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Mutation.DeleteUserWebhook(childComplexity, args["id"].(int)), true
+
case "Project.meta":
if e.complexity.Project.Meta == nil {
break
@@ 398,6 485,34 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Proposal.Title(childComplexity), true
+ case "ProposalEvent.date":
+ if e.complexity.ProposalEvent.Date == nil {
+ break
+ }
+
+ return e.complexity.ProposalEvent.Date(childComplexity), true
+
+ case "ProposalEvent.event":
+ if e.complexity.ProposalEvent.Event == nil {
+ break
+ }
+
+ return e.complexity.ProposalEvent.Event(childComplexity), true
+
+ case "ProposalEvent.proposal":
+ if e.complexity.ProposalEvent.Proposal == nil {
+ break
+ }
+
+ return e.complexity.ProposalEvent.Proposal(childComplexity), true
+
+ case "ProposalEvent.uuid":
+ if e.complexity.ProposalEvent.UUID == nil {
+ break
+ }
+
+ return e.complexity.ProposalEvent.UUID(childComplexity), true
+
case "Query.document":
if e.complexity.Query.Document == nil {
break
@@ 484,6 599,37 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Query.Spaces(childComplexity), true
+ case "Query.userWebhook":
+ if e.complexity.Query.UserWebhook == nil {
+ break
+ }
+
+ args, err := ec.field_Query_userWebhook_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.UserWebhook(childComplexity, args["id"].(int)), true
+
+ case "Query.userWebhooks":
+ if e.complexity.Query.UserWebhooks == nil {
+ break
+ }
+
+ args, err := ec.field_Query_userWebhooks_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.UserWebhooks(childComplexity, args["cursor"].(*model1.Cursor)), true
+
+ case "Query.webhook":
+ if e.complexity.Query.Webhook == nil {
+ break
+ }
+
+ return e.complexity.Query.Webhook(childComplexity), true
+
case "SearchHit.anchor":
if e.complexity.SearchHit.Anchor == nil {
break
@@ 610,6 756,142 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Space.Ref(childComplexity), true
+ case "UserWebhookSubscription.deliveries":
+ if e.complexity.UserWebhookSubscription.Deliveries == nil {
+ break
+ }
+
+ args, err := ec.field_UserWebhookSubscription_deliveries_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.UserWebhookSubscription.Deliveries(childComplexity, args["cursor"].(*model1.Cursor)), true
+
+ case "UserWebhookSubscription.events":
+ if e.complexity.UserWebhookSubscription.Events == nil {
+ break
+ }
+
+ return e.complexity.UserWebhookSubscription.Events(childComplexity), true
+
+ case "UserWebhookSubscription.id":
+ if e.complexity.UserWebhookSubscription.ID == nil {
+ break
+ }
+
+ return e.complexity.UserWebhookSubscription.ID(childComplexity), true
+
+ case "UserWebhookSubscription.query":
+ if e.complexity.UserWebhookSubscription.Query == nil {
+ break
+ }
+
+ return e.complexity.UserWebhookSubscription.Query(childComplexity), true
+
+ case "UserWebhookSubscription.sample":
+ if e.complexity.UserWebhookSubscription.Sample == nil {
+ break
+ }
+
+ args, err := ec.field_UserWebhookSubscription_sample_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.UserWebhookSubscription.Sample(childComplexity, args["event"].(model.WebhookEvent)), true
+
+ case "UserWebhookSubscription.url":
+ if e.complexity.UserWebhookSubscription.URL == nil {
+ break
+ }
+
+ return e.complexity.UserWebhookSubscription.URL(childComplexity), true
+
+ case "WebhookDelivery.date":
+ if e.complexity.WebhookDelivery.Date == nil {
+ break
+ }
+
+ return e.complexity.WebhookDelivery.Date(childComplexity), true
+
+ case "WebhookDelivery.event":
+ if e.complexity.WebhookDelivery.Event == nil {
+ break
+ }
+
+ return e.complexity.WebhookDelivery.Event(childComplexity), true
+
+ case "WebhookDelivery.requestBody":
+ if e.complexity.WebhookDelivery.RequestBody == nil {
+ break
+ }
+
+ return e.complexity.WebhookDelivery.RequestBody(childComplexity), true
+
+ case "WebhookDelivery.responseBody":
+ if e.complexity.WebhookDelivery.ResponseBody == nil {
+ break
+ }
+
+ return e.complexity.WebhookDelivery.ResponseBody(childComplexity), true
+
+ case "WebhookDelivery.responseHeaders":
+ if e.complexity.WebhookDelivery.ResponseHeaders == nil {
+ break
+ }
+
+ return e.complexity.WebhookDelivery.ResponseHeaders(childComplexity), true
+
+ case "WebhookDelivery.responseStatus":
+ if e.complexity.WebhookDelivery.ResponseStatus == nil {
+ break
+ }
+
+ return e.complexity.WebhookDelivery.ResponseStatus(childComplexity), true
+
+ case "WebhookDelivery.subscription":
+ if e.complexity.WebhookDelivery.Subscription == nil {
+ break
+ }
+
+ return e.complexity.WebhookDelivery.Subscription(childComplexity), true
+
+ case "WebhookDelivery.uuid":
+ if e.complexity.WebhookDelivery.UUID == nil {
+ break
+ }
+
+ return e.complexity.WebhookDelivery.UUID(childComplexity), true
+
+ case "WebhookDeliveryCursor.cursor":
+ if e.complexity.WebhookDeliveryCursor.Cursor == nil {
+ break
+ }
+
+ return e.complexity.WebhookDeliveryCursor.Cursor(childComplexity), true
+
+ case "WebhookDeliveryCursor.results":
+ if e.complexity.WebhookDeliveryCursor.Results == nil {
+ break
+ }
+
+ return e.complexity.WebhookDeliveryCursor.Results(childComplexity), true
+
+ case "WebhookSubscriptionCursor.cursor":
+ if e.complexity.WebhookSubscriptionCursor.Cursor == nil {
+ break
+ }
+
+ return e.complexity.WebhookSubscriptionCursor.Cursor(childComplexity), true
+
+ case "WebhookSubscriptionCursor.results":
+ if e.complexity.WebhookSubscriptionCursor.Results == nil {
+ break
+ }
+
+ return e.complexity.WebhookSubscriptionCursor.Results(childComplexity), true
+
}
return 0, false
}
@@ 617,7 899,9 @@ 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, 0, 0, make(chan graphql.DeferredResult)}
- inputUnmarshalMap := graphql.BuildUnmarshalerMap()
+ inputUnmarshalMap := graphql.BuildUnmarshalerMap(
+ ec.unmarshalInputUserWebhookInput,
+ )
first := true
switch rc.Operation.Operation {
@@ 651,6 935,21 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
return &response
}
+ case ast.Mutation:
+ return func(ctx context.Context) *graphql.Response {
+ if !first {
+ return nil
+ }
+ first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
+ data := ec._Mutation(ctx, rc.Operation.SelectionSet)
+ var buf bytes.Buffer
+ data.MarshalGQL(&buf)
+
+ return &graphql.Response{
+ Data: buf.Bytes(),
+ }
+ }
default:
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
@@ 718,6 1017,12 @@ An RFC-3339 timestamp.
scalar Time
"""
+An opaque pagination cursor. Passed back into the same field to fetch the next
+page; null when there are no further results.
+"""
+scalar Cursor
+
+"""
The lifecycle of a proposal. Collapsed from the usual five states because there
is exactly one reviewer: "approve" is "merge now", and a proposal you dislike is
rejected rather than sent back for changes.
@@ 993,6 1298,149 @@ type Proposal {
"""When the proposal left the open state. Null while it is still open."""
resolved: Time
}
+
+# --- Webhooks ---------------------------------------------------------------
+#
+# The GraphQL-native webhook surface, adapted from the core-go reference. spec is
+# single-owner: there are no OAuth clients and no @access scopes, so the
+# reference's ` + "`" + `client` + "`" + ` field and every directive are dropped. Webhook management
+# is owner-gated in the resolvers, which is the whole ACL.
+
+"""
+A proposal lifecycle event a webhook may subscribe to.
+"""
+enum WebhookEvent {
+ PROPOSAL_OPENED
+ PROPOSAL_MERGED
+ PROPOSAL_REJECTED
+}
+
+"""
+A webhook subscription: a URL and a GraphQL query evaluated in the webhook
+context when one of ` + "`" + `events` + "`" + ` fires.
+"""
+interface WebhookSubscription {
+ id: Int!
+ events: [WebhookEvent!]!
+ query: String!
+ url: String!
+
+ "All deliveries which have been sent to this webhook."
+ deliveries(cursor: Cursor): WebhookDeliveryCursor!
+
+ "Returns a sample payload for this subscription, for testing purposes."
+ sample(event: WebhookEvent!): String!
+}
+
+type UserWebhookSubscription implements WebhookSubscription {
+ id: Int!
+ events: [WebhookEvent!]!
+ query: String!
+ url: String!
+ deliveries(cursor: Cursor): WebhookDeliveryCursor!
+ sample(event: WebhookEvent!): String!
+}
+
+type WebhookDelivery {
+ uuid: String!
+ date: Time!
+ event: WebhookEvent!
+ 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.
+ """
+ responseBody: String
+ responseHeaders: String
+ responseStatus: Int
+}
+
+"""
+The payload delivered to a webhook: the event being dispatched, over which the
+subscription's ` + "`" + `query` + "`" + ` is evaluated.
+"""
+interface WebhookPayload {
+ uuid: String!
+ event: WebhookEvent!
+ date: Time!
+}
+
+type ProposalEvent implements WebhookPayload {
+ uuid: String!
+ event: WebhookEvent!
+ date: Time!
+
+ proposal: Proposal!
+}
+
+"""
+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.
+"""
+type WebhookSubscriptionCursor {
+ results: [WebhookSubscription!]!
+ cursor: Cursor
+}
+
+extend type Query {
+ "Returns a list of user webhook subscriptions."
+ userWebhooks(cursor: Cursor): WebhookSubscriptionCursor!
+
+ "Returns details of a user webhook subscription by its ID."
+ userWebhook(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.
+ """
+ webhook: WebhookPayload!
+}
+
+input UserWebhookInput {
+ url: String!
+ events: [WebhookEvent!]!
+ query: String!
+}
+
+type Mutation {
+ """
+ Creates a new user 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.
+
+ This query is evaluated in the webhook context, such that query { webhook }
+ may be used to access details of the event which triggered the webhook. The
+ query may not make any mutations.
+ """
+ createUserWebhook(config: UserWebhookInput!): WebhookSubscription!
+
+ """
+ Deletes a user webhook. Any events already queued may still be delivered
+ after this request completes.
+ """
+ deleteUserWebhook(id: Int!): WebhookSubscription!
+}
`, BuiltIn: false},
}
var parsedSchema = gqlparser.MustLoadSchema(sources...)
@@ 1001,6 1449,36 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...)
// region ***************************** args.gotpl *****************************
+func (ec *executionContext) field_Mutation_createUserWebhook_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 model.UserWebhookInput
+ if tmp, ok := rawArgs["config"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("config"))
+ arg0, err = ec.unmarshalNUserWebhookInput2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐUserWebhookInput(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["config"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_Mutation_deleteUserWebhook_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 int
+ if tmp, ok := rawArgs["id"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
+ arg0, err = ec.unmarshalNInt2int(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["id"] = arg0
+ return args, nil
+}
+
func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
@@ 1196,39 1674,99 @@ func (ec *executionContext) field_Query_space_args(ctx context.Context, rawArgs
return args, nil
}
-func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+func (ec *executionContext) field_Query_userWebhook_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
- var arg0 bool
- if tmp, ok := rawArgs["includeDeprecated"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
- arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
+ var arg0 int
+ if tmp, ok := rawArgs["id"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
+ arg0, err = ec.unmarshalNInt2int(ctx, tmp)
if err != nil {
return nil, err
}
}
- args["includeDeprecated"] = arg0
+ args["id"] = arg0
return args, nil
}
-func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+func (ec *executionContext) field_Query_userWebhooks_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
- var arg0 bool
- if tmp, ok := rawArgs["includeDeprecated"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
- arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
+ var arg0 *model1.Cursor
+ if tmp, ok := rawArgs["cursor"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑcoreᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
}
- args["includeDeprecated"] = arg0
+ args["cursor"] = arg0
return args, nil
}
-// endregion ***************************** args.gotpl *****************************
-
-// region ************************** directives.gotpl **************************
+func (ec *executionContext) field_UserWebhookSubscription_deliveries_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 *model1.Cursor
+ if tmp, ok := rawArgs["cursor"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
+ arg0, err = ec.unmarshalOCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑcoreᚋmodelᚐCursor(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["cursor"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field_UserWebhookSubscription_sample_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 model.WebhookEvent
+ if tmp, ok := rawArgs["event"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("event"))
+ arg0, err = ec.unmarshalNWebhookEvent2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEvent(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["event"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 bool
+ if tmp, ok := rawArgs["includeDeprecated"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
+ arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["includeDeprecated"] = arg0
+ return args, nil
+}
+
+func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 bool
+ if tmp, ok := rawArgs["includeDeprecated"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
+ arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["includeDeprecated"] = arg0
+ return args, nil
+}
+
+// endregion ***************************** args.gotpl *****************************
+
+// region ************************** directives.gotpl **************************
// endregion ************************** directives.gotpl **************************
@@ 1935,6 2473,116 @@ func (ec *executionContext) fieldContext_Document_markdown(ctx context.Context,
return fc, nil
}
+func (ec *executionContext) _Mutation_createUserWebhook(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_createUserWebhook(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().CreateUserWebhook(rctx, fc.Args["config"].(model.UserWebhookInput))
+ })
+ 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.(model.WebhookSubscription)
+ fc.Result = res
+ return ec.marshalNWebhookSubscription2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscription(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Mutation_createUserWebhook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_createUserWebhook_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_deleteUserWebhook(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_deleteUserWebhook(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Mutation().DeleteUserWebhook(rctx, fc.Args["id"].(int))
+ })
+ 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.(model.WebhookSubscription)
+ fc.Result = res
+ return ec.marshalNWebhookSubscription2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscription(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Mutation_deleteUserWebhook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_deleteUserWebhook_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Project_owner(ctx context.Context, field graphql.CollectedField, obj *model.Project) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Project_owner(ctx, field)
if err != nil {
@@ 2730,8 3378,8 @@ func (ec *executionContext) fieldContext_Proposal_resolved(ctx context.Context,
return fc, nil
}
-func (ec *executionContext) _Query_spaces(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_Query_spaces(ctx, field)
+func (ec *executionContext) _ProposalEvent_uuid(ctx context.Context, field graphql.CollectedField, obj *model.ProposalEvent) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProposalEvent_uuid(ctx, field)
if err != nil {
return graphql.Null
}
@@ 2744,7 3392,7 @@ func (ec *executionContext) _Query_spaces(ctx context.Context, field graphql.Col
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Spaces(rctx)
+ return obj.UUID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ 2756,38 3404,26 @@ func (ec *executionContext) _Query_spaces(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.([]*model.Space)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNSpace2ᚕᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐSpaceᚄ(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Query_spaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_ProposalEvent_uuid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "Query",
+ Object: "ProposalEvent",
Field: field,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "owner":
- return ec.fieldContext_Space_owner(ctx, field)
- case "name":
- return ec.fieldContext_Space_name(ctx, field)
- case "ref":
- return ec.fieldContext_Space_ref(ctx, field)
- case "created":
- return ec.fieldContext_Space_created(ctx, field)
- case "approvedRev":
- return ec.fieldContext_Space_approvedRev(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type Space", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) _Query_space(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_Query_space(ctx, field)
+func (ec *executionContext) _ProposalEvent_event(ctx context.Context, field graphql.CollectedField, obj *model.ProposalEvent) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProposalEvent_event(ctx, field)
if err != nil {
return graphql.Null
}
@@ 2800,58 3436,82 @@ func (ec *executionContext) _Query_space(ctx context.Context, field graphql.Coll
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Space(rctx, fc.Args["owner"].(string), fc.Args["name"].(string))
+ return obj.Event, 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.(*model.Space)
+ res := resTmp.(model.WebhookEvent)
fc.Result = res
- return ec.marshalOSpace2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐSpace(ctx, field.Selections, res)
+ return ec.marshalNWebhookEvent2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEvent(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Query_space(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_ProposalEvent_event(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "Query",
+ Object: "ProposalEvent",
Field: field,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "owner":
- return ec.fieldContext_Space_owner(ctx, field)
- case "name":
- return ec.fieldContext_Space_name(ctx, field)
- case "ref":
- return ec.fieldContext_Space_ref(ctx, field)
- case "created":
- return ec.fieldContext_Space_created(ctx, field)
- case "approvedRev":
- return ec.fieldContext_Space_approvedRev(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type Space", field.Name)
+ return nil, errors.New("field of type WebhookEvent does not have child fields")
},
}
+ return fc, nil
+}
+
+func (ec *executionContext) _ProposalEvent_date(ctx context.Context, field graphql.CollectedField, obj *model.ProposalEvent) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProposalEvent_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
- err = ec.Recover(ctx, r)
- ec.Error(ctx, err)
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
}
}()
- ctx = graphql.WithFieldContext(ctx, fc)
- if fc.Args, err = ec.field_Query_space_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Date, nil
+ })
+ if err != nil {
ec.Error(ctx, err)
- return fc, err
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ fc.Result = res
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_ProposalEvent_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProposalEvent",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
return fc, nil
}
-func (ec *executionContext) _Query_document(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_Query_document(ctx, field)
+func (ec *executionContext) _ProposalEvent_proposal(ctx context.Context, field graphql.CollectedField, obj *model.ProposalEvent) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProposalEvent_proposal(ctx, field)
if err != nil {
return graphql.Null
}
@@ 2864,44 3524,236 @@ func (ec *executionContext) _Query_document(ctx context.Context, field graphql.C
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Document(rctx, fc.Args["space"].(string), fc.Args["id"].(*string), fc.Args["path"].(*string), fc.Args["rev"].(*string))
+ return obj.Proposal, 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.(*model.Document)
+ res := resTmp.(*model.Proposal)
fc.Result = res
- return ec.marshalODocument2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐDocument(ctx, field.Selections, res)
+ return ec.marshalNProposal2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐProposal(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Query_document(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_ProposalEvent_proposal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "Query",
+ Object: "ProposalEvent",
Field: field,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
- case "space":
- return ec.fieldContext_Document_space(ctx, field)
case "id":
- return ec.fieldContext_Document_id(ctx, field)
- case "docId":
- return ec.fieldContext_Document_docId(ctx, field)
- case "path":
- return ec.fieldContext_Document_path(ctx, field)
- case "rev":
- return ec.fieldContext_Document_rev(ctx, field)
- case "blob":
- return ec.fieldContext_Document_blob(ctx, field)
- case "pinned":
- return ec.fieldContext_Document_pinned(ctx, field)
- case "title":
- return ec.fieldContext_Document_title(ctx, field)
+ return ec.fieldContext_Proposal_id(ctx, field)
+ case "space":
+ return ec.fieldContext_Proposal_space(ctx, field)
+ case "title":
+ return ec.fieldContext_Proposal_title(ctx, field)
+ case "rationale":
+ return ec.fieldContext_Proposal_rationale(ctx, field)
+ case "baseRev":
+ return ec.fieldContext_Proposal_baseRev(ctx, field)
+ case "branch":
+ return ec.fieldContext_Proposal_branch(ctx, field)
+ case "state":
+ return ec.fieldContext_Proposal_state(ctx, field)
+ case "approval":
+ return ec.fieldContext_Proposal_approval(ctx, field)
+ case "mergedRev":
+ return ec.fieldContext_Proposal_mergedRev(ctx, field)
+ case "agent":
+ return ec.fieldContext_Proposal_agent(ctx, field)
+ case "agentSession":
+ return ec.fieldContext_Proposal_agentSession(ctx, field)
+ case "created":
+ return ec.fieldContext_Proposal_created(ctx, field)
+ case "resolved":
+ return ec.fieldContext_Proposal_resolved(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_spaces(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_spaces(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().Spaces(rctx)
+ })
+ 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.([]*model.Space)
+ fc.Result = res
+ return ec.marshalNSpace2ᚕᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐSpaceᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Query_spaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "owner":
+ return ec.fieldContext_Space_owner(ctx, field)
+ case "name":
+ return ec.fieldContext_Space_name(ctx, field)
+ case "ref":
+ return ec.fieldContext_Space_ref(ctx, field)
+ case "created":
+ return ec.fieldContext_Space_created(ctx, field)
+ case "approvedRev":
+ return ec.fieldContext_Space_approvedRev(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Space", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_space(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_space(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().Space(rctx, fc.Args["owner"].(string), fc.Args["name"].(string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.Space)
+ fc.Result = res
+ return ec.marshalOSpace2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐSpace(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Query_space(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "owner":
+ return ec.fieldContext_Space_owner(ctx, field)
+ case "name":
+ return ec.fieldContext_Space_name(ctx, field)
+ case "ref":
+ return ec.fieldContext_Space_ref(ctx, field)
+ case "created":
+ return ec.fieldContext_Space_created(ctx, field)
+ case "approvedRev":
+ return ec.fieldContext_Space_approvedRev(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Space", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_space_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_document(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_document(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().Document(rctx, fc.Args["space"].(string), fc.Args["id"].(*string), fc.Args["path"].(*string), fc.Args["rev"].(*string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.Document)
+ fc.Result = res
+ return ec.marshalODocument2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐDocument(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Query_document(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "space":
+ return ec.fieldContext_Document_space(ctx, field)
+ case "id":
+ return ec.fieldContext_Document_id(ctx, field)
+ case "docId":
+ return ec.fieldContext_Document_docId(ctx, field)
+ case "path":
+ return ec.fieldContext_Document_path(ctx, field)
+ case "rev":
+ return ec.fieldContext_Document_rev(ctx, field)
+ case "blob":
+ return ec.fieldContext_Document_blob(ctx, field)
+ case "pinned":
+ return ec.fieldContext_Document_pinned(ctx, field)
+ case "title":
+ return ec.fieldContext_Document_title(ctx, field)
case "status":
return ec.fieldContext_Document_status(ctx, field)
case "section":
@@ 3291,8 4143,8 @@ func (ec *executionContext) fieldContext_Query_proposals(ctx context.Context, fi
return fc, nil
}
-func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_Query___type(ctx, field)
+func (ec *executionContext) _Query_userWebhooks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_userWebhooks(ctx, field)
if err != nil {
return graphql.Null
}
@@ 3305,50 4157,37 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.introspectType(fc.Args["name"].(string))
+ return ec.resolvers.Query().UserWebhooks(rctx, fc.Args["cursor"].(*model1.Cursor))
})
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.(*introspection.Type)
+ res := resTmp.(*model.WebhookSubscriptionCursor)
fc.Result = res
- return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+ return ec.marshalNWebhookSubscriptionCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscriptionCursor(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Query_userWebhooks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
- IsResolver: false,
+ IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
- case "kind":
- return ec.fieldContext___Type_kind(ctx, field)
- case "name":
- return ec.fieldContext___Type_name(ctx, field)
- case "description":
- return ec.fieldContext___Type_description(ctx, field)
- case "fields":
- return ec.fieldContext___Type_fields(ctx, field)
- case "interfaces":
- return ec.fieldContext___Type_interfaces(ctx, field)
- case "possibleTypes":
- return ec.fieldContext___Type_possibleTypes(ctx, field)
- case "enumValues":
- return ec.fieldContext___Type_enumValues(ctx, field)
- case "inputFields":
- return ec.fieldContext___Type_inputFields(ctx, field)
- case "ofType":
- return ec.fieldContext___Type_ofType(ctx, field)
- case "specifiedByURL":
- return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ case "results":
+ return ec.fieldContext_WebhookSubscriptionCursor_results(ctx, field)
+ case "cursor":
+ return ec.fieldContext_WebhookSubscriptionCursor_cursor(ctx, field)
}
- return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ return nil, fmt.Errorf("no field named %q was found under type WebhookSubscriptionCursor", field.Name)
},
}
defer func() {
@@ 3358,15 4197,15 @@ 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 {
+ if fc.Args, err = ec.field_Query_userWebhooks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
-func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_Query___schema(ctx, field)
+func (ec *executionContext) _Query_userWebhook(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_userWebhook(ctx, field)
if err != nil {
return graphql.Null
}
@@ 3379,7 4218,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.introspectSchema()
+ return ec.resolvers.Query().UserWebhook(rctx, fc.Args["id"].(int))
})
if err != nil {
ec.Error(ctx, err)
@@ 3388,29 4227,199 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*introspection.Schema)
+ res := resTmp.(model.WebhookSubscription)
fc.Result = res
- return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
+ return ec.marshalOWebhookSubscription2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscription(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Query_userWebhook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
- IsResolver: false,
+ IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "description":
- return ec.fieldContext___Schema_description(ctx, field)
- case "types":
- return ec.fieldContext___Schema_types(ctx, field)
- case "queryType":
- return ec.fieldContext___Schema_queryType(ctx, field)
- case "mutationType":
- return ec.fieldContext___Schema_mutationType(ctx, field)
- case "subscriptionType":
- return ec.fieldContext___Schema_subscriptionType(ctx, field)
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_userWebhook_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_webhook(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_webhook(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Query().Webhook(rctx)
+ })
+ 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.(model.WebhookPayload)
+ fc.Result = res
+ return ec.marshalNWebhookPayload2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookPayload(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Query_webhook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query___type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.introspectType(fc.Args["name"].(string))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query___schema(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.introspectSchema()
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Schema)
+ fc.Result = res
+ return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "description":
+ return ec.fieldContext___Schema_description(ctx, field)
+ case "types":
+ return ec.fieldContext___Schema_types(ctx, field)
+ case "queryType":
+ return ec.fieldContext___Schema_queryType(ctx, field)
+ case "mutationType":
+ return ec.fieldContext___Schema_mutationType(ctx, field)
+ case "subscriptionType":
+ return ec.fieldContext___Schema_subscriptionType(ctx, field)
case "directives":
return ec.fieldContext___Schema_directives(ctx, field)
}
@@ 4234,8 5243,8 @@ func (ec *executionContext) fieldContext_Space_approvedRev(ctx context.Context,
return fc, nil
}
-func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Directive_name(ctx, field)
+func (ec *executionContext) _UserWebhookSubscription_id(ctx context.Context, field graphql.CollectedField, obj *model.UserWebhookSubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserWebhookSubscription_id(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4248,7 5257,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ 4260,26 5269,26 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_UserWebhookSubscription_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Directive",
+ Object: "UserWebhookSubscription",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
+ return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Directive_description(ctx, field)
+func (ec *executionContext) _UserWebhookSubscription_events(ctx context.Context, field graphql.CollectedField, obj *model.UserWebhookSubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserWebhookSubscription_events(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4292,35 5301,38 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description(), nil
+ return obj.Events, 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.(*string)
+ res := resTmp.([]model.WebhookEvent)
fc.Result = res
- return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+ return ec.marshalNWebhookEvent2ᚕsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEventᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_UserWebhookSubscription_events(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Directive",
+ Object: "UserWebhookSubscription",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
+ return nil, errors.New("field of type WebhookEvent does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Directive_locations(ctx, field)
+func (ec *executionContext) _UserWebhookSubscription_query(ctx context.Context, field graphql.CollectedField, obj *model.UserWebhookSubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserWebhookSubscription_query(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4333,7 5345,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Locations, nil
+ return obj.Query, nil
})
if err != nil {
ec.Error(ctx, err)
@@ 4345,26 5357,26 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_UserWebhookSubscription_query(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Directive",
+ Object: "UserWebhookSubscription",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type __DirectiveLocation does not have child fields")
+ return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Directive_args(ctx, field)
+func (ec *executionContext) _UserWebhookSubscription_url(ctx context.Context, field graphql.CollectedField, obj *model.UserWebhookSubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserWebhookSubscription_url(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4377,7 5389,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Args, nil
+ return obj.URL, nil
})
if err != nil {
ec.Error(ctx, err)
@@ 4389,36 5401,26 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.([]introspection.InputValue)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_UserWebhookSubscription_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Directive",
+ Object: "UserWebhookSubscription",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "name":
- return ec.fieldContext___InputValue_name(ctx, field)
- case "description":
- return ec.fieldContext___InputValue_description(ctx, field)
- case "type":
- return ec.fieldContext___InputValue_type(ctx, field)
- case "defaultValue":
- return ec.fieldContext___InputValue_defaultValue(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
+func (ec *executionContext) _UserWebhookSubscription_deliveries(ctx context.Context, field graphql.CollectedField, obj *model.UserWebhookSubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserWebhookSubscription_deliveries(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4431,7 5433,7 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsRepeatable, nil
+ return ec.resolvers.UserWebhookSubscription().Deliveries(rctx, obj, fc.Args["cursor"].(*model1.Cursor))
})
if err != nil {
ec.Error(ctx, err)
@@ 4443,26 5445,43 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*model.WebhookDeliveryCursor)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNWebhookDeliveryCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookDeliveryCursor(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_UserWebhookSubscription_deliveries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Directive",
+ Object: "UserWebhookSubscription",
Field: field,
- IsMethod: false,
- IsResolver: false,
+ IsMethod: true,
+ IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type Boolean does not have child fields")
+ switch field.Name {
+ case "results":
+ return ec.fieldContext_WebhookDeliveryCursor_results(ctx, field)
+ case "cursor":
+ return ec.fieldContext_WebhookDeliveryCursor_cursor(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type WebhookDeliveryCursor", field.Name)
},
}
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_UserWebhookSubscription_deliveries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
return fc, nil
}
-func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___EnumValue_name(ctx, field)
+func (ec *executionContext) _UserWebhookSubscription_sample(ctx context.Context, field graphql.CollectedField, obj *model.UserWebhookSubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserWebhookSubscription_sample(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4475,7 5494,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return ec.resolvers.UserWebhookSubscription().Sample(rctx, obj, fc.Args["event"].(model.WebhookEvent))
})
if err != nil {
ec.Error(ctx, err)
@@ 4492,21 5511,32 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_UserWebhookSubscription_sample(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__EnumValue",
+ Object: "UserWebhookSubscription",
Field: field,
- IsMethod: false,
- IsResolver: false,
+ IsMethod: true,
+ IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_UserWebhookSubscription_sample_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
return fc, nil
}
-func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___EnumValue_description(ctx, field)
+func (ec *executionContext) _WebhookDelivery_uuid(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDelivery) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDelivery_uuid(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4519,25 5549,28 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description(), nil
+ return obj.UUID, 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.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDelivery_uuid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__EnumValue",
+ Object: "WebhookDelivery",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
@@ 4546,8 5579,8 @@ func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Con
return fc, nil
}
-func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
+func (ec *executionContext) _WebhookDelivery_date(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDelivery) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDelivery_date(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4560,7 5593,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsDeprecated(), nil
+ return obj.Date, nil
})
if err != nil {
ec.Error(ctx, err)
@@ 4572,26 5605,26 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(time.Time)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDelivery_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__EnumValue",
+ Object: "WebhookDelivery",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type Boolean does not have child fields")
+ return nil, errors.New("field of type Time does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
+func (ec *executionContext) _WebhookDelivery_event(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDelivery) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDelivery_event(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4604,35 5637,38 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context,
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DeprecationReason(), nil
+ return obj.Event, 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.(*string)
+ res := resTmp.(model.WebhookEvent)
fc.Result = res
- return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+ return ec.marshalNWebhookEvent2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEvent(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDelivery_event(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__EnumValue",
+ Object: "WebhookDelivery",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
+ return nil, errors.New("field of type WebhookEvent does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Field_name(ctx, field)
+func (ec *executionContext) _WebhookDelivery_subscription(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDelivery) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDelivery_subscription(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4645,7 5681,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return ec.resolvers.WebhookDelivery().Subscription(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ 4657,26 5693,26 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(model.WebhookSubscription)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNWebhookSubscription2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscription(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDelivery_subscription(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Field",
+ Object: "WebhookDelivery",
Field: field,
- IsMethod: false,
- IsResolver: false,
+ IsMethod: true,
+ IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
},
}
return fc, nil
}
-func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Field_description(ctx, field)
+func (ec *executionContext) _WebhookDelivery_requestBody(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDelivery) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDelivery_requestBody(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4689,25 5725,28 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description(), nil
+ return obj.RequestBody, 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.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDelivery_requestBody(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Field",
+ Object: "WebhookDelivery",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
@@ 4716,8 5755,8 @@ func (ec *executionContext) fieldContext___Field_description(ctx context.Context
return fc, nil
}
-func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Field_args(ctx, field)
+func (ec *executionContext) _WebhookDelivery_responseBody(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDelivery) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDelivery_responseBody(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4730,48 5769,35 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Args, nil
+ return obj.ResponseBody, 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.([]introspection.InputValue)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDelivery_responseBody(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Field",
+ Object: "WebhookDelivery",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "name":
- return ec.fieldContext___InputValue_name(ctx, field)
- case "description":
- return ec.fieldContext___InputValue_description(ctx, field)
- case "type":
- return ec.fieldContext___InputValue_type(ctx, field)
- case "defaultValue":
- return ec.fieldContext___InputValue_defaultValue(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Field_type(ctx, field)
+func (ec *executionContext) _WebhookDelivery_responseHeaders(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDelivery) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDelivery_responseHeaders(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4784,60 5810,35 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
+ return obj.ResponseHeaders, 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.(*introspection.Type)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDelivery_responseHeaders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Field",
+ Object: "WebhookDelivery",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "kind":
- return ec.fieldContext___Type_kind(ctx, field)
- case "name":
- return ec.fieldContext___Type_name(ctx, field)
- case "description":
- return ec.fieldContext___Type_description(ctx, field)
- case "fields":
- return ec.fieldContext___Type_fields(ctx, field)
- case "interfaces":
- return ec.fieldContext___Type_interfaces(ctx, field)
- case "possibleTypes":
- return ec.fieldContext___Type_possibleTypes(ctx, field)
- case "enumValues":
- return ec.fieldContext___Type_enumValues(ctx, field)
- case "inputFields":
- return ec.fieldContext___Type_inputFields(ctx, field)
- case "ofType":
- return ec.fieldContext___Type_ofType(ctx, field)
- case "specifiedByURL":
- return ec.fieldContext___Type_specifiedByURL(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
+func (ec *executionContext) _WebhookDelivery_responseStatus(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDelivery) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDelivery_responseStatus(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4850,38 5851,35 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsDeprecated(), nil
+ return obj.ResponseStatus, 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)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDelivery_responseStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Field",
+ Object: "WebhookDelivery",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type Boolean does not have child fields")
+ return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
+func (ec *executionContext) _WebhookDeliveryCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDeliveryCursor) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDeliveryCursor_results(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4894,35 5892,56 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DeprecationReason(), nil
+ return obj.Results, 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.(*string)
+ res := resTmp.([]*model.WebhookDelivery)
fc.Result = res
- return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+ return ec.marshalNWebhookDelivery2ᚕᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookDeliveryᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDeliveryCursor_results(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Field",
+ Object: "WebhookDeliveryCursor",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
+ switch field.Name {
+ case "uuid":
+ return ec.fieldContext_WebhookDelivery_uuid(ctx, field)
+ case "date":
+ return ec.fieldContext_WebhookDelivery_date(ctx, field)
+ case "event":
+ return ec.fieldContext_WebhookDelivery_event(ctx, field)
+ case "subscription":
+ return ec.fieldContext_WebhookDelivery_subscription(ctx, field)
+ case "requestBody":
+ return ec.fieldContext_WebhookDelivery_requestBody(ctx, field)
+ case "responseBody":
+ return ec.fieldContext_WebhookDelivery_responseBody(ctx, field)
+ case "responseHeaders":
+ return ec.fieldContext_WebhookDelivery_responseHeaders(ctx, field)
+ case "responseStatus":
+ return ec.fieldContext_WebhookDelivery_responseStatus(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type WebhookDelivery", field.Name)
},
}
return fc, nil
}
-func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___InputValue_name(ctx, field)
+func (ec *executionContext) _WebhookDeliveryCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.WebhookDeliveryCursor) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookDeliveryCursor_cursor(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4935,38 5954,35 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.Cursor, 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.(string)
+ res := resTmp.(*model1.Cursor)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑcoreᚋmodelᚐCursor(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookDeliveryCursor_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__InputValue",
+ Object: "WebhookDeliveryCursor",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
+ return nil, errors.New("field of type Cursor does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___InputValue_description(ctx, field)
+func (ec *executionContext) _WebhookSubscriptionCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.WebhookSubscriptionCursor) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookSubscriptionCursor_results(ctx, field)
if err != nil {
return graphql.Null
}
@@ 4979,35 5995,38 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description(), nil
+ return obj.Results, 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.(*string)
+ res := resTmp.([]model.WebhookSubscription)
fc.Result = res
- return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+ return ec.marshalNWebhookSubscription2ᚕsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscriptionᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookSubscriptionCursor_results(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__InputValue",
+ Object: "WebhookSubscriptionCursor",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
},
}
return fc, nil
}
-func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___InputValue_type(ctx, field)
+func (ec *executionContext) _WebhookSubscriptionCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.WebhookSubscriptionCursor) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookSubscriptionCursor_cursor(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5020,60 6039,35 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
+ return obj.Cursor, 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.(*introspection.Type)
+ res := resTmp.(*model1.Cursor)
fc.Result = res
- return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+ return ec.marshalOCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑcoreᚋmodelᚐCursor(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_WebhookSubscriptionCursor_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__InputValue",
+ Object: "WebhookSubscriptionCursor",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "kind":
- return ec.fieldContext___Type_kind(ctx, field)
- case "name":
- return ec.fieldContext___Type_name(ctx, field)
- case "description":
- return ec.fieldContext___Type_description(ctx, field)
- case "fields":
- return ec.fieldContext___Type_fields(ctx, field)
- case "interfaces":
- return ec.fieldContext___Type_interfaces(ctx, field)
- case "possibleTypes":
- return ec.fieldContext___Type_possibleTypes(ctx, field)
- case "enumValues":
- return ec.fieldContext___Type_enumValues(ctx, field)
- case "inputFields":
- return ec.fieldContext___Type_inputFields(ctx, field)
- case "ofType":
- return ec.fieldContext___Type_ofType(ctx, field)
- case "specifiedByURL":
- return ec.fieldContext___Type_specifiedByURL(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ return nil, errors.New("field of type Cursor does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
+func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_name(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5086,23 6080,26 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DefaultValue, nil
+ return obj.Name, 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.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__InputValue",
+ Object: "__Directive",
Field: field,
IsMethod: false,
IsResolver: false,
@@ 5113,8 6110,8 @@ func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.C
return fc, nil
}
-func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Schema_description(ctx, field)
+func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_description(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5141,9 6138,9 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Schema",
+ Object: "__Directive",
Field: field,
IsMethod: true,
IsResolver: false,
@@ 5154,9 6151,9 @@ func (ec *executionContext) fieldContext___Schema_description(ctx context.Contex
return fc, nil
}
-func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Schema_types(ctx, field)
- if err != nil {
+func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_locations(ctx, field)
+ if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
@@ 5168,7 6165,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Types(), nil
+ return obj.Locations, nil
})
if err != nil {
ec.Error(ctx, err)
@@ 5180,48 6177,26 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.([]introspection.Type)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+ return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Schema",
+ Object: "__Directive",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "kind":
- return ec.fieldContext___Type_kind(ctx, field)
- case "name":
- return ec.fieldContext___Type_name(ctx, field)
- case "description":
- return ec.fieldContext___Type_description(ctx, field)
- case "fields":
- return ec.fieldContext___Type_fields(ctx, field)
- case "interfaces":
- return ec.fieldContext___Type_interfaces(ctx, field)
- case "possibleTypes":
- return ec.fieldContext___Type_possibleTypes(ctx, field)
- case "enumValues":
- return ec.fieldContext___Type_enumValues(ctx, field)
- case "inputFields":
- return ec.fieldContext___Type_inputFields(ctx, field)
- case "ofType":
- return ec.fieldContext___Type_ofType(ctx, field)
- case "specifiedByURL":
- return ec.fieldContext___Type_specifiedByURL(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ return nil, errors.New("field of type __DirectiveLocation does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Schema_queryType(ctx, field)
+func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_args(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5234,7 6209,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.QueryType(), nil
+ return obj.Args, nil
})
if err != nil {
ec.Error(ctx, err)
@@ 5246,48 6221,36 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.([]introspection.InputValue)
fc.Result = res
- return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+ return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Schema",
+ Object: "__Directive",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
- case "kind":
- return ec.fieldContext___Type_kind(ctx, field)
case "name":
- return ec.fieldContext___Type_name(ctx, field)
+ return ec.fieldContext___InputValue_name(ctx, field)
case "description":
- return ec.fieldContext___Type_description(ctx, field)
- case "fields":
- return ec.fieldContext___Type_fields(ctx, field)
- case "interfaces":
- return ec.fieldContext___Type_interfaces(ctx, field)
- case "possibleTypes":
- return ec.fieldContext___Type_possibleTypes(ctx, field)
- case "enumValues":
- return ec.fieldContext___Type_enumValues(ctx, field)
- case "inputFields":
- return ec.fieldContext___Type_inputFields(ctx, field)
- case "ofType":
- return ec.fieldContext___Type_ofType(ctx, field)
- case "specifiedByURL":
- return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
}
- return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
},
}
return fc, nil
}
-func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
+func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5300,57 6263,38 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.MutationType(), nil
+ 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.(*introspection.Type)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Schema",
+ Object: "__Directive",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "kind":
- return ec.fieldContext___Type_kind(ctx, field)
- case "name":
- return ec.fieldContext___Type_name(ctx, field)
- case "description":
- return ec.fieldContext___Type_description(ctx, field)
- case "fields":
- return ec.fieldContext___Type_fields(ctx, field)
- case "interfaces":
- return ec.fieldContext___Type_interfaces(ctx, field)
- case "possibleTypes":
- return ec.fieldContext___Type_possibleTypes(ctx, field)
- case "enumValues":
- return ec.fieldContext___Type_enumValues(ctx, field)
- case "inputFields":
- return ec.fieldContext___Type_inputFields(ctx, field)
- case "ofType":
- return ec.fieldContext___Type_ofType(ctx, field)
- case "specifiedByURL":
- return ec.fieldContext___Type_specifiedByURL(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
+func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_name(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5363,57 6307,38 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SubscriptionType(), nil
+ return obj.Name, 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.(*introspection.Type)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Schema",
+ Object: "__EnumValue",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "kind":
- return ec.fieldContext___Type_kind(ctx, field)
- case "name":
- return ec.fieldContext___Type_name(ctx, field)
- case "description":
- return ec.fieldContext___Type_description(ctx, field)
- case "fields":
- return ec.fieldContext___Type_fields(ctx, field)
- case "interfaces":
- return ec.fieldContext___Type_interfaces(ctx, field)
- case "possibleTypes":
- return ec.fieldContext___Type_possibleTypes(ctx, field)
- case "enumValues":
- return ec.fieldContext___Type_enumValues(ctx, field)
- case "inputFields":
- return ec.fieldContext___Type_inputFields(ctx, field)
- case "ofType":
- return ec.fieldContext___Type_ofType(ctx, field)
- case "specifiedByURL":
- return ec.fieldContext___Type_specifiedByURL(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Schema_directives(ctx, field)
+func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_description(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5426,50 6351,35 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Directives(), nil
+ return obj.Description(), 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.([]introspection.Directive)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Schema",
+ Object: "__EnumValue",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "name":
- return ec.fieldContext___Directive_name(ctx, field)
- case "description":
- return ec.fieldContext___Directive_description(ctx, field)
- case "locations":
- return ec.fieldContext___Directive_locations(ctx, field)
- case "args":
- return ec.fieldContext___Directive_args(ctx, field)
- case "isRepeatable":
- return ec.fieldContext___Directive_isRepeatable(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_kind(ctx, field)
+func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5482,7 6392,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Kind(), nil
+ return obj.IsDeprecated(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ 5494,26 6404,26 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__EnumValue",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type __TypeKind does not have child fields")
+ return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_name(ctx, field)
+func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5526,7 6436,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name(), nil
+ return obj.DeprecationReason(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ 5540,9 6450,9 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__EnumValue",
Field: field,
IsMethod: true,
IsResolver: false,
@@ 5553,8 6463,8 @@ func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field
return fc, nil
}
-func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_description(ctx, field)
+func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_name(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5567,25 6477,28 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description(), nil
+ return obj.Name, 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.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__Field",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
@@ 5594,8 6507,8 @@ func (ec *executionContext) fieldContext___Type_description(ctx context.Context,
return fc, nil
}
-func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_fields(ctx, field)
+func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_description(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5608,7 6521,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
+ return obj.Description(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ 5617,51 6530,80 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]introspection.Field)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__Field",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "name":
- return ec.fieldContext___Field_name(ctx, field)
- case "description":
- return ec.fieldContext___Field_description(ctx, field)
- case "args":
- return ec.fieldContext___Field_args(ctx, field)
- case "type":
- return ec.fieldContext___Field_type(ctx, field)
- case "isDeprecated":
- return ec.fieldContext___Field_isDeprecated(ctx, field)
- case "deprecationReason":
- return ec.fieldContext___Field_deprecationReason(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
+ return fc, nil
+}
+
+func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_args(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
- err = ec.Recover(ctx, r)
- ec.Error(ctx, err)
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
}
}()
- ctx = graphql.WithFieldContext(ctx, fc)
- if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Args, nil
+ })
+ if err != nil {
ec.Error(ctx, err)
- return fc, err
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.InputValue)
+ fc.Result = res
+ return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___InputValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ },
}
return fc, nil
}
-func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_interfaces(ctx, field)
+func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_type(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5674,25 6616,28 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Interfaces(), nil
+ return obj.Type, 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.([]introspection.Type)
+ res := resTmp.(*introspection.Type)
fc.Result = res
- return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+ return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__Field",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
@@ 5723,8 6668,8 @@ func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context,
return fc, nil
}
-func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
+func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5737,57 6682,38 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PossibleTypes(), nil
+ return obj.IsDeprecated(), 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.([]introspection.Type)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__Field",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "kind":
- return ec.fieldContext___Type_kind(ctx, field)
- case "name":
- return ec.fieldContext___Type_name(ctx, field)
- case "description":
- return ec.fieldContext___Type_description(ctx, field)
- case "fields":
- return ec.fieldContext___Type_fields(ctx, field)
- case "interfaces":
- return ec.fieldContext___Type_interfaces(ctx, field)
- case "possibleTypes":
- return ec.fieldContext___Type_possibleTypes(ctx, field)
- case "enumValues":
- return ec.fieldContext___Type_enumValues(ctx, field)
- case "inputFields":
- return ec.fieldContext___Type_inputFields(ctx, field)
- case "ofType":
- return ec.fieldContext___Type_ofType(ctx, field)
- case "specifiedByURL":
- return ec.fieldContext___Type_specifiedByURL(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_enumValues(ctx, field)
+func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5800,7 6726,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
+ return obj.DeprecationReason(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ 5809,47 6735,70 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]introspection.EnumValue)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__Field",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "name":
- return ec.fieldContext___EnumValue_name(ctx, field)
- case "description":
- return ec.fieldContext___EnumValue_description(ctx, field)
- case "isDeprecated":
- return ec.fieldContext___EnumValue_isDeprecated(ctx, field)
- case "deprecationReason":
- return ec.fieldContext___EnumValue_deprecationReason(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
+ return fc, nil
+}
+
+func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
- err = ec.Recover(ctx, r)
- ec.Error(ctx, err)
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
}
}()
- ctx = graphql.WithFieldContext(ctx, fc)
- if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
ec.Error(ctx, err)
- return fc, err
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
return fc, nil
}
-func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_inputFields(ctx, field)
+func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_description(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5862,7 6811,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.InputFields(), nil
+ return obj.Description(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ 5871,36 6820,26 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]introspection.InputValue)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__InputValue",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "name":
- return ec.fieldContext___InputValue_name(ctx, field)
- case "description":
- return ec.fieldContext___InputValue_description(ctx, field)
- case "type":
- return ec.fieldContext___InputValue_type(ctx, field)
- case "defaultValue":
- return ec.fieldContext___InputValue_defaultValue(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
-func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_ofType(ctx, field)
+func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_type(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5913,25 6852,28 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.OfType(), nil
+ return obj.Type, 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.(*introspection.Type)
fc.Result = res
- return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+ return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__InputValue",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
@@ 5962,8 6904,8 @@ func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, fiel
return fc, nil
}
-func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
+func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
if err != nil {
return graphql.Null
}
@@ 5976,7 6918,7 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SpecifiedByURL(), nil
+ return obj.DefaultValue, nil
})
if err != nil {
ec.Error(ctx, err)
@@ 5990,11 6932,11 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
- Object: "__Type",
+ Object: "__InputValue",
Field: field,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
@@ 6003,14 6945,983 @@ func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Conte
return fc, nil
}
-// endregion **************************** field.gotpl *****************************
-
+func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_types(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Types(), 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.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_queryType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.QueryType(), 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.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.MutationType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SubscriptionType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_directives(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Directives(), 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.([]introspection.Directive)
+ fc.Result = res
+ return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___Directive_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Directive_description(ctx, field)
+ case "locations":
+ return ec.fieldContext___Directive_locations(ctx, field)
+ case "args":
+ return ec.fieldContext___Directive_args(ctx, field)
+ case "isRepeatable":
+ return ec.fieldContext___Directive_isRepeatable(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_kind(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Kind(), 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.(string)
+ fc.Result = res
+ return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type __TypeKind does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_fields(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Field)
+ fc.Result = res
+ return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___Field_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Field_description(ctx, field)
+ case "args":
+ return ec.fieldContext___Field_args(ctx, field)
+ case "type":
+ return ec.fieldContext___Field_type(ctx, field)
+ case "isDeprecated":
+ return ec.fieldContext___Field_isDeprecated(ctx, field)
+ case "deprecationReason":
+ return ec.fieldContext___Field_deprecationReason(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_interfaces(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Interfaces(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PossibleTypes(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_enumValues(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.EnumValue)
+ fc.Result = res
+ return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___EnumValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___EnumValue_description(ctx, field)
+ case "isDeprecated":
+ return ec.fieldContext___EnumValue_isDeprecated(ctx, field)
+ case "deprecationReason":
+ return ec.fieldContext___EnumValue_deprecationReason(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_inputFields(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.InputFields(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.InputValue)
+ fc.Result = res
+ return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___InputValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_ofType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.OfType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SpecifiedByURL(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+// endregion **************************** field.gotpl *****************************
+
// region **************************** input.gotpl *****************************
+func (ec *executionContext) unmarshalInputUserWebhookInput(ctx context.Context, obj interface{}) (model.UserWebhookInput, error) {
+ var it model.UserWebhookInput
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"url", "events", "query"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "url":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url"))
+ data, err := ec.unmarshalNString2string(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.URL = data
+ case "events":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("events"))
+ data, err := ec.unmarshalNWebhookEvent2ᚕsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEventᚄ(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.Events = data
+ case "query":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query"))
+ data, err := ec.unmarshalNString2string(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.Query = data
+ }
+ }
+
+ return it, nil
+}
+
// endregion **************************** input.gotpl *****************************
// region ************************** interface.gotpl ***************************
+func (ec *executionContext) _WebhookPayload(ctx context.Context, sel ast.SelectionSet, obj model.WebhookPayload) graphql.Marshaler {
+ switch obj := (obj).(type) {
+ case nil:
+ return graphql.Null
+ case model.ProposalEvent:
+ return ec._ProposalEvent(ctx, sel, &obj)
+ case *model.ProposalEvent:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._ProposalEvent(ctx, sel, obj)
+ default:
+ panic(fmt.Errorf("unexpected type %T", obj))
+ }
+}
+
+func (ec *executionContext) _WebhookSubscription(ctx context.Context, sel ast.SelectionSet, obj model.WebhookSubscription) graphql.Marshaler {
+ switch obj := (obj).(type) {
+ case nil:
+ return graphql.Null
+ case model.UserWebhookSubscription:
+ return ec._UserWebhookSubscription(ctx, sel, &obj)
+ case *model.UserWebhookSubscription:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._UserWebhookSubscription(ctx, sel, obj)
+ default:
+ panic(fmt.Errorf("unexpected type %T", obj))
+ }
+}
+
// endregion ************************** interface.gotpl ***************************
// region **************************** object.gotpl ****************************
@@ 6126,6 8037,62 @@ func (ec *executionContext) _Document(ctx context.Context, sel ast.SelectionSet,
return out
}
+var mutationImplementors = []string{"Mutation"}
+
+func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
+ ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
+ Object: "Mutation",
+ })
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
+ Object: field.Name,
+ Field: field,
+ })
+
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Mutation")
+ case "createUserWebhook":
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_createUserWebhook(ctx, field)
+ })
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "deleteUserWebhook":
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_deleteUserWebhook(ctx, field)
+ })
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ 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
+}
+
var projectImplementors = []string{"Project"}
func (ec *executionContext) _Project(ctx context.Context, sel ast.SelectionSet, obj *model.Project) graphql.Marshaler {
@@ 6306,26 8273,162 @@ func (ec *executionContext) _Proposal(ctx context.Context, sel ast.SelectionSet,
return out
}
-var queryImplementors = []string{"Query"}
+var proposalEventImplementors = []string{"ProposalEvent", "WebhookPayload"}
+
+func (ec *executionContext) _ProposalEvent(ctx context.Context, sel ast.SelectionSet, obj *model.ProposalEvent) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, proposalEventImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("ProposalEvent")
+ case "uuid":
+ out.Values[i] = ec._ProposalEvent_uuid(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "event":
+ out.Values[i] = ec._ProposalEvent_event(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "date":
+ out.Values[i] = ec._ProposalEvent_date(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "proposal":
+ out.Values[i] = ec._ProposalEvent_proposal(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ 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
+}
+
+var queryImplementors = []string{"Query"}
+
+func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
+ ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
+ Object: "Query",
+ })
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
+ Object: field.Name,
+ Field: field,
+ })
+
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Query")
+ case "spaces":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_spaces(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx,
+ func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
+ case "space":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_space(ctx, field)
+ return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx,
+ func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
+ case "document":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_document(ctx, field)
+ return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx,
+ func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
+ case "documents":
+ field := field
-func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
- ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
- Object: "Query",
- })
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Query_documents(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
- out := graphql.NewFieldSet(fields)
- deferred := make(map[string]*graphql.FieldSet)
- for i, field := range fields {
- innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
- Object: field.Name,
- Field: field,
- })
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx,
+ func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ }
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("Query")
- case "spaces":
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
+ case "search":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ 6334,7 8437,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_spaces(ctx, field)
+ res = ec._Query_search(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
@@ 6347,7 8450,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
- case "space":
+ case "projects":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ 6356,7 8459,10 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_space(ctx, field)
+ res = ec._Query_projects(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
return res
}
@@ 6366,7 8472,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
- case "document":
+ case "project":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ 6375,7 8481,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_document(ctx, field)
+ res = ec._Query_project(ctx, field)
return res
}
@@ 6385,7 8491,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
- case "documents":
+ case "proposals":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ 6394,7 8500,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_documents(ctx, field)
+ res = ec._Query_proposals(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
@@ 6407,7 8513,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
- case "search":
+ case "userWebhooks":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ 6416,7 8522,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_search(ctx, field)
+ res = ec._Query_userWebhooks(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
@@ 6429,7 8535,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
- case "projects":
+ case "userWebhook":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ 6438,10 8544,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_projects(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&fs.Invalids, 1)
- }
+ res = ec._Query_userWebhook(ctx, field)
return res
}
@@ 6451,7 8554,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
- case "project":
+ case "webhook":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ 6460,17 8563,215 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_project(ctx, field)
+ res = ec._Query_webhook(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
return res
}
-
- rrm := func(ctx context.Context) graphql.Marshaler {
- return ec.OperationContext.RootResolverMiddleware(ctx,
- func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx,
+ func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
+ case "__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(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
+}
+
+var searchHitImplementors = []string{"SearchHit"}
+
+func (ec *executionContext) _SearchHit(ctx context.Context, sel ast.SelectionSet, obj *model.SearchHit) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, searchHitImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("SearchHit")
+ case "space":
+ out.Values[i] = ec._SearchHit_space(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "id":
+ out.Values[i] = ec._SearchHit_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "rev":
+ out.Values[i] = ec._SearchHit_rev(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "path":
+ out.Values[i] = ec._SearchHit_path(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "anchor":
+ out.Values[i] = ec._SearchHit_anchor(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "title":
+ out.Values[i] = ec._SearchHit_title(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "section":
+ out.Values[i] = ec._SearchHit_section(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "lang":
+ out.Values[i] = ec._SearchHit_lang(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "score":
+ out.Values[i] = ec._SearchHit_score(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "snippet":
+ out.Values[i] = ec._SearchHit_snippet(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ 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
+}
+
+var searchResultsImplementors = []string{"SearchResults"}
+
+func (ec *executionContext) _SearchResults(ctx context.Context, sel ast.SelectionSet, obj *model.SearchResults) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, searchResultsImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("SearchResults")
+ case "total":
+ out.Values[i] = ec._SearchResults_total(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "took":
+ out.Values[i] = ec._SearchResults_took(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "hits":
+ out.Values[i] = ec._SearchResults_hits(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ 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
+}
+
+var spaceImplementors = []string{"Space"}
+
+func (ec *executionContext) _Space(ctx context.Context, sel ast.SelectionSet, obj *model.Space) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, spaceImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Space")
+ case "owner":
+ out.Values[i] = ec._Space_owner(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "name":
+ out.Values[i] = ec._Space_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
}
-
- out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
- case "proposals":
+ case "ref":
+ out.Values[i] = ec._Space_ref(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "created":
+ out.Values[i] = ec._Space_created(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "approvedRev":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ 6479,27 8780,33 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_proposals(ctx, field)
+ res = ec._Space_approvedRev(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
- rrm := func(ctx context.Context) graphql.Marshaler {
- return ec.OperationContext.RootResolverMiddleware(ctx,
- func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ 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 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)
- })
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ 6523,67 8830,109 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
return out
}
-var searchHitImplementors = []string{"SearchHit"}
+var userWebhookSubscriptionImplementors = []string{"UserWebhookSubscription", "WebhookSubscription"}
-func (ec *executionContext) _SearchHit(ctx context.Context, sel ast.SelectionSet, obj *model.SearchHit) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, searchHitImplementors)
+func (ec *executionContext) _UserWebhookSubscription(ctx context.Context, sel ast.SelectionSet, obj *model.UserWebhookSubscription) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, userWebhookSubscriptionImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("SearchHit")
- case "space":
- out.Values[i] = ec._SearchHit_space(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
- }
+ out.Values[i] = graphql.MarshalString("UserWebhookSubscription")
case "id":
- out.Values[i] = ec._SearchHit_id(ctx, field, obj)
+ out.Values[i] = ec._UserWebhookSubscription_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
- }
- case "rev":
- out.Values[i] = ec._SearchHit_rev(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
- case "path":
- out.Values[i] = ec._SearchHit_path(ctx, field, obj)
+ case "events":
+ out.Values[i] = ec._UserWebhookSubscription_events(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
- case "anchor":
- out.Values[i] = ec._SearchHit_anchor(ctx, field, obj)
+ case "query":
+ out.Values[i] = ec._UserWebhookSubscription_query(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
- case "title":
- out.Values[i] = ec._SearchHit_title(ctx, field, obj)
+ case "url":
+ out.Values[i] = ec._UserWebhookSubscription_url(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
- case "section":
- out.Values[i] = ec._SearchHit_section(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
+ case "deliveries":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._UserWebhookSubscription_deliveries(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
}
- case "lang":
- out.Values[i] = ec._SearchHit_lang(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
+
+ 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
}
- case "score":
- out.Values[i] = ec._SearchHit_score(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "sample":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._UserWebhookSubscription_sample(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
}
- case "snippet":
- out.Values[i] = ec._SearchHit_snippet(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
+
+ 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))
}
@@ 6607,32 8956,79 @@ func (ec *executionContext) _SearchHit(ctx context.Context, sel ast.SelectionSet
return out
}
-var searchResultsImplementors = []string{"SearchResults"}
+var webhookDeliveryImplementors = []string{"WebhookDelivery"}
-func (ec *executionContext) _SearchResults(ctx context.Context, sel ast.SelectionSet, obj *model.SearchResults) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, searchResultsImplementors)
+func (ec *executionContext) _WebhookDelivery(ctx context.Context, sel ast.SelectionSet, obj *model.WebhookDelivery) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, webhookDeliveryImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("SearchResults")
- case "total":
- out.Values[i] = ec._SearchResults_total(ctx, field, obj)
+ out.Values[i] = graphql.MarshalString("WebhookDelivery")
+ case "uuid":
+ out.Values[i] = ec._WebhookDelivery_uuid(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
- case "took":
- out.Values[i] = ec._SearchResults_took(ctx, field, obj)
+ case "date":
+ out.Values[i] = ec._WebhookDelivery_date(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
- case "hits":
- out.Values[i] = ec._SearchResults_hits(ctx, field, obj)
+ case "event":
+ out.Values[i] = ec._WebhookDelivery_event(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "subscription":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._WebhookDelivery_subscription(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
}
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // 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 "requestBody":
+ out.Values[i] = ec._WebhookDelivery_requestBody(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "responseBody":
+ out.Values[i] = ec._WebhookDelivery_responseBody(ctx, field, obj)
+ case "responseHeaders":
+ out.Values[i] = ec._WebhookDelivery_responseHeaders(ctx, field, obj)
+ case "responseStatus":
+ out.Values[i] = ec._WebhookDelivery_responseStatus(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ 6656,73 9052,65 @@ func (ec *executionContext) _SearchResults(ctx context.Context, sel ast.Selectio
return out
}
-var spaceImplementors = []string{"Space"}
+var webhookDeliveryCursorImplementors = []string{"WebhookDeliveryCursor"}
-func (ec *executionContext) _Space(ctx context.Context, sel ast.SelectionSet, obj *model.Space) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, spaceImplementors)
+func (ec *executionContext) _WebhookDeliveryCursor(ctx context.Context, sel ast.SelectionSet, obj *model.WebhookDeliveryCursor) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, webhookDeliveryCursorImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("Space")
- case "owner":
- out.Values[i] = ec._Space_owner(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&out.Invalids, 1)
- }
- case "name":
- out.Values[i] = ec._Space_name(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&out.Invalids, 1)
- }
- case "ref":
- out.Values[i] = ec._Space_ref(ctx, field, obj)
+ out.Values[i] = graphql.MarshalString("WebhookDeliveryCursor")
+ case "results":
+ out.Values[i] = ec._WebhookDeliveryCursor_results(ctx, field, obj)
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&out.Invalids, 1)
- }
- case "created":
- out.Values[i] = ec._Space_created(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&out.Invalids, 1)
+ out.Invalids++
}
- case "approvedRev":
- field := field
+ case "cursor":
+ out.Values[i] = ec._WebhookDeliveryCursor_cursor(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ 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,
+ })
+ }
- innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Space_approvedRev(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&fs.Invalids, 1)
- }
- return res
- }
+ return out
+}
- 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)
- })
+var webhookSubscriptionCursorImplementors = []string{"WebhookSubscriptionCursor"}
- // don't run the out.Concurrently() call below
- out.Values[i] = graphql.Null
- continue
- }
+func (ec *executionContext) _WebhookSubscriptionCursor(ctx context.Context, sel ast.SelectionSet, obj *model.WebhookSubscriptionCursor) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, webhookSubscriptionCursorImplementors)
- out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("WebhookSubscriptionCursor")
+ case "results":
+ out.Values[i] = ec._WebhookSubscriptionCursor_results(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "cursor":
+ out.Values[i] = ec._WebhookSubscriptionCursor_cursor(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ 7473,6 9861,228 @@ func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel as
return res
}
+func (ec *executionContext) unmarshalNUserWebhookInput2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐUserWebhookInput(ctx context.Context, v interface{}) (model.UserWebhookInput, error) {
+ res, err := ec.unmarshalInputUserWebhookInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNWebhookDelivery2ᚕᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookDeliveryᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.WebhookDelivery) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNWebhookDelivery2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookDelivery(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNWebhookDelivery2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookDelivery(ctx context.Context, sel ast.SelectionSet, v *model.WebhookDelivery) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._WebhookDelivery(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNWebhookDeliveryCursor2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookDeliveryCursor(ctx context.Context, sel ast.SelectionSet, v model.WebhookDeliveryCursor) graphql.Marshaler {
+ return ec._WebhookDeliveryCursor(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNWebhookDeliveryCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookDeliveryCursor(ctx context.Context, sel ast.SelectionSet, v *model.WebhookDeliveryCursor) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._WebhookDeliveryCursor(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalNWebhookEvent2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEvent(ctx context.Context, v interface{}) (model.WebhookEvent, error) {
+ var res model.WebhookEvent
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNWebhookEvent2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEvent(ctx context.Context, sel ast.SelectionSet, v model.WebhookEvent) graphql.Marshaler {
+ return v
+}
+
+func (ec *executionContext) unmarshalNWebhookEvent2ᚕsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEventᚄ(ctx context.Context, v interface{}) ([]model.WebhookEvent, error) {
+ var vSlice []interface{}
+ if v != nil {
+ vSlice = graphql.CoerceList(v)
+ }
+ var err error
+ res := make([]model.WebhookEvent, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalNWebhookEvent2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEvent(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func (ec *executionContext) marshalNWebhookEvent2ᚕsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEventᚄ(ctx context.Context, sel ast.SelectionSet, v []model.WebhookEvent) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNWebhookEvent2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookEvent(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNWebhookPayload2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookPayload(ctx context.Context, sel ast.SelectionSet, v model.WebhookPayload) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._WebhookPayload(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNWebhookSubscription2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscription(ctx context.Context, sel ast.SelectionSet, v model.WebhookSubscription) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._WebhookSubscription(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNWebhookSubscription2ᚕsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscriptionᚄ(ctx context.Context, sel ast.SelectionSet, v []model.WebhookSubscription) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNWebhookSubscription2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscription(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNWebhookSubscriptionCursor2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscriptionCursor(ctx context.Context, sel ast.SelectionSet, v model.WebhookSubscriptionCursor) graphql.Marshaler {
+ return ec._WebhookSubscriptionCursor(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNWebhookSubscriptionCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscriptionCursor(ctx context.Context, sel ast.SelectionSet, v *model.WebhookSubscriptionCursor) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._WebhookSubscriptionCursor(ctx, sel, v)
+}
+
func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
return ec.___Directive(ctx, sel, &v)
}
@@ 7768,6 10378,22 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast
return res
}
+func (ec *executionContext) unmarshalOCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑcoreᚋmodelᚐCursor(ctx context.Context, v interface{}) (*model1.Cursor, error) {
+ if v == nil {
+ return nil, nil
+ }
+ var res = new(model1.Cursor)
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOCursor2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑcoreᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v *model1.Cursor) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return v
+}
+
func (ec *executionContext) marshalODocument2ᚖsourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐDocument(ctx context.Context, sel ast.SelectionSet, v *model.Document) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ 7875,6 10501,13 @@ func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel
return res
}
+func (ec *executionContext) marshalOWebhookSubscription2sourcecraftᚗdevᚋbigbesᚋsrᚑhtᚑspecᚋgraphᚋmodelᚐWebhookSubscription(ctx context.Context, sel ast.SelectionSet, v model.WebhookSubscription) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._WebhookSubscription(ctx, sel, v)
+}
+
func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
if v == nil {
return graphql.Null