From b807b8e2d74932a52b3277c405322085eaae5eb0 Mon Sep 17 00:00:00 2001 From: John Huang Date: Mon, 8 Apr 2024 09:52:58 -0700 Subject: [PATCH] update schema --- .../backend/auth/aray6131feb9/cli-inputs.json | 2 +- amplify/backend/backend-config.json | 8 --- .../amplify-dependent-resources-ref.d.ts | 2 +- src/graphql/mutations.js | 57 +++++++++++++++ src/graphql/queries.js | 72 +++++++++++++++++++ src/graphql/subscriptions.js | 48 +++++++++++++ 6 files changed, 179 insertions(+), 10 deletions(-) diff --git a/amplify/backend/auth/aray6131feb9/cli-inputs.json b/amplify/backend/auth/aray6131feb9/cli-inputs.json index d8dcfe7..c55c853 100644 --- a/amplify/backend/auth/aray6131feb9/cli-inputs.json +++ b/amplify/backend/auth/aray6131feb9/cli-inputs.json @@ -86,4 +86,4 @@ "Ref": "AWS::StackId" } } -} \ No newline at end of file +} \ No newline at end of file diff --git a/amplify/backend/backend-config.json b/amplify/backend/backend-config.json index 01764f6..2806917 100644 --- a/amplify/backend/backend-config.json +++ b/amplify/backend/backend-config.json @@ -159,14 +159,6 @@ } ] }, - "AMPLIFY_function_aray6131feb9PostConfirmation_GROUP": { - "usedBy": [ - { - "category": "function", - "resourceName": "aray6131feb9PostConfirmation" - } - ] - }, "AMPLIFY_function_aray6131feb9PostConfirmation_deploymentBucketName": { "usedBy": [ { diff --git a/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/amplify/backend/types/amplify-dependent-resources-ref.d.ts index 43777a5..71edc4e 100644 --- a/amplify/backend/types/amplify-dependent-resources-ref.d.ts +++ b/amplify/backend/types/amplify-dependent-resources-ref.d.ts @@ -59,4 +59,4 @@ export type AmplifyDependentResourcesAttributes = { "Region": "string" } } -} +} \ No newline at end of file diff --git a/src/graphql/mutations.js b/src/graphql/mutations.js index 6c4c7f8..2d6bf58 100644 --- a/src/graphql/mutations.js +++ b/src/graphql/mutations.js @@ -288,6 +288,63 @@ export const deleteEventAttendance = /* GraphQL */ ` } } `; +export const createEventProject = /* GraphQL */ ` + mutation CreateEventProject( + $input: CreateEventProjectInput! + $condition: ModelEventProjectConditionInput + ) { + createEventProject(input: $input, condition: $condition) { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + } +`; +export const updateEventProject = /* GraphQL */ ` + mutation UpdateEventProject( + $input: UpdateEventProjectInput! + $condition: ModelEventProjectConditionInput + ) { + updateEventProject(input: $input, condition: $condition) { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + } +`; +export const deleteEventProject = /* GraphQL */ ` + mutation DeleteEventProject( + $input: DeleteEventProjectInput! + $condition: ModelEventProjectConditionInput + ) { + deleteEventProject(input: $input, condition: $condition) { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + } +`; export const createGovernmentAgency = /* GraphQL */ ` mutation CreateGovernmentAgency( $input: CreateGovernmentAgencyInput! diff --git a/src/graphql/queries.js b/src/graphql/queries.js index 752b4bd..36103dd 100644 --- a/src/graphql/queries.js +++ b/src/graphql/queries.js @@ -356,6 +356,78 @@ export const getEventAttendancesByUsernameByCreatedAt = /* GraphQL */ ` } } `; +export const getEventProject = /* GraphQL */ ` + query GetEventProject($id: ID!) { + getEventProject(id: $id) { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + } +`; +export const listEventProjects = /* GraphQL */ ` + query ListEventProjects( + $filter: ModelEventProjectFilterInput + $limit: Int + $nextToken: String + ) { + listEventProjects(filter: $filter, limit: $limit, nextToken: $nextToken) { + items { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + nextToken + } + } +`; +export const getEventProjectsByEventIdByStatus = /* GraphQL */ ` + query GetEventProjectsByEventIdByStatus( + $eventId: ID + $status: ModelStringKeyConditionInput + $sortDirection: ModelSortDirection + $filter: ModelEventProjectFilterInput + $limit: Int + $nextToken: String + ) { + getEventProjectsByEventIdByStatus( + eventId: $eventId + status: $status + sortDirection: $sortDirection + filter: $filter + limit: $limit + nextToken: $nextToken + ) { + items { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + nextToken + } + } +`; export const getGovernmentAgency = /* GraphQL */ ` query GetGovernmentAgency($id: ID!) { getGovernmentAgency(id: $id) { diff --git a/src/graphql/subscriptions.js b/src/graphql/subscriptions.js index 67303c8..99a15a7 100644 --- a/src/graphql/subscriptions.js +++ b/src/graphql/subscriptions.js @@ -220,6 +220,54 @@ export const onDeleteEventAttendance = /* GraphQL */ ` } } `; +export const onCreateEventProject = /* GraphQL */ ` + subscription OnCreateEventProject { + onCreateEventProject { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + } +`; +export const onUpdateEventProject = /* GraphQL */ ` + subscription OnUpdateEventProject { + onUpdateEventProject { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + } +`; +export const onDeleteEventProject = /* GraphQL */ ` + subscription OnDeleteEventProject { + onDeleteEventProject { + id + eventId + projectId + status + title + description + createdAt + createdBy + updatedAt + updatedBy + } + } +`; export const onCreateGovernmentAgency = /* GraphQL */ ` subscription OnCreateGovernmentAgency { onCreateGovernmentAgency {