From 008be23145bbce12a2e4ff2e1193b97365757675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Salazar?= <73718835+joshrs23@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:45:43 -0500 Subject: [PATCH] new teamHub entity --- dataconnect/connector/teamHub/mutations.gql | 35 ++++++++++++++++++++ dataconnect/connector/teamHub/queries.gql | 36 +++++++++++++++++++++ dataconnect/schema/teamHub.gql | 9 ++++++ 3 files changed, 80 insertions(+) create mode 100644 dataconnect/connector/teamHub/mutations.gql create mode 100644 dataconnect/connector/teamHub/queries.gql create mode 100644 dataconnect/schema/teamHub.gql diff --git a/dataconnect/connector/teamHub/mutations.gql b/dataconnect/connector/teamHub/mutations.gql new file mode 100644 index 00000000..eeee0ce5 --- /dev/null +++ b/dataconnect/connector/teamHub/mutations.gql @@ -0,0 +1,35 @@ +mutation CreateTeamHub( + $teamId: UUID!, + $hubName: String!, + $departments: String +) @auth(level: USER) { + teamHub_insert( + data: { + teamId: $teamId + hubName: $hubName + departments: $departments + } + ) +} + +mutation UpdateTeamHub( + $id: UUID!, + $teamId: UUID, + $hubName: String, + $departments: String +) @auth(level: USER) { + teamHub_update( + id: $id, + data: { + teamId: $teamId + hubName: $hubName + departments: $departments + } + ) +} + +mutation DeleteTeamHub( + $id: UUID! +) @auth(level: USER) { + teamHub_delete(id: $id) +} diff --git a/dataconnect/connector/teamHub/queries.gql b/dataconnect/connector/teamHub/queries.gql new file mode 100644 index 00000000..93564956 --- /dev/null +++ b/dataconnect/connector/teamHub/queries.gql @@ -0,0 +1,36 @@ +query listTeamHub @auth(level: USER) { + teamHubs { + id + teamId + hubName + departments + } +} + +query getTeamHubById( + $id: UUID! +) @auth(level: USER) { + teamHub(id: $id) { + id + teamId + hubName + departments + } +} + +query filterTeamHub( + $teamId: UUID, + $hubName: String +) @auth(level: USER) { + teamHubs( + where: { + teamId: { eq: $teamId } + hubName: { eq: $hubName } + } + ) { + id + teamId + hubName + departments + } +} diff --git a/dataconnect/schema/teamHub.gql b/dataconnect/schema/teamHub.gql new file mode 100644 index 00000000..f299c999 --- /dev/null +++ b/dataconnect/schema/teamHub.gql @@ -0,0 +1,9 @@ +type TeamHub @table(name: "team_hubs") { + id: UUID! @default(expr: "uuidV4()") + teamId: UUID! + hubName: String! + departments: String + createdDate: Timestamp @default(expr: "request.time") + updatedDate: Timestamp @default(expr: "request.time") + createdBy: String @default(expr: "auth.uid") +}