Subscription-based GraphQL Reflex server implementation
Reflex Server is an out-of-the-box HTTP/WebSocket server implementation that exposes the Reflex reactive programming language ecosystem via a GraphQL API.
Build the reflex-server
executable via cargo
:
cargo build --release --workspace --package reflex-server --bin reflex-server
Once the reflex-server
executable has compiled successfully, launch it with a graph definition entry-point script to expose an HTTP/WebSocket GraphQL server on the specified port:
$ reflex-server --port 8080 \
--schema ./reflex-server/examples/timestamp/schema.graphql \
./reflex-server/examples/timestamp/graph.js
You can then access the GraphQL playground at http://localhost:8080/. The GraphQL playground will provide type completion based on the provided --schema
path.
Try running a query such as the following:
query {
now
}
Streaming subscriptions are also supported:
subscription {
now
}
For some examples of graph definitions, see the examples
directory within this package.
For more information on the various reflex-server
CLI options, run the reflex-server --help
command.
This software is distributed under the Apache 2.0 license. See the full LICENSE
text for details.