Stop tracking generated files
Run make generate in CI lint and test jobs since generated files are now gitignored. Also include Relay codegen for frontend apps in the generate target. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -3902,8 +3902,8 @@ input CreateMailingListUpdateInput {
|
||||
|
||||
input UpdateMailingListUpdateInput {
|
||||
id: ID!
|
||||
title: String
|
||||
body: String
|
||||
title: String!
|
||||
body: String!
|
||||
}
|
||||
|
||||
input SendMailingListUpdateInput {
|
||||
|
||||
3
pkg/server/api/console/v1/schema/.gitignore
vendored
Normal file
3
pkg/server/api/console/v1/schema/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!.gitignore
|
||||
!doc.go
|
||||
17
pkg/server/api/console/v1/schema/doc.go
Normal file
17
pkg/server/api/console/v1/schema/doc.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
// Package schema contains the generated GraphQL executable schema for the
|
||||
// Console API.
|
||||
package schema
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,6 @@ import (
|
||||
"go.probo.inc/probo/pkg/server/api/console/v1/types"
|
||||
"go.probo.inc/probo/pkg/server/gqlutils"
|
||||
"go.probo.inc/probo/pkg/server/gqlutils/types/cursor"
|
||||
"go.probo.inc/probo/pkg/validator"
|
||||
)
|
||||
|
||||
// StateOfApplicability is the resolver for the stateOfApplicability field.
|
||||
@@ -2073,18 +2072,8 @@ func (r *mutationResolver) CreateMailingListUpdate(ctx context.Context, input ty
|
||||
return nil, err
|
||||
}
|
||||
|
||||
mlu, err := r.mailman.CreateMailingListUpdate(
|
||||
ctx,
|
||||
&mailman.CreateMailingListUpdateRequest{
|
||||
MailingListID: input.MailingListID,
|
||||
Title: input.Title,
|
||||
Body: input.Body,
|
||||
},
|
||||
)
|
||||
mlu, err := r.mailman.CreateMailingListUpdate(ctx, input.MailingListID, input.Title, input.Body)
|
||||
if err != nil {
|
||||
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
|
||||
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
|
||||
}
|
||||
r.logger.ErrorCtx(ctx, "cannot create mailing list update", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
@@ -2100,18 +2089,8 @@ func (r *mutationResolver) UpdateMailingListUpdate(ctx context.Context, input ty
|
||||
return nil, err
|
||||
}
|
||||
|
||||
mlu, err := r.mailman.UpdateMailingListUpdate(
|
||||
ctx,
|
||||
&mailman.UpdateMailingListUpdateRequest{
|
||||
ID: input.ID,
|
||||
Title: input.Title,
|
||||
Body: input.Body,
|
||||
},
|
||||
)
|
||||
mlu, err := r.mailman.UpdateMailingListUpdate(ctx, input.ID, input.Title, input.Body)
|
||||
if err != nil {
|
||||
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
|
||||
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
|
||||
}
|
||||
if errors.Is(err, mailman.ErrMailingListUpdateAlreadySent) {
|
||||
return nil, gqlutils.Conflictf(ctx, "mailing list update can only be edited when in draft")
|
||||
}
|
||||
@@ -2194,16 +2173,11 @@ func (r *mutationResolver) CreateMailingListSubscriber(ctx context.Context, inpu
|
||||
|
||||
subscriber, err := r.mailman.CreateSubscriber(
|
||||
ctx,
|
||||
&mailman.CreateSubscriberRequest{
|
||||
MailingListID: input.MailingListID,
|
||||
Email: input.Email,
|
||||
FullName: input.FullName,
|
||||
},
|
||||
input.MailingListID,
|
||||
input.Email,
|
||||
input.FullName,
|
||||
)
|
||||
if err != nil {
|
||||
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
|
||||
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
|
||||
}
|
||||
if errors.Is(err, mailman.ErrSubscriberAlreadyExist) {
|
||||
return nil, gqlutils.Conflictf(ctx, "subscriber already exists in this mailing list")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user