new queries y mutuations for hub
This commit is contained in:
@@ -1,18 +1,30 @@
|
||||
query listTeamHubs @auth(level: USER) {
|
||||
teamHubs {
|
||||
|
||||
# ==========================================================
|
||||
# TEAM HUB - QUERIES (USE where, NOT filter)
|
||||
# Include ALL fields in TeamHub
|
||||
# ==========================================================
|
||||
|
||||
query listTeamHubs($offset: Int, $limit: Int) @auth(level: USER) {
|
||||
teamHubs(offset: $offset, limit: $limit, orderBy: { createdAt: DESC }) {
|
||||
id
|
||||
teamId
|
||||
hubName
|
||||
|
||||
address
|
||||
placeId
|
||||
latitude
|
||||
longitude
|
||||
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
zipCode
|
||||
|
||||
managerName
|
||||
isActive
|
||||
departments
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,34 +33,55 @@ query getTeamHubById($id: UUID!) @auth(level: USER) {
|
||||
id
|
||||
teamId
|
||||
hubName
|
||||
|
||||
address
|
||||
placeId
|
||||
latitude
|
||||
longitude
|
||||
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
zipCode
|
||||
|
||||
managerName
|
||||
isActive
|
||||
departments
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
query getTeamHubsByTeamId($teamId: UUID!) @auth(level: USER) {
|
||||
teamHubs(where: { teamId: { eq: $teamId } }) {
|
||||
query getTeamHubsByTeamId(
|
||||
$teamId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
teamHubs(
|
||||
where: { teamId: { eq: $teamId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { createdAt: DESC }
|
||||
) {
|
||||
id
|
||||
teamId
|
||||
hubName
|
||||
|
||||
address
|
||||
placeId
|
||||
latitude
|
||||
longitude
|
||||
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
zipCode
|
||||
|
||||
managerName
|
||||
isActive
|
||||
departments
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +90,8 @@ query getTeamHubsByTeamId($teamId: UUID!) @auth(level: USER) {
|
||||
# ------------------------------------------------------------
|
||||
query listTeamHubsByOwnerId(
|
||||
$ownerId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
teamHubs(
|
||||
where: {
|
||||
@@ -64,17 +99,28 @@ query listTeamHubsByOwnerId(
|
||||
ownerId: { eq: $ownerId }
|
||||
}
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { createdAt: DESC }
|
||||
) {
|
||||
id
|
||||
teamId
|
||||
hubName
|
||||
|
||||
address
|
||||
placeId
|
||||
latitude
|
||||
longitude
|
||||
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
zipCode
|
||||
|
||||
managerName
|
||||
isActive
|
||||
departments
|
||||
createdAt
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user