Crates.io | hive-apollo-router-plugin |
lib.rs | hive-apollo-router-plugin |
version | |
source | src |
created_at | 2024-11-13 10:41:44.906258 |
updated_at | 2024-11-29 12:50:02.48041 |
description | Apollo-Router Plugin for Hive |
homepage | |
repository | https://github.com/graphql-hive/console/ |
max_upload_size | |
id | 1446358 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Hive is a fully open-source schema registry, analytics, metrics and gateway for GraphQL federation and other GraphQL APIs.
This project includes a Hive integration plugin for Apollo-Router.
At the moment, the following are implemented:
This project is constructed as a Rust project that implements Apollo-Router plugin interface.
This build of this project creates an artifact identical to Apollo-Router releases, with additional features provided by Hive.
We provide a custom build of Apollo-Router that acts as a drop-in replacement, and adds Hive integration to Apollo-Router.
Please follow this guide and documentation for integrating Hive with Apollo Router
If you are building a custom Apollo-Router with your own native plugins, you can use the Hive plugin as a dependency from Crates.io:
[dependencies]
hive-apollo-router-plugin = "..."
And then in your codebase, make sure to import and register the Hive plugin:
// import the registry instance and the plugin registration function
use hive_apollo_router_plugin::registry::HiveRegistry;
use hive_apollo_router_plugin::usage::register;
// In your main function, make sure to register the plugin before you create or initialize Apollo-Router
fn main() {
// Register the Hive usage_reporting plugin
register();
// Initialize the Hive Registry instance and start the Apollo Router
match HiveRegistry::new(None).and(apollo_router::main()) {
Ok(_) => {}
Err(e) => {
eprintln!("{}", e);
std::process::exit(1);
}
}
}
cargo check
./router.yaml
), use
cargo run -- --config router.yaml
. Make sure to set environment variables required for your
setup and development process
(docs).cargo run -- --config router.yaml --log debug --dev --supergraph some.supergraph.graphql
for
running it with a test supergraph file.