Skip to content

Latest commit

 

History

History
54 lines (46 loc) · 1.21 KB

API.md

File metadata and controls

54 lines (46 loc) · 1.21 KB

API Documentation

Overview

This application exposes a GraphQL API for backend operations.
GraphQL provides a flexible query language and a self‑documenting schema.


Access

  • GraphiQL Interface (interactive docs):
    http://localhost:8080/graphiql

    GraphiQL Interface

    GraphQL is self‑documenting via introspection.

  • Schema Files:
    Located in src/main/resources/graphql/

    • schema.graphqls (root schema)
    • Feature‑specific schemas under auth/, domain/, user/, etc.
  • Self‑Documentation:
    The GraphQL schema is introspectable, meaning tools like GraphiQL, Apollo, or Postman can automatically generate documentation.


Example Query

query GetDeviceById($id: UUID!) {
    getDeviceById(id: $id) {
       id
        name
        model
        serialNumber
        manufacturer
        status
        lastSeen
        bms {
          id
          temperature
          soc
          voltage
          soh
          cycles
          batteryChemistry
        }
        meter {
          id
          powerDispatched
          energyConsumed
          energyProduced
        }
      }
    }