[package]
name = "grafbase-sdk"
version = "0.22.1"
description = "An SDK to implement extensions for the Grafbase Gateway"
edition = "2024"
license.workspace = true
homepage.workspace = true
keywords.workspace = true
repository.workspace = true

[package.metadata.docs.rs]
all-features = true

[features]
## Test utilities to write integration tests for your extension. The [Grafbase CLI](https://grafbase.com/docs/reference/grafbase-cli)
## will automatically generate an example test with the `grafbase extension init` command. You can also check out Grafbase's [extension](https://github.com/grafbase/extensions/tree/main/extensions) repository for examples
test-utils = [
    "dep:duct",
    "dep:fslock",
    "dep:reqwest",
    "dep:tempfile",
    "dep:toml",
    "dep:which",
    "dep:futures-util",
    "dep:graphql-composition",
    "dep:grafbase-sdk-mock",
    "dep:graphql-ws-client",
    "dep:tokio",
    "dep:async-tungstenite",
    "dep:anyhow",
    "dep:regex",
    "dep:itertools",
    "dep:http-body-util",
    "dep:bytes",
    "dep:cynic-introspection",
]
## Utilities to use `jq`-like selection to process data in your extension like the [rest](https://grafbase.com/extensions/rest) extension.
jq-selection = [
    "dep:jaq-core",
    "dep:jaq-json",
    "dep:jaq-std",
    "dep:hashbrown",
]

[dependencies]
anyhow = { workspace = true, optional = true }
async-tungstenite = { workspace = true, optional = true, features = ["tokio-runtime"] }
bytes = { workspace = true, optional = true }
chrono.workspace = true
cynic-introspection = { workspace = true, optional = true }
document-features = { version = "0.2" }
duct = { workspace = true, optional = true }
env_filter = "0.1.3"
fslock = { workspace = true, optional = true }
futures-util = { workspace = true, optional = true }
fxhash = "0.2"
grafbase-sdk-derive = { version = "0.6.0", path = "derive" }
grafbase-sdk-mock = { version = "0.2.0", path = "mock", optional = true }
graphql-composition = { version = "0.10.0", features = [
    "grafbase-extensions",
], optional = true }
graphql-ws-client = { workspace = true, optional = true }
hashbrown = { workspace = true, optional = true }
http = "1"
http-body-util = { workspace = true, optional = true }
itertools = { workspace = true, optional = true }
jaq-core = { version = "2.1.1", optional = true }
jaq-json = { version = "1.1.1", features = ["serde_json"], optional = true }
jaq-std = { version = "2.1.0", optional = true }
log = { workspace = true, features = ["kv_unstable_std"] }
minicbor-serde = { version = "0.6.0", features = ["alloc"] }
postcard = { version = "1", features = ["use-std"] }
regex = { workspace = true, optional = true }
reqwest = { workspace = true, features = ["json"], optional = true }
rust_decimal.workspace = true
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_path_to_error = "0.1"
serde_urlencoded = "0.7"
tempfile = { workspace = true, optional = true }
thiserror = "2"
time.workspace = true
tokio = { workspace = true, features = ["net"], optional = true }
toml = { workspace = true, optional = true }
url = "2"
uuid.workspace = true
which = { workspace = true, optional = true }
wit-bindgen.workspace = true
zerocopy = { workspace = true, features = ["std"] }

[dev-dependencies]
insta.workspace = true

[lints]
workspace = true

[build-dependencies]
semver.workspace = true
