Skip to content

Commit

Permalink
[EASI-4080] Convert Collaborators folder and NDA Queries (#1002)
Browse files Browse the repository at this point in the history
* removed old GetIsCollaborator and its types

* add new GetIsCollaborator and updated modelaccesswrapper

* Convert GetModelCollaborators

* convert GetModelPlanCollaborator

* Convert CreateModelPlanCollaborator

* Convert CreateModelPlanCollaborator and DeleteModelPlanCollaborator

* Convert UpdateNDA

---------

Co-authored-by: Clay Benson <[email protected]>
  • Loading branch information
garyjzhao and ClayBenson94 authored Mar 20, 2024
1 parent d5daed6 commit 9e07d33
Show file tree
Hide file tree
Showing 27 changed files with 422 additions and 119 deletions.
6 changes: 3 additions & 3 deletions src/data/mock/readonly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
GetAllParticipantsAndProvidersQuery,
GetAllPaymentsDocument,
GetAllPaymentsQuery,
GetModelCollaboratorsDocument,
KeyCharacteristic,
ModelCategory,
ModelLearningSystemType,
Expand Down Expand Up @@ -66,9 +67,8 @@ import {
YesNoOtherType,
YesNoType
} from 'gql/gen/graphql';
import { GetModelCollaborators_modelPlan_collaborators as GetModelCollaboratorsType } from 'gql/gen/types/GetModelCollaborators';

import GetModelPlanCollaborators from 'queries/Collaborators/GetModelCollaborators';
import { GetModelCollaborators_modelPlan_collaborators as GetModelCollaboratorsType } from 'queries/Collaborators/types/GetModelCollaborators';
import GetOperationalNeeds from 'queries/ITSolutions/GetOperationalNeeds';
import { GetOperationalNeeds as GetOperationalNeedsType } from 'queries/ITSolutions/types/GetOperationalNeeds';
import GetModelSummary from 'queries/ReadOnly/GetModelSummary';
Expand Down Expand Up @@ -753,7 +753,7 @@ const collaboratorsData: GetModelCollaboratorsType[] = [
export const collaboratorsMocks = [
{
request: {
query: GetModelPlanCollaborators,
query: GetModelCollaboratorsDocument,
variables: { id: modelID }
},
result: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql } from '@apollo/client';

export default gql`
export default gql(/* GraphQL */ `
mutation CreateModelPlanCollaborator($input: PlanCollaboratorCreateInput!) {
createPlanCollaborator(input: $input) {
teamRoles
Expand All @@ -13,4 +13,4 @@ export default gql`
modelPlanID
}
}
`;
`);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql } from '@apollo/client';

export default gql`
export default gql(/* GraphQL */ `
mutation DeleteModelPlanCollaborator($id: UUID!) {
deletePlanCollaborator(id: $id) {
id
Expand All @@ -15,4 +15,4 @@ export default gql`
modelPlanID
}
}
`;
`);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { gql } from '@apollo/client';

export default gql`
query GetModelCollaborator($id: UUID!) {
export default gql(/* GraphQL */ `
query GetIndividualModelPlanCollaborator($id: UUID!) {
planCollaboratorByID(id: $id) {
id
userAccount {
Expand All @@ -14,4 +14,4 @@ export default gql`
teamRoles
}
}
`;
`);
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { gql } from '@apollo/client';

export default gql`
export default gql(/* GraphQL */ `
query GetIsCollaborator($id: UUID!) {
modelPlan(id: $id) {
id
isCollaborator
}
}
`;
`);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql } from '@apollo/client';

export default gql`
export default gql(/* GraphQL */ `
query GetModelCollaborators($id: UUID!) {
modelPlan(id: $id) {
id
Expand All @@ -20,4 +20,4 @@ export default gql`
}
}
}
`;
`);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql } from '@apollo/client';

export default gql`
export default gql(/* GraphQL */ `
mutation UpdateModelPlanCollaborator($id: UUID!, $newRole: [TeamRole!]!) {
updatePlanCollaborator(id: $id, newRoles: $newRole) {
teamRoles
Expand All @@ -13,4 +13,4 @@ export default gql`
modelPlanID
}
}
`;
`);
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { gql } from '@apollo/client';

export default gql`
export default gql(/* GraphQL */ `
mutation UpdateNDA {
agreeToNDA(agree: true) {
agreed
agreedDts
}
}
`;
`);
Loading

0 comments on commit 9e07d33

Please sign in to comment.