Fix invite user dialog create people + connection prepend edge
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -608,7 +608,6 @@ input InviteMemberInput {
|
||||
email: EmailAddr!
|
||||
fullName: String!
|
||||
role: MembershipRole!
|
||||
createPeople: Boolean!
|
||||
}
|
||||
|
||||
input UpdateMembershipInput {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user