You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yarn dynamo:install // installs a local dynamo for use with the offline plugin
yarn start // starts up the offline server with all 4 lambdas
navigate to http://localhost:4001/dev/gw to start playing with the api
Relationships
Model
classDiagram
direction LR
Car "1" --> "*" Charger
Driver "*" -- "*" Car
Charger "*" <-- "1" Driver
Loading
One to Many
Charger 1 - * Car
classDiagram
direction LR
Car "1" --> "*" Charger
Loading
sequenceDiagram
Car.Req-->>+Car: Car Req
Car->>+CarTable: Get Car
CarTable-->>-Car: Car
Car->>+Charger.Car: Chargers by Car Id
Charger.Car->>+ChargerTable: Chargers by Car Id
ChargerTable-->>-Charger.Car: chargers
Charger.Car-->>-Car: Chargers
Car-->>-Car.Req: Car With Chargers
Loading
Logging
- ------------------------- CAR REQ {
"query": "query ONE_TO_MANY_CAR_CHARGERS__cars__0($ids:[ID]){cars(ids:$ids){__typename id name registrationNumber}}",
"variables": {
"ids": [
"1"
]
},
"operationName": "ONE_TO_MANY_CAR_CHARGERS__cars__0"
}
2 ----------------------- CHARGER -> CAR - CHARGERS 1
Many to One
Car * - 1 Charger
classDiagram
direction LR
Charger "*" --> "1" Car
Loading
sequenceDiagram
Charger.Req->>+Charger: Charger Request
Charger->>+ChargerTable: Get Charger
ChargerTable-->>-Charger: Charger with Car id
Charger-->>Charger: Car Ref ( type/id )
Charger->>+Car._resolveRefernce: Car Req
Car._resolveRefernce-->>-Charger: Resolved Car
Charger-->>-Charger.Req: Chargers with Car
####### Resolve Car { __typename: 'Car', id: '1' }
Many to Many
Car * - * Driver
classDiagram
direction LR
Car "*" --> "*" Driver
Loading
sequenceDiagram
Car.Req->>+Car: Car Request
Car->>+CarTable: Get Car
CarTable-->>-Car: Car with driver ids
Car-->>Car: Drivers Resolver return Refs ( type/id )
Car->>+Driver._resolveRefernce: Driver Req
Driver._resolveRefernce-->>-Car: Resolved Drivers
Car-->>-Car.Req: Cars with Drivers