Skip to content

Commit

Permalink
Compact GraphQL query text output
Browse files Browse the repository at this point in the history
Wires the pre-existing `compact` printing into a feature flag.

Additionally disables indenting when printing in compact form
  • Loading branch information
tomgasson committed Sep 19, 2022
1 parent 54ba473 commit 0c59dfb
Show file tree
Hide file tree
Showing 28 changed files with 1,011 additions and 194 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.enable": true,
"rust-analyzer.rustfmt.extraArgs": [
"+nightly"
],


// Enable these to get Relay GraphQL editor support working on test files.
Expand Down
180 changes: 131 additions & 49 deletions compiler/Cargo.lock

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

4 changes: 4 additions & 0 deletions compiler/crates/common/src/feature_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ pub struct FeatureFlags {
/// Enable support for the experimental `@alias` directive on fragment spreads.
#[serde(default)]
pub enable_fragment_aliases: FeatureFlag,

/// Print queries in compact form
#[serde(default)]
pub compact_query_text: FeatureFlag,
}

#[derive(Debug, Deserialize, Clone, Serialize)]
Expand Down
Loading

0 comments on commit 0c59dfb

Please sign in to comment.