changed the gets/query - Jesse
@@ -29,28 +29,25 @@ GraphQL gives callers more control over how they fetch data. Where REST exposes
For example, say a mission application needs to quickly get the current status of a single power port on a module to check if a payload is powered. For a ReST endpoint, a separate GET would be required to be available with just that single telemetry item. Now say there are 15 different power ports, and those assignments can change depending on the payload configuration.
```
-GET api.kubos.com/m/1/s/1/power/1
+GET localhost:9001/battery/powerport/1
```
For each port, the endpoint would have to change to accommodate the individual request, adding a new request for any subset of telemetry they want retrieved. If a combination of 2 or more is required, it would have to be done in separate transactions.
```
-GET api.kubos.com/m/1/s/1/power/1
-GET api.kubos.com/m/1/s/1/power/2
-GET api.kubos.com/m/1/s/1/power/3
+GET localhost:9001/battery/powerport/1
+GET localhost:9001/battery/powerport/2
+GET localhost:9001/battery/powerport/3
...
-GET api.kubos.com/m/1/s/1/power/15
+GET localhost:9001/battery/powerport/15
```
With GraphQL, it's a single query. The mission application is simplified and the endpoint doesn't have to add queries to accommodate each change in configuration.
```
query {
- missions(id: "1") {
- satellites(id: "1") {
- power {
- ...powerFields
- }
+ battery {
+ ...powerports
}
}
}
