Mocked mode simulates a device and USB ports instead of actually
connecting to them. This way, software can be developed without having to
have a flight controller to hand.
GraphQL is a powerful langauge, and this structure would have had to be implemented in the configurator for client
state anyway. Splitting the flight controller graph into it's own API means we both create a segregated architecture
for the configurator and allow other people to use the API for other means.
@betaflight/api-server
A GraphQL server for querying, and mutatating betaflight flight controllers
Try it out!
Usage
Then, you can query the graph at
http://localhost:9000/graphql
Mocked mode
Mocked mode simulates a device and USB ports instead of actually connecting to them. This way, software can be developed without having to have a flight controller to hand.
Ports
Connecting
Listen for connection changes
Querying
For more usage examples, please refer to
@betaflight/configurator
which uses this package to communicate with flight controllersWhy?
GraphQL is a powerful langauge, and this structure would have had to be implemented in the configurator for client state anyway. Splitting the flight controller graph into it's own API means we both create a segregated architecture for the configurator and allow other people to use the API for other means.