Fix invite user dialog create people + connection prepend edge

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2026-01-02 15:50:19 +01:00
committed by Bryan Frimin
parent b09a49b7f9
commit 26371857e9
11 changed files with 33 additions and 76 deletions

View File

@@ -608,7 +608,6 @@ input InviteMemberInput {
email: EmailAddr!
fullName: String!
role: MembershipRole!
createPeople: Boolean!
}
input UpdateMembershipInput {

View File

@@ -2615,7 +2615,6 @@ input InviteMemberInput {
email: EmailAddr!
fullName: String!
role: MembershipRole!
createPeople: Boolean!
}
input UpdateMembershipInput {
@@ -12795,7 +12794,7 @@ func (ec *executionContext) unmarshalInputInviteMemberInput(ctx context.Context,
asMap[k] = v
}
fieldsInOrder := [...]string{"organizationId", "email", "fullName", "role", "createPeople"}
fieldsInOrder := [...]string{"organizationId", "email", "fullName", "role"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -12830,13 +12829,6 @@ func (ec *executionContext) unmarshalInputInviteMemberInput(ctx context.Context,
return it, err
}
it.Role = data
case "createPeople":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createPeople"))
data, err := ec.unmarshalNBoolean2bool(ctx, v)
if err != nil {
return it, err
}
it.CreatePeople = data
}
}

View File

@@ -190,7 +190,6 @@ type InviteMemberInput struct {
Email mail.Addr `json:"email"`
FullName string `json:"fullName"`
Role coredata.MembershipRole `json:"role"`
CreatePeople bool `json:"createPeople"`
}
type InviteMemberPayload struct {

View File

@@ -884,9 +884,11 @@ func (r *mutationResolver) InviteMember(ctx context.Context, input types.InviteM
invitation, err := r.iam.OrganizationService.InviteMember(
ctx,
input.OrganizationID,
input.Email,
input.FullName,
coredata.MembershipRoleViewer,
&iam.CreateInvitationRequest{
Email: input.Email,
FullName: input.FullName,
Role: input.Role,
},
)
if err != nil {
var errOrganizationNotFound *iam.ErrOrganizationNotFound