fix: Patch UI queries to use camelCase Hasura relations

- Patch GraphQL queries in source code (charging.stations.ts, locations.ts, transactions.ts)
- Rebuild Docker image with patched source
- Fix missing Transactions.authorization relationship in Hasura
- All 3 critical queries now work: GetChargingStations, LocationsList, TransactionList
- UI rebuilt from scratch with Node.js 24.16.0
This commit is contained in:
Eric F
2026-06-15 21:14:29 -04:00
parent a3a066034d
commit 2e1a8a768d
3 changed files with 45 additions and 45 deletions

View File

@@ -25,7 +25,7 @@ export const CHARGING_STATIONS_LIST_QUERY = gql`
floorLevel
parkingRestrictions
capabilities
location: Location {
location: location {
id
name
address
@@ -37,20 +37,20 @@ export const CHARGING_STATIONS_LIST_QUERY = gql`
createdAt
updatedAt
}
evses: Evses {
evses: evses {
id
evseTypeId
evseId
physicalReference
}
LatestStatusNotifications {
latestStatusNotifications {
id
stationId
ocppConnectionName
statusNotificationId
updatedAt
createdAt
StatusNotification {
statusNotification {
connectorId
connectorStatus
createdAt
@@ -62,7 +62,7 @@ export const CHARGING_STATIONS_LIST_QUERY = gql`
updatedAt
}
}
transactions: Transactions(where: { isActive: { _eq: true } }) {
transactions: transactions(where: { isActive: { _eq: true } }) {
id
timeSpentCharging
isActive
@@ -77,7 +77,7 @@ export const CHARGING_STATIONS_LIST_QUERY = gql`
createdAt
updatedAt
}
connectors: Connectors {
connectors: connectors {
connectorId
status
errorCode
@@ -126,7 +126,7 @@ export const FAULTED_CHARGING_STATIONS_LIST_QUERY = gql`
locationId
createdAt
updatedAt
location: Location {
location: location {
id
name
address
@@ -138,13 +138,13 @@ export const FAULTED_CHARGING_STATIONS_LIST_QUERY = gql`
createdAt
updatedAt
}
LatestStatusNotifications {
latestStatusNotifications {
id
ocppConnectionName
statusNotificationId
updatedAt
createdAt
StatusNotification {
statusNotification {
connectorId
connectorStatus
createdAt
@@ -211,7 +211,7 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
capabilities
coordinates
use16StatusNotification0
location: Location {
location: location {
id
name
address
@@ -223,7 +223,7 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
createdAt
updatedAt
}
evses: Evses {
evses: evses {
id
ocppConnectionName
stationId
@@ -233,7 +233,7 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
removed
createdAt
updatedAt
connectors: Connectors {
connectors: connectors {
id
ocppConnectionName
evseId
@@ -257,14 +257,14 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
updatedAt
}
}
LatestStatusNotifications {
latestStatusNotifications {
id
ocppConnectionName
stationId
statusNotificationId
updatedAt
createdAt
StatusNotification {
statusNotification {
connectorId
connectorStatus
createdAt
@@ -276,7 +276,7 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
updatedAt
}
}
transactions: Transactions(where: { isActive: { _eq: true } }) {
transactions: transactions(where: { isActive: { _eq: true } }) {
id
stationId
ocppConnectionName
@@ -292,7 +292,7 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
createdAt
updatedAt
}
connectors: Connectors {
connectors: connectors {
id
ocppConnectionName
stationId
@@ -320,7 +320,7 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
`;
export const GET_CHARGING_STATIONS_WITH_LOCATION_AND_LATEST_STATUS_NOTIFICATIONS_AND_TRANSACTIONS = gql`
query GetChargingStationsWithLocationAndLatestStatusNotificationsAndTransactions {
query GetChargingStationsWithLocationAndLatestStatusNotificationsAndtransactions {
ChargingStations {
id
ocppConnectionName
@@ -329,8 +329,8 @@ export const GET_CHARGING_STATIONS_WITH_LOCATION_AND_LATEST_STATUS_NOTIFICATIONS
locationId
createdAt
updatedAt
latestStatusNotifications: LatestStatusNotifications {
statusNotification: StatusNotification {
latestStatusNotifications: latestStatusNotifications {
statusNotification: statusNotification {
id
ocppConnectionName
evseId
@@ -341,7 +341,7 @@ export const GET_CHARGING_STATIONS_WITH_LOCATION_AND_LATEST_STATUS_NOTIFICATIONS
updatedAt
}
}
transactions: Transactions(where: { isActive: { _eq: true } }) {
transactions: transactions(where: { isActive: { _eq: true } }) {
id
timeSpentCharging
isActive
@@ -355,7 +355,7 @@ export const GET_CHARGING_STATIONS_WITH_LOCATION_AND_LATEST_STATUS_NOTIFICATIONS
createdAt
updatedAt
}
location: Location {
location: location {
id
name
address
@@ -367,7 +367,7 @@ export const GET_CHARGING_STATIONS_WITH_LOCATION_AND_LATEST_STATUS_NOTIFICATIONS
createdAt
updatedAt
}
evses: Evses {
evses: evses {
id
evseTypeId
createdAt

View File

@@ -32,20 +32,20 @@ export const LOCATIONS_LIST_QUERY = gql`
protocol
createdAt
updatedAt
evses: Evses {
evses: evses {
id
evseTypeId
evseId
createdAt
updatedAt
}
LatestStatusNotifications {
latestStatusNotifications {
id
ocppConnectionName
statusNotificationId
updatedAt
createdAt
StatusNotification {
statusNotification {
connectorId
connectorStatus
createdAt
@@ -56,7 +56,7 @@ export const LOCATIONS_LIST_QUERY = gql`
updatedAt
}
}
transactions: Transactions(where: { isActive: { _eq: true } }) {
transactions: transactions(where: { isActive: { _eq: true } }) {
id
timeSpentCharging
isActive
@@ -70,7 +70,7 @@ export const LOCATIONS_LIST_QUERY = gql`
createdAt
updatedAt
}
connectors: Connectors {
connectors: connectors {
connectorId
status
errorCode
@@ -123,13 +123,13 @@ export const LOCATIONS_GET_QUERY = gql`
createdAt
updatedAt
}
LatestStatusNotifications {
latestStatusNotifications {
id
ocppConnectionName
statusNotificationId
updatedAt
createdAt
StatusNotification {
statusNotification {
connectorId
connectorStatus
createdAt
@@ -140,7 +140,7 @@ export const LOCATIONS_GET_QUERY = gql`
updatedAt
}
}
Transactions(where: { isActive: { _eq: true } }) {
transactions(where: { isActive: { _eq: true } }) {
id
timeSpentCharging
isActive

View File

@@ -26,7 +26,7 @@ export const TRANSACTION_LIST_QUERY = gql`
endTime
createdAt
updatedAt
location: Location {
location: location {
id
name
address
@@ -38,19 +38,19 @@ export const TRANSACTION_LIST_QUERY = gql`
createdAt
updatedAt
}
evse: Evse {
evse: evse {
id
createdAt
updatedAt
}
connector: Connector {
connector: connector {
id
connectorId
type
createdAt
updatedAt
}
authorization: Authorization {
authorization: authorization {
id
idToken
idTokenType
@@ -66,7 +66,7 @@ export const TRANSACTION_LIST_QUERY = gql`
createdAt
updatedAt
}
chargingStation: ChargingStation {
chargingStation: chargingStation {
id
ocppConnectionName
isOnline
@@ -74,7 +74,7 @@ export const TRANSACTION_LIST_QUERY = gql`
locationId
createdAt
updatedAt
location: Location {
location: location {
id
name
address
@@ -124,7 +124,7 @@ export const GET_TRANSACTIONS_FOR_AUTHORIZATION = gql`
endTime
createdAt
updatedAt
chargingStation: ChargingStation {
chargingStation: chargingStation {
id
ocppConnectionName
isOnline
@@ -132,7 +132,7 @@ export const GET_TRANSACTIONS_FOR_AUTHORIZATION = gql`
locationId
createdAt
updatedAt
location: Location {
location: location {
id
name
address
@@ -199,17 +199,17 @@ export const GET_TRANSACTION_LIST_FOR_STATION = gql`
StartTransaction {
idTokenDatabaseId
}
authorization: Authorization {
authorization: authorization {
id
idToken
}
chargingStation: ChargingStation {
chargingStation: chargingStation {
id
isOnline
locationId
createdAt
updatedAt
location: Location {
location: location {
id
name
address
@@ -267,7 +267,7 @@ export const TRANSACTION_GET_QUERY = gql`
endTime
createdAt
updatedAt
location: Location {
location: location {
name
address
city
@@ -278,14 +278,14 @@ export const TRANSACTION_GET_QUERY = gql`
createdAt
updatedAt
}
evse: Evse {
evse: evse {
id
evseTypeId
evseId
createdAt
updatedAt
}
connector: Connector {
connector: connector {
id
connectorId
type
@@ -297,7 +297,7 @@ export const TRANSACTION_GET_QUERY = gql`
pricePerKwh
}
}
authorization: Authorization {
authorization: authorization {
id
idToken
idTokenType