
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@betaflight/api-server
Advanced tools
A GraphQL server to retreive data from betaflight flight controllers
@betaflight/api-server
Betaflight in a graph
A GraphQL server for querying, and mutatating betaflight flight controllers
$ yarn add @betaflight/api-server graphql@14
import { createServer } from "@betaflight/api-server";
createServer().listen({ port: 9000 })
Then, you can query the graph at http://localhost:9000/graphql
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.
import { createServer } from "@betaflight/api-server";
// Start in mocked mode
createServer({ mocked: true }).listen({ port: 9000 })
query Ports {
ports
}
mutation Connect($port: String!) {
connect(port: $port, baudRate: 115200) {
id # the connectionId
apiVersion # the api version of the flight controller
}
}
subscription OnChanged($id: ID!) {
onConnectionChanged(connection: $id)
}
query Attitude($connection: ID!) {
connection(connectionId: $connection) {
device {
attitude {
roll
pitch
heading
}
}
bytesRead
bytesWritten
packetErrors
}
}
For more usage examples, please refer to @betaflight/configurator
which uses this package
to communicate with flight controllers
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.
FAQs
A GraphQL server to retreive data from betaflight flight controllers
The npm package @betaflight/api-server receives a total of 3 weekly downloads. As such, @betaflight/api-server popularity was classified as not popular.
We found that @betaflight/api-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.