infrahub.rs
rust client for the infrahub graphql api.
features
- ergonomic, typed graphql operations
- branch-aware graphql routing
- schema fetch helper
- pagination helper for connection queries
- good errors
- examples and smoke tests
docs
install
add to Cargo.toml:
[]
= "0.0.1"
= { = "1", = ["full"] }
quick start
use ;
async
usage model
- this crate is the base graphql client
- generate a schema-specific crate with
infrahub-codegenfor ergonomic helpers
generated client
use infrahub-codegen to generate a schema-specific crate. this base crate
stays stable and talks graphql directly; the generated crate adds typed,
topic-grouped helpers for your schema.
generate a schema-specific client with infrahub-codegen:
development
update schema:
INFRAHUB_URL=http://localhost:8000 INFRAHUB_TOKEN=token
generate a schema-specific client: