[package]
name = "grpc_graphql_gateway"
version = "0.2.7"
edition = "2021"
authors = ["Protocol Lattice"]
description = "A Rust implementation of gRPC-GraphQL gateway - generates GraphQL execution code from gRPC services"
license = "MIT"
repository = "https://github.com/Protocol-Lattice/grpc_graphql_gateway"
keywords = ["grpc", "graphql", "gateway", "protobuf", "api"]
categories = ["network-programming", "api-bindings", "web-programming"]
default-run = "greeter"

[dependencies]
# GraphQL
async-graphql = { version = "7.0", features = ["dynamic-schema", "dataloader", "boxed-trait"] }
async-graphql-axum = "7.0"

# gRPC
tonic = { version = "0.12", features = ["tls"] }
prost = "0.13"
base64 = "0.22"

# Async
async-trait = "0.1"


# Web framework
axum = { version = "0.8", features = ["ws"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "trace", "compression-full"] }

# Async runtime
tokio = { version = "1.0", features = ["full"] }
tokio-stream = "0.1"
futures = "0.3"

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
prost-types = "0.13"

# Error handling
anyhow = "1.0"
thiserror = "1.0"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# WebSocket support
tokio-tungstenite = "0.21"

# HTTP
http = "1.0"
hyper = { version = "1.0", features = ["full"] }

# Reflection
prost-reflect = "0.15"

# Rate Limiting
governor = "0.6"
nonzero_ext = "0.3"

# Metrics & Observability
prometheus = "0.13"
once_cell = "1.19"

# OpenTelemetry / Distributed Tracing
opentelemetry = "0.21"
opentelemetry_sdk = { version = "0.21", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.14", optional = true }
tracing-opentelemetry = "0.22"

# Automatic Persisted Queries (APQ)
sha2 = "0.10"
hex = "0.4"

[features]
default = []
otlp = ["opentelemetry-otlp"]

[build-dependencies]
tonic-build = "0.12"

[dev-dependencies]
tokio-test = "0.4"


[lib]
name = "grpc_graphql_gateway"
path = "src/lib.rs"
doctest = false

[[example]]
name = "greeter"
path = "examples/greeter/main.rs"

[[example]]
name = "federation"
path = "examples/federation/main.rs"

[[example]]
name = "graphql"
path = "examples/graphql/main.rs"


[[bin]]
name = "greeter"
path = "examples/greeter/main.rs"

[[bin]]
name = "federation"
path = "examples/federation/main.rs"

[[bin]]
name = "protoc-gen-graphql-template"
path = "src/bin/protoc-gen-graphql-template.rs"
