diff --git a/src/GraphQl/Mutations/mutations.ts b/src/GraphQl/Mutations/mutations.ts index f91d083b3f..3de47eb0f6 100644 --- a/src/GraphQl/Mutations/mutations.ts +++ b/src/GraphQl/Mutations/mutations.ts @@ -148,6 +148,7 @@ export const SIGNUP_MUTATION = gql` $lastName: String! $email: EmailAddress! $password: String! + $orgId: ID! ) { signUp( data: { @@ -155,6 +156,7 @@ export const SIGNUP_MUTATION = gql` lastName: $lastName email: $email password: $password + selectedOrganization: $orgId } ) { user { @@ -348,7 +350,9 @@ export const ADD_ADMIN_MUTATION = gql` export const ADD_MEMBER_MUTATION = gql` mutation CreateMember($orgid: ID!, $userid: ID!) { createMember(input: { organizationId: $orgid, userId: $userid }) { - _id + organization { + _id + } } } `; diff --git a/src/screens/OrganizationPeople/AddMember.tsx b/src/screens/OrganizationPeople/AddMember.tsx index 84821b7468..696436c2bc 100644 --- a/src/screens/OrganizationPeople/AddMember.tsx +++ b/src/screens/OrganizationPeople/AddMember.tsx @@ -195,6 +195,7 @@ function AddMember(): JSX.Element { lastName: createUserVariables.lastName, email: createUserVariables.email, password: createUserVariables.password, + orgId: currentUrl, }, }); const createdUserId = registeredUser?.data.signUp.user._id; diff --git a/src/screens/OrganizationPeople/OrganizationPeople.test.tsx b/src/screens/OrganizationPeople/OrganizationPeople.test.tsx index e458766666..ab69a2c800 100644 --- a/src/screens/OrganizationPeople/OrganizationPeople.test.tsx +++ b/src/screens/OrganizationPeople/OrganizationPeople.test.tsx @@ -456,6 +456,7 @@ const MOCKS: TestMock[] = [ lastName: 'Talreja', email: 'test@gmail.com', password: 'dishatalreja', + orgId: 'orgId', }, }, result: {