UNPKG

@betaflight/api-server

Version:

A GraphQL server to retreive data from betaflight flight controllers

26 lines (25 loc) 813 B
import { ApolloServer } from "apollo-server-express"; import express from "express"; import { GraphQLSchema } from "graphql"; import { context } from "@betaflight/api-graph"; declare type ListenOptions = { hostname?: string; port?: number; }; declare type ServerOptions = { mocked?: boolean; playground?: boolean; persistedQueries?: Record<string, string>; artifactsDirectory?: string; legacyWsProtocol?: boolean; }; declare type Server = { schema: GraphQLSchema; context: ReturnType<typeof context>; apolloServer: ApolloServer; startMockTicks: () => void; rest: express.Express; listen: (options: ListenOptions) => Promise<number>; }; export declare const createServer: ({ mocked, persistedQueries, artifactsDirectory, }?: ServerOptions) => Server; export {};