63 lines
872 B
GraphQL
63 lines
872 B
GraphQL
query listHubs @auth(level: USER) {
|
|
hubs {
|
|
id
|
|
name
|
|
locationName
|
|
address
|
|
nfcTagId
|
|
ownerId
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|
|
|
|
query getHubById($id: UUID!) @auth(level: USER) {
|
|
hub(id: $id) {
|
|
id
|
|
name
|
|
locationName
|
|
address
|
|
nfcTagId
|
|
ownerId
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|
|
|
|
query getHubsByOwnerId($ownerId: UUID!) @auth(level: USER) {
|
|
hubs(where: { ownerId: { eq: $ownerId } }) {
|
|
id
|
|
name
|
|
locationName
|
|
address
|
|
nfcTagId
|
|
ownerId
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|
|
|
|
query filterHubs(
|
|
$ownerId: UUID
|
|
$name: String
|
|
$nfcTagId: String
|
|
) @auth(level: USER) {
|
|
hubs(
|
|
where: {
|
|
ownerId: { eq: $ownerId }
|
|
name: { eq: $name }
|
|
nfcTagId: { eq: $nfcTagId }
|
|
}
|
|
) {
|
|
id
|
|
name
|
|
locationName
|
|
address
|
|
nfcTagId
|
|
ownerId
|
|
}
|
|
}
|