Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 140 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"bluejay-parser",
"bluejay-printer",
"bluejay-schema-comparator",
"bluejay-operation-normalizer",
"bluejay-typegen",
"bluejay-typegen-codegen",
"bluejay-typegen-macro",
Expand All @@ -27,6 +28,7 @@ bluejay-typegen = { path = "./bluejay-typegen", version = "=0.3.1" }
bluejay-typegen-codegen = { path = "./bluejay-typegen-codegen", version = "=0.3.1" }
bluejay-typegen-macro = { path = "./bluejay-typegen-macro", version = "=0.3.1" }
bluejay-validator = { path = "./bluejay-validator", version = "=0.3.1" }
bluejay-operation-normalizer = { path = "./bluejay-operation-normalizer", version = "=0.3.1" }
bluejay-visibility = { path = "./bluejay-visibility", version = "=0.3.1" }

[profile.shopify-function]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## Crates

- [`bluejay-core`](/bluejay-core/README.md)
- [`bluejay-operation-normalize`](/bluejay-operation-normalizer/README.md)
- [`bluejay-parser`](/bluejay-parser/README.md)
- [`bluejay-printer`](/bluejay-printer/README.md)
- [`bluejay-schema-comparator`](/bluejay-schema-comparator/README.md)
Expand Down
4 changes: 2 additions & 2 deletions bluejay-core/src/operation_type.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::definition::DirectiveLocation;
use strum::{Display, EnumString, VariantNames};
use strum::{AsRefStr, Display, EnumString, VariantNames};

#[derive(Debug, Clone, Copy, PartialEq, EnumString, Display, VariantNames)]
#[derive(Debug, Clone, Copy, PartialEq, EnumString, AsRefStr, Display, VariantNames)]
#[strum(serialize_all = "camelCase")]
pub enum OperationType {
Query,
Expand Down
25 changes: 25 additions & 0 deletions bluejay-operation-normalizer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "bluejay-operation-normalizer"
version.workspace = true
edition = "2021"
license = "MIT"
repository = "https://github.com/Shopify/bluejay"
homepage = "https://github.com/Shopify/bluejay"
keywords = ["graphql"]
description = "GraphQL operation normalization and signature hashing"

[dependencies]
bluejay-core = { workspace = true }
blake3 = "1"
bumpalo = { version = "3", features = ["collections"] }

[dev-dependencies]
bluejay-parser = { workspace = true }
criterion = "0.5"

[[bench]]
name = "normalize"
harness = false

[lints]
workspace = true
3 changes: 3 additions & 0 deletions bluejay-operation-normalizer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `bluejay-operation-normalizer`

`bluejay-operation-normalizer` provides normalization and BLAKE3-based signature generation for GraphQL operations, producing canonical representations that group operations by structure rather than syntax.
Loading
Loading