diff --git a/Cargo.lock b/Cargo.lock
index 5e0fd46574..e36f881d60 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5718,6 +5718,7 @@ dependencies = [
"tracing-opentelemetry",
"tracing-subscriber",
"ttl_cache",
+ "unicode-segmentation",
"update-informer",
"url",
"urlencoding",
diff --git a/Cargo.toml b/Cargo.toml
index 68f25713f8..9ee5d9b070 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -175,6 +175,7 @@ tailcall-valid = { workspace = true }
dashmap = "6.1.0"
urlencoding = "2.1.3"
tailcall-chunk = "0.3.0"
+unicode-segmentation = "1.12.0"
# to build rquickjs bindings on systems without builtin bindings
[target.'cfg(all(target_os = "windows", target_arch = "x86"))'.dependencies]
diff --git a/generated/.tailcallrc.schema.json b/generated/.tailcallrc.schema.json
index 70ca3e9258..3939019104 100644
--- a/generated/.tailcallrc.schema.json
+++ b/generated/.tailcallrc.schema.json
@@ -2,9 +2,6 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RuntimeConfig",
"type": "object",
- "required": [
- "links"
- ],
"properties": {
"links": {
"description": "A list of all links in the schema.",
@@ -15,7 +12,6 @@
},
"server": {
"description": "Dictates how the server behaves and helps tune tailcall for all ingress requests. Features such as request batching, SSL, HTTP2 etc. can be configured here.",
- "default": {},
"allOf": [
{
"$ref": "#/definitions/Server"
@@ -32,7 +28,6 @@
},
"upstream": {
"description": "Dictates how tailcall should handle upstream requests/responses. Tuning upstream can improve performance and reliability for connections.",
- "default": {},
"allOf": [
{
"$ref": "#/definitions/Upstream"
diff --git a/src/core/config/config.rs b/src/core/config/config.rs
index 759ee0a9aa..3cf91aa6f6 100644
--- a/src/core/config/config.rs
+++ b/src/core/config/config.rs
@@ -43,17 +43,18 @@ pub struct RuntimeConfig {
/// Dictates how the server behaves and helps tune tailcall for all ingress
/// requests. Features such as request batching, SSL, HTTP2 etc. can be
/// configured here.
- #[serde(default)]
+ #[serde(default, skip_serializing_if = "is_default")]
pub server: Server,
///
/// Dictates how tailcall should handle upstream requests/responses.
/// Tuning upstream can improve performance and reliability for connections.
- #[serde(default)]
+ #[serde(default, skip_serializing_if = "is_default")]
pub upstream: Upstream,
///
/// A list of all links in the schema.
+ #[serde(default, skip_serializing_if = "is_default")]
pub links: Vec,
/// Enable [opentelemetry](https://opentelemetry.io) support
diff --git a/src/core/config/transformer/subgraph.rs b/src/core/config/transformer/subgraph.rs
index 0d336d544f..c43e727bef 100644
--- a/src/core/config/transformer/subgraph.rs
+++ b/src/core/config/transformer/subgraph.rs
@@ -59,7 +59,12 @@ impl Transform for Subgraph {
let key = Key { fields };
to_directive(key.to_directive()).map(|directive| {
- ty.directives.push(directive);
+ // Prevent transformer to push the same directive multiple times
+ if !ty.directives.iter().any(|d| {
+ d.name == directive.name && d.arguments == directive.arguments
+ }) {
+ ty.directives.push(directive);
+ }
})
}
None => Valid::succeed(()),
diff --git a/src/core/document.rs b/src/core/document.rs
index a65b307f7c..933c72ccbc 100644
--- a/src/core/document.rs
+++ b/src/core/document.rs
@@ -4,6 +4,7 @@ use std::fmt::Display;
use async_graphql::parser::types::*;
use async_graphql::Positioned;
use async_graphql_value::ConstValue;
+use unicode_segmentation::UnicodeSegmentation;
use super::jit::Directive as JitDirective;
use super::json::JsonLikeOwned;
@@ -28,19 +29,35 @@ impl<'a> Iterator for LineBreaker<'a> {
return None;
}
- let end_index = self
- .string
- .chars()
- .skip(self.index + self.break_at)
- .enumerate()
- .find(|(_, ch)| ch.is_whitespace())
- .map(|(index, _)| self.index + self.break_at + index + 1)
- .unwrap_or(self.string.len());
+ let graphemes = self.string[self.index..].graphemes(true).peekable();
+ let mut iter = graphemes;
+ let mut current_len = 0;
+ let mut last_valid_index = self.index;
+
+ while let Some(grapheme) = iter.peek() {
+ let grapheme_len = grapheme.len();
+
+ if current_len + grapheme_len > self.break_at {
+ break;
+ }
+
+ iter.next();
+ current_len += grapheme_len;
+ last_valid_index += grapheme_len;
+ }
+
+ for grapheme in iter {
+ if grapheme.chars().any(|ch| ch.is_whitespace()) {
+ last_valid_index += grapheme.len();
+ break;
+ }
+ last_valid_index += grapheme.len();
+ }
let start_index = self.index;
- self.index = end_index;
+ self.index = last_valid_index;
- Some(&self.string[start_index..end_index])
+ Some(&self.string[start_index..self.index])
}
}
@@ -456,3 +473,38 @@ impl<'a, Input: JsonLikeOwned + Display> From<&'a JitDirective> for Direc
}
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::get_formatted_docs;
+
+ #[test]
+ fn test_get_formatted_docs() {
+ let input = Some(String::from(
+ "This is a test string for get_formatted_docs function. You are typing a long sentence for testing. What a nice, long sentence!",
+ ));
+ let indent = 4;
+
+ let result = get_formatted_docs(input, indent);
+ let expected = String::from(
+ " \"\"\"\n This is a test string for get_formatted_docs function. You are typing a long sentence \n for testing. What a nice, long sentence!\n \"\"\"\n",
+ );
+
+ assert_eq!(result, expected)
+ }
+
+ #[test]
+ fn test_get_formatted_docs_utf8() {
+ let input = Some(String::from(
+ "get_formatted_docs 함수 테스트를 위한 문장입니다. 테스트를 위해 긴 문장을 입력하는 중 입니다. テストのために長い文章を入力しているところです。なんて素敵な長文です!",
+ ));
+ let indent = 4;
+
+ let result = get_formatted_docs(input, indent);
+ let expected = String::from(
+ " \"\"\"\n get_formatted_docs 함수 테스트를 위한 문장입니다. 테스트를 위해 \n 긴 문장을 입력하는 중 입니다. テストのために長い文章を入力しているところです。なんて素敵な長文です!\n \"\"\"\n",
+ );
+
+ assert_eq!(result, expected)
+ }
+}
diff --git a/tests/core/parse.rs b/tests/core/parse.rs
index 6246c40008..f7af845d81 100644
--- a/tests/core/parse.rs
+++ b/tests/core/parse.rs
@@ -15,7 +15,8 @@ use tailcall::cli::javascript;
use tailcall::core::app_context::AppContext;
use tailcall::core::blueprint::Blueprint;
use tailcall::core::cache::InMemoryCache;
-use tailcall::core::config::{ConfigModule, Source};
+use tailcall::core::config::{ConfigModule, Link, RuntimeConfig, Source};
+use tailcall::core::merge_right::MergeRight;
use tailcall::core::runtime::TargetRuntime;
use tailcall::core::worker::{Command, Event};
use tailcall::core::{EnvIO, WorkerIO};
@@ -51,7 +52,7 @@ impl ExecutionSpec {
.peekable();
let mut name: Option = None;
- let mut server: Vec<(Source, String)> = Vec::with_capacity(2);
+ let mut config = RuntimeConfig::default();
let mut mock: Option> = None;
let mut env: Option> = None;
let mut files: BTreeMap = BTreeMap::new();
@@ -59,6 +60,7 @@ impl ExecutionSpec {
let mut runner: Option = None;
let mut check_identity = false;
let mut sdl_error = false;
+ let mut links_counter = 0;
while let Some(node) = children.next() {
match node {
@@ -172,8 +174,16 @@ impl ExecutionSpec {
match name {
"config" => {
- // Server configs are only parsed if the test isn't skipped.
- server.push((source, content));
+ config = config.merge_right(
+ RuntimeConfig::from_source(source, &content).unwrap(),
+ );
+ }
+ "schema" => {
+ // Schemas configs are only parsed if the test isn't skipped.
+ let name = format!("schema_{}.graphql", links_counter);
+ files.insert(name.clone(), content);
+ config.links.push(Link { src: name, ..Default::default() });
+ links_counter += 1;
}
"mock" => {
if mock.is_none() {
@@ -240,9 +250,9 @@ impl ExecutionSpec {
}
}
- if server.is_empty() {
+ if links_counter == 0 {
return Err(anyhow!(
- "Unexpected blocks in {:?}: You must define a GraphQL Config in an execution test.",
+ "Unexpected blocks in {:?}: You must define a GraphQL Schema in an execution test.",
path,
));
}
@@ -252,7 +262,7 @@ impl ExecutionSpec {
name: name.unwrap_or_else(|| path.file_name().unwrap().to_str().unwrap().to_string()),
safe_name: path.file_name().unwrap().to_str().unwrap().to_string(),
- server,
+ config,
mock,
env,
test,
diff --git a/tests/core/runtime.rs b/tests/core/runtime.rs
index 0961593cc3..22ad9748af 100644
--- a/tests/core/runtime.rs
+++ b/tests/core/runtime.rs
@@ -10,7 +10,7 @@ use derive_setters::Setters;
use tailcall::cli::javascript::init_worker_io;
use tailcall::core::blueprint::Script;
use tailcall::core::cache::InMemoryCache;
-use tailcall::core::config::Source;
+use tailcall::core::config::RuntimeConfig;
use tailcall::core::runtime::TargetRuntime;
use tailcall::core::worker::{Command, Event};
@@ -25,7 +25,7 @@ pub struct ExecutionSpec {
pub name: String,
pub safe_name: String,
- pub server: Vec<(Source, String)>,
+ pub config: RuntimeConfig,
pub mock: Option>,
pub env: Option>,
pub test: Option>,
diff --git a/tests/core/snapshots/add-field-index-list.md_merged.snap b/tests/core/snapshots/add-field-index-list.md_merged.snap
index 83b7126da0..fcc6fed679 100644
--- a/tests/core/snapshots/add-field-index-list.md_merged.snap
+++ b/tests/core/snapshots/add-field-index-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/add-field-many-list.md_merged.snap b/tests/core/snapshots/add-field-many-list.md_merged.snap
index 80606fd2c7..db992cbaf4 100644
--- a/tests/core/snapshots/add-field-many-list.md_merged.snap
+++ b/tests/core/snapshots/add-field-many-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/add-field-many.md_merged.snap b/tests/core/snapshots/add-field-many.md_merged.snap
index 1cd7979460..40c60a3ddc 100644
--- a/tests/core/snapshots/add-field-many.md_merged.snap
+++ b/tests/core/snapshots/add-field-many.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/add-field-modify.md_merged.snap b/tests/core/snapshots/add-field-modify.md_merged.snap
index d4d6474fcc..1d7c0d3c4e 100644
--- a/tests/core/snapshots/add-field-modify.md_merged.snap
+++ b/tests/core/snapshots/add-field-modify.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/add-field-with-composition.md_merged.snap b/tests/core/snapshots/add-field-with-composition.md_merged.snap
index e6879805cb..9cd8f812ee 100644
--- a/tests/core/snapshots/add-field-with-composition.md_merged.snap
+++ b/tests/core/snapshots/add-field-with-composition.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/add-field-with-modify.md_merged.snap b/tests/core/snapshots/add-field-with-modify.md_merged.snap
index 6541ffad9b..195c33936e 100644
--- a/tests/core/snapshots/add-field-with-modify.md_merged.snap
+++ b/tests/core/snapshots/add-field-with-modify.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/add-field.md_merged.snap b/tests/core/snapshots/add-field.md_merged.snap
index 8f31490b9f..27a054b1b6 100644
--- a/tests/core/snapshots/add-field.md_merged.snap
+++ b/tests/core/snapshots/add-field.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/apollo-federation-entities-batch.md_merged.snap b/tests/core/snapshots/apollo-federation-entities-batch.md_merged.snap
index d85e9f7717..09a5647752 100644
--- a/tests/core/snapshots/apollo-federation-entities-batch.md_merged.snap
+++ b/tests/core/snapshots/apollo-federation-entities-batch.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(enableFederation: true, port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) {
+schema
+ @server(enableFederation: true, port: 8000)
+ @upstream(batch: {delay: 100, headers: []}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/apollo-federation-entities.md_merged.snap b/tests/core/snapshots/apollo-federation-entities.md_merged.snap
index e18bcb796d..2f8a262ec6 100644
--- a/tests/core/snapshots/apollo-federation-entities.md_merged.snap
+++ b/tests/core/snapshots/apollo-federation-entities.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(enableFederation: true, port: 8000)
@upstream(batch: {delay: 100, headers: []}, httpCache: 42)
- @link(src: "./posts.graphql", type: Config) {
+ @link(src: "./posts.graphql", type: Config)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/apollo-tracing.md_merged.snap b/tests/core/snapshots/apollo-tracing.md_merged.snap
index e7ca2b0596..597280a4cc 100644
--- a/tests/core/snapshots/apollo-tracing.md_merged.snap
+++ b/tests/core/snapshots/apollo-tracing.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8000) @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/async-cache-disabled.md_merged.snap b/tests/core/snapshots/async-cache-disabled.md_merged.snap
index 19034b2930..026988c1a5 100644
--- a/tests/core/snapshots/async-cache-disabled.md_merged.snap
+++ b/tests/core/snapshots/async-cache-disabled.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000, queryValidation: false) @upstream {
+schema @server(port: 8000, queryValidation: false) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_merged.snap b/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_merged.snap
index 9b23299848..7e6d106eed 100644
--- a/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_merged.snap
+++ b/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000, queryValidation: false) @upstream {
+schema @server(port: 8000, queryValidation: false) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/async-cache-enabled.md_merged.snap b/tests/core/snapshots/async-cache-enabled.md_merged.snap
index 5a9eaefc3d..678b134632 100644
--- a/tests/core/snapshots/async-cache-enabled.md_merged.snap
+++ b/tests/core/snapshots/async-cache-enabled.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000, queryValidation: false) @upstream {
+schema @server(port: 8000, queryValidation: false) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/async-cache-global.md_merged.snap b/tests/core/snapshots/async-cache-global.md_merged.snap
index d753b1f6fa..bf3cb875ff 100644
--- a/tests/core/snapshots/async-cache-global.md_merged.snap
+++ b/tests/core/snapshots/async-cache-global.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000, queryValidation: false) @upstream {
+schema @server(port: 8000, queryValidation: false) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/async-cache-inflight-request.md_merged.snap b/tests/core/snapshots/async-cache-inflight-request.md_merged.snap
index 5a9eaefc3d..678b134632 100644
--- a/tests/core/snapshots/async-cache-inflight-request.md_merged.snap
+++ b/tests/core/snapshots/async-cache-inflight-request.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000, queryValidation: false) @upstream {
+schema @server(port: 8000, queryValidation: false) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/auth-basic.md_merged.snap b/tests/core/snapshots/auth-basic.md_merged.snap
index a7faae5b0f..d589456ac8 100644
--- a/tests/core/snapshots/auth-basic.md_merged.snap
+++ b/tests/core/snapshots/auth-basic.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) {
+schema
+ @server(port: 8000)
+ @upstream
+ @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/auth-jwt.md_merged.snap b/tests/core/snapshots/auth-jwt.md_merged.snap
index 36e2f512b4..5821fac9d5 100644
--- a/tests/core/snapshots/auth-jwt.md_merged.snap
+++ b/tests/core/snapshots/auth-jwt.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream @link(id: "jwks", src: "jwks.json", type: Jwks) {
+schema
+ @server(port: 8000)
+ @upstream
+ @link(id: "jwks", src: "jwks.json", type: Jwks)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/auth-multiple-complex.md_merged.snap b/tests/core/snapshots/auth-multiple-complex.md_merged.snap
index 227e4b35cd..82a4d70ca6 100644
--- a/tests/core/snapshots/auth-multiple-complex.md_merged.snap
+++ b/tests/core/snapshots/auth-multiple-complex.md_merged.snap
@@ -8,7 +8,8 @@ schema
@upstream
@link(id: "a", src: ".htpasswd_a", type: Htpasswd)
@link(id: "b", src: ".htpasswd_b", type: Htpasswd)
- @link(id: "c", src: ".htpasswd_c", type: Htpasswd) {
+ @link(id: "c", src: ".htpasswd_c", type: Htpasswd)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/auth-multiple.md_merged.snap b/tests/core/snapshots/auth-multiple.md_merged.snap
index f1e4669a7c..23ad718020 100644
--- a/tests/core/snapshots/auth-multiple.md_merged.snap
+++ b/tests/core/snapshots/auth-multiple.md_merged.snap
@@ -8,7 +8,8 @@ schema
@upstream
@link(id: "a", src: ".htpasswd_a", type: Htpasswd)
@link(id: "b", src: ".htpasswd_b", type: Htpasswd)
- @link(id: "c", src: ".htpasswd_c", type: Htpasswd) {
+ @link(id: "c", src: ".htpasswd_c", type: Htpasswd)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/auth.md_merged.snap b/tests/core/snapshots/auth.md_merged.snap
index a4c0ba1805..3a64b2780d 100644
--- a/tests/core/snapshots/auth.md_merged.snap
+++ b/tests/core/snapshots/auth.md_merged.snap
@@ -7,7 +7,8 @@ schema
@server
@upstream
@link(id: "htpasswd", src: ".htpasswd", type: Htpasswd)
- @link(id: "jwks", src: "jwks.json", type: Jwks) {
+ @link(id: "jwks", src: "jwks.json", type: Jwks)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/auth_order.md_merged.snap b/tests/core/snapshots/auth_order.md_merged.snap
index 87d48f1a66..3e87e7b86f 100644
--- a/tests/core/snapshots/auth_order.md_merged.snap
+++ b/tests/core/snapshots/auth_order.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) {
+schema
+ @server
+ @upstream
+ @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/batching-default.md_merged.snap b/tests/core/snapshots/batching-default.md_merged.snap
index 84995c2b57..e2e7144914 100644
--- a/tests/core/snapshots/batching-default.md_merged.snap
+++ b/tests/core/snapshots/batching-default.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 10, headers: []}, httpCache: 42) {
+schema @server @upstream(batch: {delay: 10, headers: []}, httpCache: 42) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/batching-disabled.md_merged.snap b/tests/core/snapshots/batching-disabled.md_merged.snap
index 381b4ce9d9..c1bbd7be47 100644
--- a/tests/core/snapshots/batching-disabled.md_merged.snap
+++ b/tests/core/snapshots/batching-disabled.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 0, headers: [], maxSize: 100}, httpCache: 42) {
+schema
+ @server
+ @upstream(batch: {delay: 0, headers: [], maxSize: 100}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/batching-group-by-default.md_merged.snap b/tests/core/snapshots/batching-group-by-default.md_merged.snap
index 8b3c506b4c..f88a3b8987 100644
--- a/tests/core/snapshots/batching-group-by-default.md_merged.snap
+++ b/tests/core/snapshots/batching-group-by-default.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42) {
+schema
+ @server
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/batching-group-by-optional-key.md_merged.snap b/tests/core/snapshots/batching-group-by-optional-key.md_merged.snap
index 59f89eab5a..1df4723c66 100644
--- a/tests/core/snapshots/batching-group-by-optional-key.md_merged.snap
+++ b/tests/core/snapshots/batching-group-by-optional-key.md_merged.snap
@@ -5,7 +5,8 @@ snapshot_kind: text
---
schema
@server(port: 8000, queryValidation: false)
- @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42) {
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/batching-group-by.md_merged.snap b/tests/core/snapshots/batching-group-by.md_merged.snap
index 73e02720a8..a76175b431 100644
--- a/tests/core/snapshots/batching-group-by.md_merged.snap
+++ b/tests/core/snapshots/batching-group-by.md_merged.snap
@@ -5,7 +5,8 @@ snapshot_kind: text
---
schema
@server(port: 8000, queryValidation: false)
- @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42) {
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/batching-post.md_merged.snap b/tests/core/snapshots/batching-post.md_merged.snap
index 6a327f1fb0..3db296f616 100644
--- a/tests/core/snapshots/batching-post.md_merged.snap
+++ b/tests/core/snapshots/batching-post.md_merged.snap
@@ -5,7 +5,8 @@ snapshot_kind: text
---
schema
@server(port: 8000, queryValidation: false)
- @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42) {
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/batching.md_merged.snap b/tests/core/snapshots/batching.md_merged.snap
index ed80eff673..6040c495b8 100644
--- a/tests/core/snapshots/batching.md_merged.snap
+++ b/tests/core/snapshots/batching.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(batchRequests: true) @upstream {
+schema @server(batchRequests: true) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/body-batching-cases.md_merged.snap b/tests/core/snapshots/body-batching-cases.md_merged.snap
index 776650bab0..03edeec278 100644
--- a/tests/core/snapshots/body-batching-cases.md_merged.snap
+++ b/tests/core/snapshots/body-batching-cases.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream(batch: {delay: 1, headers: []}, httpCache: 42) {
+schema
+ @server(port: 8000)
+ @upstream(batch: {delay: 1, headers: []}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/body-batching.md_merged.snap b/tests/core/snapshots/body-batching.md_merged.snap
index 4818a68eee..289b2295de 100644
--- a/tests/core/snapshots/body-batching.md_merged.snap
+++ b/tests/core/snapshots/body-batching.md_merged.snap
@@ -5,7 +5,8 @@ snapshot_kind: text
---
schema
@server(port: 8000, queryValidation: false)
- @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42) {
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/cache-control.md_merged.snap b/tests/core/snapshots/cache-control.md_merged.snap
index d9e977c16d..976150c084 100644
--- a/tests/core/snapshots/cache-control.md_merged.snap
+++ b/tests/core/snapshots/cache-control.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(headers: {cacheControl: true}) @upstream {
+schema @server(headers: {cacheControl: true}) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/caching-collision.md_merged.snap b/tests/core/snapshots/caching-collision.md_merged.snap
index e87b1e063a..5407670152 100644
--- a/tests/core/snapshots/caching-collision.md_merged.snap
+++ b/tests/core/snapshots/caching-collision.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/caching.md_merged.snap b/tests/core/snapshots/caching.md_merged.snap
index 393125bad6..361478ad92 100644
--- a/tests/core/snapshots/caching.md_merged.snap
+++ b/tests/core/snapshots/caching.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/call-graphql-datasource.md_merged.snap b/tests/core/snapshots/call-graphql-datasource.md_merged.snap
index c37609aaf3..1b2a29b197 100644
--- a/tests/core/snapshots/call-graphql-datasource.md_merged.snap
+++ b/tests/core/snapshots/call-graphql-datasource.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) {
+schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/call-multiple-steps-piping.md_merged.snap b/tests/core/snapshots/call-multiple-steps-piping.md_merged.snap
index 2c8904f528..3f73a02d30 100644
--- a/tests/core/snapshots/call-multiple-steps-piping.md_merged.snap
+++ b/tests/core/snapshots/call-multiple-steps-piping.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/call-mutation.md_merged.snap b/tests/core/snapshots/call-mutation.md_merged.snap
index 1aa6696906..e3b390ccc6 100644
--- a/tests/core/snapshots/call-mutation.md_merged.snap
+++ b/tests/core/snapshots/call-mutation.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/call-operator.md_merged.snap b/tests/core/snapshots/call-operator.md_merged.snap
index f21b1bec91..d744a09efe 100644
--- a/tests/core/snapshots/call-operator.md_merged.snap
+++ b/tests/core/snapshots/call-operator.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(hostname: "0.0.0.0", port: 8000)
@upstream(httpCache: 42)
- @link(id: "news", src: "news.proto", type: Protobuf) {
+ @link(id: "news", src: "news.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/cors-allow-cred-false.md_merged.snap b/tests/core/snapshots/cors-allow-cred-false.md_merged.snap
index 563575f96f..0aae43c206 100644
--- a/tests/core/snapshots/cors-allow-cred-false.md_merged.snap
+++ b/tests/core/snapshots/cors-allow-cred-false.md_merged.snap
@@ -16,7 +16,8 @@ schema
}
}
)
- @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000})
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/cors-allow-cred-true.md_merged.snap b/tests/core/snapshots/cors-allow-cred-true.md_merged.snap
index 214ac18c0e..4b37500c4d 100644
--- a/tests/core/snapshots/cors-allow-cred-true.md_merged.snap
+++ b/tests/core/snapshots/cors-allow-cred-true.md_merged.snap
@@ -16,7 +16,8 @@ schema
}
}
)
- @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000})
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/cors-allow-cred-vary.md_merged.snap b/tests/core/snapshots/cors-allow-cred-vary.md_merged.snap
index 214ac18c0e..4b37500c4d 100644
--- a/tests/core/snapshots/cors-allow-cred-vary.md_merged.snap
+++ b/tests/core/snapshots/cors-allow-cred-vary.md_merged.snap
@@ -16,7 +16,8 @@ schema
}
}
)
- @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000})
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/custom-headers.md_merged.snap b/tests/core/snapshots/custom-headers.md_merged.snap
index 2c70e18cae..f8ac6236a1 100644
--- a/tests/core/snapshots/custom-headers.md_merged.snap
+++ b/tests/core/snapshots/custom-headers.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(headers: {custom: [{key: "x-id", value: "1"}, {key: "x-name", value: "John Doe"}]}) @upstream {
+schema
+ @server(headers: {custom: [{key: "x-id", value: "1"}, {key: "x-name", value: "John Doe"}]})
+ @upstream
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/custom-scalars.md_merged.snap b/tests/core/snapshots/custom-scalars.md_merged.snap
index c40ea49cdf..5a162493da 100644
--- a/tests/core/snapshots/custom-scalars.md_merged.snap
+++ b/tests/core/snapshots/custom-scalars.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/dedupe_batch_query_execution.md_merged.snap b/tests/core/snapshots/dedupe_batch_query_execution.md_merged.snap
index d753b1f6fa..3dd3162953 100644
--- a/tests/core/snapshots/dedupe_batch_query_execution.md_merged.snap
+++ b/tests/core/snapshots/dedupe_batch_query_execution.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000, queryValidation: false) @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/default-value-arg.md_merged.snap b/tests/core/snapshots/default-value-arg.md_merged.snap
index 8486447f4d..828d8d5823 100644
--- a/tests/core/snapshots/default-value-arg.md_merged.snap
+++ b/tests/core/snapshots/default-value-arg.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/default-value-config.md_merged.snap b/tests/core/snapshots/default-value-config.md_merged.snap
index c0a2a87b4b..56edcf46f7 100644
--- a/tests/core/snapshots/default-value-config.md_merged.snap
+++ b/tests/core/snapshots/default-value-config.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/enum-args.md_merged.snap b/tests/core/snapshots/enum-args.md_merged.snap
index 4abfde83d2..98067a147a 100644
--- a/tests/core/snapshots/enum-args.md_merged.snap
+++ b/tests/core/snapshots/enum-args.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/env-value.md_merged.snap b/tests/core/snapshots/env-value.md_merged.snap
index 7098abde18..01a4271843 100644
--- a/tests/core/snapshots/env-value.md_merged.snap
+++ b/tests/core/snapshots/env-value.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/experimental-headers.md_merged.snap b/tests/core/snapshots/experimental-headers.md_merged.snap
index 523d454de4..48f1e4b5c8 100644
--- a/tests/core/snapshots/experimental-headers.md_merged.snap
+++ b/tests/core/snapshots/experimental-headers.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(headers: {experimental: ["X-experimental", "x-tailcall"]}) @upstream {
+schema
+ @server(headers: {experimental: ["X-experimental", "x-tailcall"]})
+ @upstream
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/federation-subgraph-force-disabled.md_merged.snap b/tests/core/snapshots/federation-subgraph-force-disabled.md_merged.snap
index dbc35e22c5..f141f85bcb 100644
--- a/tests/core/snapshots/federation-subgraph-force-disabled.md_merged.snap
+++ b/tests/core/snapshots/federation-subgraph-force-disabled.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(enableFederation: false, port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) {
+schema
+ @server(enableFederation: false, port: 8000)
+ @upstream(batch: {delay: 100, headers: []}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/federation-subgraph-force-enabled.md_merged.snap b/tests/core/snapshots/federation-subgraph-force-enabled.md_merged.snap
index c9e0056ba0..9534106454 100644
--- a/tests/core/snapshots/federation-subgraph-force-enabled.md_merged.snap
+++ b/tests/core/snapshots/federation-subgraph-force-enabled.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(enableFederation: true, port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) {
+schema
+ @server(enableFederation: true, port: 8000)
+ @upstream(batch: {delay: 100, headers: []}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/federation-subgraph-no-entities.md_merged.snap b/tests/core/snapshots/federation-subgraph-no-entities.md_merged.snap
index c51133fa15..865e71bbe7 100644
--- a/tests/core/snapshots/federation-subgraph-no-entities.md_merged.snap
+++ b/tests/core/snapshots/federation-subgraph-no-entities.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) {
+schema
+ @server(port: 8000)
+ @upstream(batch: {delay: 100, headers: []}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-001.md_merged.snap b/tests/core/snapshots/graphql-conformance-001.md_merged.snap
index a28dcd3c81..577115996f 100644
--- a/tests/core/snapshots/graphql-conformance-001.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-001.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-003.md_merged.snap b/tests/core/snapshots/graphql-conformance-003.md_merged.snap
index 4a492f6d1f..260471d37e 100644
--- a/tests/core/snapshots/graphql-conformance-003.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-003.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-010.md_merged.snap b/tests/core/snapshots/graphql-conformance-010.md_merged.snap
index 742a9a8290..0f6bbc62ba 100644
--- a/tests/core/snapshots/graphql-conformance-010.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-010.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-013.md_merged.snap b/tests/core/snapshots/graphql-conformance-013.md_merged.snap
index 5d4857500c..78c0142a58 100644
--- a/tests/core/snapshots/graphql-conformance-013.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-013.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-014.md_merged.snap b/tests/core/snapshots/graphql-conformance-014.md_merged.snap
index a28dcd3c81..577115996f 100644
--- a/tests/core/snapshots/graphql-conformance-014.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-014.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-015.md_merged.snap b/tests/core/snapshots/graphql-conformance-015.md_merged.snap
index 6fa190cb9c..16a9c63135 100644
--- a/tests/core/snapshots/graphql-conformance-015.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-015.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-018.md_merged.snap b/tests/core/snapshots/graphql-conformance-018.md_merged.snap
index 05ce85690b..b7d17f3c52 100644
--- a/tests/core/snapshots/graphql-conformance-018.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-018.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-001.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-001.md_merged.snap
index e0ea921538..310bbda47a 100644
--- a/tests/core/snapshots/graphql-conformance-http-001.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-001.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-002.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-002.md_merged.snap
index cd6ca7f939..146c9ba45f 100644
--- a/tests/core/snapshots/graphql-conformance-http-002.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-002.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-003.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-003.md_merged.snap
index 29b398f95e..ea671b2b2b 100644
--- a/tests/core/snapshots/graphql-conformance-http-003.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-003.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-004.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-004.md_merged.snap
index 29b398f95e..ea671b2b2b 100644
--- a/tests/core/snapshots/graphql-conformance-http-004.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-004.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-005.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-005.md_merged.snap
index bf3363b6cf..0af0f9248c 100644
--- a/tests/core/snapshots/graphql-conformance-http-005.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-005.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-006.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-006.md_merged.snap
index 50249b3404..ffca173cff 100644
--- a/tests/core/snapshots/graphql-conformance-http-006.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-006.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-007.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-007.md_merged.snap
index 97b7085299..0bc04c1a48 100644
--- a/tests/core/snapshots/graphql-conformance-http-007.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-007.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-008.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-008.md_merged.snap
index bc27e56100..998c7ed26c 100644
--- a/tests/core/snapshots/graphql-conformance-http-008.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-008.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-010.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-010.md_merged.snap
index c244a7639f..56bc6a0753 100644
--- a/tests/core/snapshots/graphql-conformance-http-010.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-010.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-012.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-012.md_merged.snap
index 8507ade4e3..72c7506e12 100644
--- a/tests/core/snapshots/graphql-conformance-http-012.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-012.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-013.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-013.md_merged.snap
index 52fec7f57c..dc5071346d 100644
--- a/tests/core/snapshots/graphql-conformance-http-013.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-013.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-014.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-014.md_merged.snap
index e0ea921538..310bbda47a 100644
--- a/tests/core/snapshots/graphql-conformance-http-014.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-014.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-015.md_merged.snap
index 2df28536a7..7a97751281 100644
--- a/tests/core/snapshots/graphql-conformance-http-015.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-015.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-http-017.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-017.md_merged.snap
index b4fcab3970..b2a0606bcc 100644
--- a/tests/core/snapshots/graphql-conformance-http-017.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-http-017.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_merged.snap b/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_merged.snap
index 6caf38d5d7..d7c734be60 100644
--- a/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_merged.snap b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_merged.snap
index d02fbe8f56..7cd00d685c 100644
--- a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-conformance-nested-lists.md_merged.snap b/tests/core/snapshots/graphql-conformance-nested-lists.md_merged.snap
index bf74d40343..17f4978dad 100644
--- a/tests/core/snapshots/graphql-conformance-nested-lists.md_merged.snap
+++ b/tests/core/snapshots/graphql-conformance-nested-lists.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-dataloader-batch-request.md_merged.snap b/tests/core/snapshots/graphql-dataloader-batch-request.md_merged.snap
index 683dd6f9cc..ff9420325a 100644
--- a/tests/core/snapshots/graphql-dataloader-batch-request.md_merged.snap
+++ b/tests/core/snapshots/graphql-dataloader-batch-request.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 1, headers: []}) {
+schema @server @upstream(batch: {delay: 1, headers: []}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-dataloader-no-batch-request.md_merged.snap b/tests/core/snapshots/graphql-dataloader-no-batch-request.md_merged.snap
index d0044e3570..60a476783c 100644
--- a/tests/core/snapshots/graphql-dataloader-no-batch-request.md_merged.snap
+++ b/tests/core/snapshots/graphql-dataloader-no-batch-request.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 1, headers: []}) {
+schema @server @upstream(batch: {delay: 1, headers: []}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-datasource-errors.md_merged.snap b/tests/core/snapshots/graphql-datasource-errors.md_merged.snap
index 52e9757626..9a48dae811 100644
--- a/tests/core/snapshots/graphql-datasource-errors.md_merged.snap
+++ b/tests/core/snapshots/graphql-datasource-errors.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap b/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap
index 53de3b5a3e..5e76575871 100644
--- a/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap
+++ b/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/graphql-datasource-no-args.md_merged.snap b/tests/core/snapshots/graphql-datasource-no-args.md_merged.snap
index c083d5abbf..edc0625455 100644
--- a/tests/core/snapshots/graphql-datasource-no-args.md_merged.snap
+++ b/tests/core/snapshots/graphql-datasource-no-args.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-datasource-query-directives.md_merged.snap b/tests/core/snapshots/graphql-datasource-query-directives.md_merged.snap
index 35abb7df65..63003e26bd 100644
--- a/tests/core/snapshots/graphql-datasource-query-directives.md_merged.snap
+++ b/tests/core/snapshots/graphql-datasource-query-directives.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-datasource-with-args.md_merged.snap b/tests/core/snapshots/graphql-datasource-with-args.md_merged.snap
index 76530d1086..f23199a9fb 100644
--- a/tests/core/snapshots/graphql-datasource-with-args.md_merged.snap
+++ b/tests/core/snapshots/graphql-datasource-with-args.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-datasource-with-empty-enum.md_merged.snap b/tests/core/snapshots/graphql-datasource-with-empty-enum.md_merged.snap
index 6715b2cbfd..9352173bc1 100644
--- a/tests/core/snapshots/graphql-datasource-with-empty-enum.md_merged.snap
+++ b/tests/core/snapshots/graphql-datasource-with-empty-enum.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_merged.snap b/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_merged.snap
index 0a1b917e5f..23a7164357 100644
--- a/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_merged.snap
+++ b/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-nested-datasource.md_merged.snap b/tests/core/snapshots/graphql-nested-datasource.md_merged.snap
index 188f91e42d..55a90a1275 100644
--- a/tests/core/snapshots/graphql-nested-datasource.md_merged.snap
+++ b/tests/core/snapshots/graphql-nested-datasource.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/graphql-nested.md_merged.snap b/tests/core/snapshots/graphql-nested.md_merged.snap
index 8accbbde47..38390956d2 100644
--- a/tests/core/snapshots/graphql-nested.md_merged.snap
+++ b/tests/core/snapshots/graphql-nested.md_merged.snap
@@ -1,8 +1,9 @@
---
source: tests/core/spec.rs
expression: formatter
+snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8000) @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/grpc-batch.md_merged.snap b/tests/core/snapshots/grpc-batch.md_merged.snap
index b58b47d536..107c15d704 100644
--- a/tests/core/snapshots/grpc-batch.md_merged.snap
+++ b/tests/core/snapshots/grpc-batch.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(port: 8000)
@upstream(batch: {delay: 10, headers: []}, httpCache: 42)
- @link(id: "news", src: "news.proto", type: Protobuf) {
+ @link(id: "news", src: "news.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/grpc-error.md_merged.snap b/tests/core/snapshots/grpc-error.md_merged.snap
index ce7d6911d6..2ea9eb96c6 100644
--- a/tests/core/snapshots/grpc-error.md_merged.snap
+++ b/tests/core/snapshots/grpc-error.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(port: 8000)
@upstream(batch: {delay: 10, headers: []}, httpCache: 42)
- @link(id: "news", src: "news.proto", type: Protobuf) {
+ @link(id: "news", src: "news.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/grpc-json.md_merged.snap b/tests/core/snapshots/grpc-json.md_merged.snap
index 7c0e006055..9370a37bdc 100644
--- a/tests/core/snapshots/grpc-json.md_merged.snap
+++ b/tests/core/snapshots/grpc-json.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream @link(id: "news", src: "news.proto", type: Protobuf) {
+schema
+ @server(port: 8000)
+ @upstream
+ @link(id: "news", src: "news.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/grpc-map.md_merged.snap b/tests/core/snapshots/grpc-map.md_merged.snap
index 0e3bd11495..b791db9c41 100644
--- a/tests/core/snapshots/grpc-map.md_merged.snap
+++ b/tests/core/snapshots/grpc-map.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(port: 8000)
@upstream(batch: {delay: 10, headers: []}, httpCache: 42)
- @link(src: "map.proto", type: Protobuf) {
+ @link(src: "map.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/grpc-proto-with-same-package.md_merged.snap b/tests/core/snapshots/grpc-proto-with-same-package.md_merged.snap
index fea294c4d1..a32b6447cc 100644
--- a/tests/core/snapshots/grpc-proto-with-same-package.md_merged.snap
+++ b/tests/core/snapshots/grpc-proto-with-same-package.md_merged.snap
@@ -3,7 +3,12 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream @link(src: "foo.proto", type: Protobuf) @link(src: "bar.proto", type: Protobuf) {
+schema
+ @server(port: 8000)
+ @upstream
+ @link(src: "foo.proto", type: Protobuf)
+ @link(src: "bar.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/grpc-reflection.md_merged.snap b/tests/core/snapshots/grpc-reflection.md_merged.snap
index 45e6161a49..57ea49c45b 100644
--- a/tests/core/snapshots/grpc-reflection.md_merged.snap
+++ b/tests/core/snapshots/grpc-reflection.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream(httpCache: 42) @link(src: "http://localhost:50051", type: Grpc) {
+schema
+ @server(port: 8000)
+ @upstream(httpCache: 42)
+ @link(src: "http://localhost:50051", type: Grpc)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/grpc-simple.md_merged.snap b/tests/core/snapshots/grpc-simple.md_merged.snap
index 4a7096d633..7f1516b0b2 100644
--- a/tests/core/snapshots/grpc-simple.md_merged.snap
+++ b/tests/core/snapshots/grpc-simple.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(port: 8000)
@upstream(batch: {delay: 10, headers: []}, httpCache: 42)
- @link(id: "news", src: "news.proto", type: Protobuf) {
+ @link(id: "news", src: "news.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/grpc-url-from-upstream.md_merged.snap b/tests/core/snapshots/grpc-url-from-upstream.md_merged.snap
index ce7d6911d6..2ea9eb96c6 100644
--- a/tests/core/snapshots/grpc-url-from-upstream.md_merged.snap
+++ b/tests/core/snapshots/grpc-url-from-upstream.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(port: 8000)
@upstream(batch: {delay: 10, headers: []}, httpCache: 42)
- @link(id: "news", src: "news.proto", type: Protobuf) {
+ @link(id: "news", src: "news.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/http-select.md_merged.snap b/tests/core/snapshots/http-select.md_merged.snap
index e4d0762b3d..5ffd9a2ee0 100644
--- a/tests/core/snapshots/http-select.md_merged.snap
+++ b/tests/core/snapshots/http-select.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/inline-field.md_merged.snap b/tests/core/snapshots/inline-field.md_merged.snap
index b7d85eff28..e8b5be271b 100644
--- a/tests/core/snapshots/inline-field.md_merged.snap
+++ b/tests/core/snapshots/inline-field.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/inline-index-list.md_merged.snap b/tests/core/snapshots/inline-index-list.md_merged.snap
index f882d01595..1376c7d4de 100644
--- a/tests/core/snapshots/inline-index-list.md_merged.snap
+++ b/tests/core/snapshots/inline-index-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/inline-many-list.md_merged.snap b/tests/core/snapshots/inline-many-list.md_merged.snap
index abca133e5c..4d2477ff3e 100644
--- a/tests/core/snapshots/inline-many-list.md_merged.snap
+++ b/tests/core/snapshots/inline-many-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/inline-many.md_merged.snap b/tests/core/snapshots/inline-many.md_merged.snap
index ea4a72d0b9..0c301c8f9b 100644
--- a/tests/core/snapshots/inline-many.md_merged.snap
+++ b/tests/core/snapshots/inline-many.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_merged.snap b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_merged.snap
index 9405de31b1..dfdc759f54 100644
--- a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_merged.snap
+++ b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", introspection: false, port: 8001, queryValidation: false) @upstream(httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", introspection: false, port: 8001, queryValidation: false)
+ @upstream(httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/io-cache.md_merged.snap b/tests/core/snapshots/io-cache.md_merged.snap
index 2061e7c7d8..026ebe17a5 100644
--- a/tests/core/snapshots/io-cache.md_merged.snap
+++ b/tests/core/snapshots/io-cache.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) {
+schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/jit-enum-array.md_merged.snap b/tests/core/snapshots/jit-enum-array.md_merged.snap
index 7b5846a999..e8c7dcf8ae 100644
--- a/tests/core/snapshots/jit-enum-array.md_merged.snap
+++ b/tests/core/snapshots/jit-enum-array.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/js-directive.md_merged.snap b/tests/core/snapshots/js-directive.md_merged.snap
index 77a5c05e58..fa02cfee62 100644
--- a/tests/core/snapshots/js-directive.md_merged.snap
+++ b/tests/core/snapshots/js-directive.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream @link(src: "test.js", type: Script) {
+schema @server @upstream @link(src: "test.js", type: Script) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap b/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap
index 15677c3e90..6b6c3d17f3 100644
--- a/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap
+++ b/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) {
+schema
+ @server(hostname: "0.0.0.0", port: 8000)
+ @upstream(batch: {delay: 100, headers: []}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/merge-linked-config.md_merged.snap b/tests/core/snapshots/merge-linked-config.md_merged.snap
index a0eed4f4f4..5f6d99b9b0 100644
--- a/tests/core/snapshots/merge-linked-config.md_merged.snap
+++ b/tests/core/snapshots/merge-linked-config.md_merged.snap
@@ -7,7 +7,8 @@ schema
@server(port: 8000)
@upstream(batch: {delay: 10, headers: []}, httpCache: 10)
@link(src: "link-1.graphql", type: Config)
- @link(src: "link-2.graphql", type: Config) {
+ @link(src: "link-2.graphql", type: Config)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/modified-field.md_merged.snap b/tests/core/snapshots/modified-field.md_merged.snap
index 28da51b4ce..0b21161f76 100644
--- a/tests/core/snapshots/modified-field.md_merged.snap
+++ b/tests/core/snapshots/modified-field.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/mutation-put.md_merged.snap b/tests/core/snapshots/mutation-put.md_merged.snap
index 66deccd6c3..4042b46cd4 100644
--- a/tests/core/snapshots/mutation-put.md_merged.snap
+++ b/tests/core/snapshots/mutation-put.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/mutation.md_merged.snap b/tests/core/snapshots/mutation.md_merged.snap
index 3e22765196..11d913d37f 100644
--- a/tests/core/snapshots/mutation.md_merged.snap
+++ b/tests/core/snapshots/mutation.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/n-plus-one-list.md_merged.snap b/tests/core/snapshots/n-plus-one-list.md_merged.snap
index 5d5377c758..398cfd97e5 100644
--- a/tests/core/snapshots/n-plus-one-list.md_merged.snap
+++ b/tests/core/snapshots/n-plus-one-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/n-plus-one.md_merged.snap b/tests/core/snapshots/n-plus-one.md_merged.snap
index 5d5377c758..398cfd97e5 100644
--- a/tests/core/snapshots/n-plus-one.md_merged.snap
+++ b/tests/core/snapshots/n-plus-one.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/nested-objects.md_merged.snap b/tests/core/snapshots/nested-objects.md_merged.snap
index 24d851ab08..5e81dd09bc 100644
--- a/tests/core/snapshots/nested-objects.md_merged.snap
+++ b/tests/core/snapshots/nested-objects.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/nested-recursive-types.md_merged.snap b/tests/core/snapshots/nested-recursive-types.md_merged.snap
index 2904c9f4c0..ee87d26ab4 100644
--- a/tests/core/snapshots/nested-recursive-types.md_merged.snap
+++ b/tests/core/snapshots/nested-recursive-types.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/nesting-level3.md_merged.snap b/tests/core/snapshots/nesting-level3.md_merged.snap
index 5d06891c89..353ac3ac1d 100644
--- a/tests/core/snapshots/nesting-level3.md_merged.snap
+++ b/tests/core/snapshots/nesting-level3.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/nullable-arg-query.md_merged.snap b/tests/core/snapshots/nullable-arg-query.md_merged.snap
index 49b909205c..0b1727e22e 100644
--- a/tests/core/snapshots/nullable-arg-query.md_merged.snap
+++ b/tests/core/snapshots/nullable-arg-query.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/omit-index-list.md_merged.snap b/tests/core/snapshots/omit-index-list.md_merged.snap
index f882d01595..1376c7d4de 100644
--- a/tests/core/snapshots/omit-index-list.md_merged.snap
+++ b/tests/core/snapshots/omit-index-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/omit-many.md_merged.snap b/tests/core/snapshots/omit-many.md_merged.snap
index a74b2b4107..5cabe2f802 100644
--- a/tests/core/snapshots/omit-many.md_merged.snap
+++ b/tests/core/snapshots/omit-many.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/omit-resolved-by-parent.md_merged.snap b/tests/core/snapshots/omit-resolved-by-parent.md_merged.snap
index 199f9cf9ec..dbb3531970 100644
--- a/tests/core/snapshots/omit-resolved-by-parent.md_merged.snap
+++ b/tests/core/snapshots/omit-resolved-by-parent.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/on-response-body-grpc.md_merged.snap b/tests/core/snapshots/on-response-body-grpc.md_merged.snap
index 3d4a34a30f..9cfd7f7175 100644
--- a/tests/core/snapshots/on-response-body-grpc.md_merged.snap
+++ b/tests/core/snapshots/on-response-body-grpc.md_merged.snap
@@ -7,7 +7,8 @@ schema
@server(port: 8000)
@upstream
@link(src: "test.js", type: Script)
- @link(id: "news", src: "news.proto", type: Protobuf) {
+ @link(id: "news", src: "news.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/recursive-types.md_merged.snap b/tests/core/snapshots/recursive-types.md_merged.snap
index 90280f57c1..c9ec5746ad 100644
--- a/tests/core/snapshots/recursive-types.md_merged.snap
+++ b/tests/core/snapshots/recursive-types.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/ref-other-nested.md_merged.snap b/tests/core/snapshots/ref-other-nested.md_merged.snap
index c3edd81b2a..11655ca159 100644
--- a/tests/core/snapshots/ref-other-nested.md_merged.snap
+++ b/tests/core/snapshots/ref-other-nested.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/ref-other.md_merged.snap b/tests/core/snapshots/ref-other.md_merged.snap
index 78690ebe85..40d97ea168 100644
--- a/tests/core/snapshots/ref-other.md_merged.snap
+++ b/tests/core/snapshots/ref-other.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/related-fields-recursive.md_merged.snap b/tests/core/snapshots/related-fields-recursive.md_merged.snap
index 42aea91f01..6ffd6bd92b 100644
--- a/tests/core/snapshots/related-fields-recursive.md_merged.snap
+++ b/tests/core/snapshots/related-fields-recursive.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8000) @upstream {
+schema @server(hostname: "0.0.0.0", port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/rename-field.md_merged.snap b/tests/core/snapshots/rename-field.md_merged.snap
index cbb865262c..ba7e78ef37 100644
--- a/tests/core/snapshots/rename-field.md_merged.snap
+++ b/tests/core/snapshots/rename-field.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/request-to-upstream-batching.md_merged.snap b/tests/core/snapshots/request-to-upstream-batching.md_merged.snap
index 0a9c1d0551..9fa6877f80 100644
--- a/tests/core/snapshots/request-to-upstream-batching.md_merged.snap
+++ b/tests/core/snapshots/request-to-upstream-batching.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(batchRequests: true) @upstream(batch: {delay: 1, headers: [], maxSize: 100}) {
+schema
+ @server(batchRequests: true)
+ @upstream(batch: {delay: 1, headers: [], maxSize: 100})
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/resolve-with-headers.md_merged.snap b/tests/core/snapshots/resolve-with-headers.md_merged.snap
index 361f24f57b..70994bd242 100644
--- a/tests/core/snapshots/resolve-with-headers.md_merged.snap
+++ b/tests/core/snapshots/resolve-with-headers.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(allowedHeaders: ["authorization"]) {
+schema @server @upstream(allowedHeaders: ["authorization"]) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/resolve-with-vars.md_merged.snap b/tests/core/snapshots/resolve-with-vars.md_merged.snap
index 61fe670e22..9b2ff220b3 100644
--- a/tests/core/snapshots/resolve-with-vars.md_merged.snap
+++ b/tests/core/snapshots/resolve-with-vars.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(vars: [{key: "id", value: "1"}]) @upstream {
+schema @server(vars: [{key: "id", value: "1"}]) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/resolved-by-parent.md_merged.snap b/tests/core/snapshots/resolved-by-parent.md_merged.snap
index 199f9cf9ec..dbb3531970 100644
--- a/tests/core/snapshots/resolved-by-parent.md_merged.snap
+++ b/tests/core/snapshots/resolved-by-parent.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/rest-api-error.md_merged.snap b/tests/core/snapshots/rest-api-error.md_merged.snap
index 2453ce5576..fc62704599 100644
--- a/tests/core/snapshots/rest-api-error.md_merged.snap
+++ b/tests/core/snapshots/rest-api-error.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream @link(src: "operation-user.graphql", type: Operation) {
+schema
+ @server
+ @upstream
+ @link(src: "operation-user.graphql", type: Operation)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/rest-api-post.md_merged.snap b/tests/core/snapshots/rest-api-post.md_merged.snap
index 2453ce5576..fc62704599 100644
--- a/tests/core/snapshots/rest-api-post.md_merged.snap
+++ b/tests/core/snapshots/rest-api-post.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream @link(src: "operation-user.graphql", type: Operation) {
+schema
+ @server
+ @upstream
+ @link(src: "operation-user.graphql", type: Operation)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/rest-api.md_merged.snap b/tests/core/snapshots/rest-api.md_merged.snap
index 2453ce5576..fc62704599 100644
--- a/tests/core/snapshots/rest-api.md_merged.snap
+++ b/tests/core/snapshots/rest-api.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream @link(src: "operation-user.graphql", type: Operation) {
+schema
+ @server
+ @upstream
+ @link(src: "operation-user.graphql", type: Operation)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/routes-param-on-server-directive.md_merged.snap b/tests/core/snapshots/routes-param-on-server-directive.md_merged.snap
index 810e4fc388..3ad6e7548d 100644
--- a/tests/core/snapshots/routes-param-on-server-directive.md_merged.snap
+++ b/tests/core/snapshots/routes-param-on-server-directive.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000, routes: {status: "/health", graphQL: "/tailcall-gql"}) @upstream {
+schema
+ @server(port: 8000, routes: {status: "/health", graphQL: "/tailcall-gql"})
+ @upstream
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/showcase.md_merged.snap b/tests/core/snapshots/showcase.md_merged.snap
index f4494af99b..46ec61ecc6 100644
--- a/tests/core/snapshots/showcase.md_merged.snap
+++ b/tests/core/snapshots/showcase.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(showcase: true) @upstream {
+schema @server(showcase: true) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/simple-graphql.md_merged.snap b/tests/core/snapshots/simple-graphql.md_merged.snap
index e498e56248..ce99160b3a 100644
--- a/tests/core/snapshots/simple-graphql.md_merged.snap
+++ b/tests/core/snapshots/simple-graphql.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/simple-query.md_merged.snap b/tests/core/snapshots/simple-query.md_merged.snap
index 8be9e9164e..f26a5668ad 100644
--- a/tests/core/snapshots/simple-query.md_merged.snap
+++ b/tests/core/snapshots/simple-query.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-add-field-list.md_merged.snap b/tests/core/snapshots/test-add-field-list.md_merged.snap
index c7c321da44..c128e63122 100644
--- a/tests/core/snapshots/test-add-field-list.md_merged.snap
+++ b/tests/core/snapshots/test-add-field-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-add-field.md_merged.snap b/tests/core/snapshots/test-add-field.md_merged.snap
index 11af3abefd..bf49df30f4 100644
--- a/tests/core/snapshots/test-add-field.md_merged.snap
+++ b/tests/core/snapshots/test-add-field.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-add-link-to-empty-config.md_merged.snap b/tests/core/snapshots/test-add-link-to-empty-config.md_merged.snap
index 0ef42d8708..200a825dcd 100644
--- a/tests/core/snapshots/test-add-link-to-empty-config.md_merged.snap
+++ b/tests/core/snapshots/test-add-link-to-empty-config.md_merged.snap
@@ -3,7 +3,12 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream @link(src: "link-expr.graphql", type: Config) @link(src: "link-enum.graphql", type: Config) {
+schema
+ @server
+ @upstream
+ @link(src: "link-expr.graphql", type: Config)
+ @link(src: "link-enum.graphql", type: Config)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-alias-on-enum.md_merged.snap b/tests/core/snapshots/test-alias-on-enum.md_merged.snap
index 1bd78119ae..775f02ffcf 100644
--- a/tests/core/snapshots/test-alias-on-enum.md_merged.snap
+++ b/tests/core/snapshots/test-alias-on-enum.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(batchRequests: true) @upstream(batch: {delay: 1, headers: [], maxSize: 100}) {
+schema
+ @server(batchRequests: true)
+ @upstream(batch: {delay: 1, headers: [], maxSize: 100})
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-batching-group-by.md_merged.snap b/tests/core/snapshots/test-batching-group-by.md_merged.snap
index b9155f38bb..5ed4a0bf35 100644
--- a/tests/core/snapshots/test-batching-group-by.md_merged.snap
+++ b/tests/core/snapshots/test-batching-group-by.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 4000) @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+schema
+ @server(port: 4000)
+ @upstream(batch: {delay: 1, headers: [], maxSize: 1000})
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-cache.md_merged.snap b/tests/core/snapshots/test-cache.md_merged.snap
index 4d3a1e4f9d..6b2a662e06 100644
--- a/tests/core/snapshots/test-cache.md_merged.snap
+++ b/tests/core/snapshots/test-cache.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-custom-scalar.md_merged.snap b/tests/core/snapshots/test-custom-scalar.md_merged.snap
index 57b604fd2d..d30a534848 100644
--- a/tests/core/snapshots/test-custom-scalar.md_merged.snap
+++ b/tests/core/snapshots/test-custom-scalar.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-custom-types.md_merged.snap b/tests/core/snapshots/test-custom-types.md_merged.snap
index ffecbfc28b..c18d9c03a4 100644
--- a/tests/core/snapshots/test-custom-types.md_merged.snap
+++ b/tests/core/snapshots/test-custom-types.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Que
mutation: Mut
}
diff --git a/tests/core/snapshots/test-dbl-usage-many.md_merged.snap b/tests/core/snapshots/test-dbl-usage-many.md_merged.snap
index 10f595a49d..52f5ebcedf 100644
--- a/tests/core/snapshots/test-dbl-usage-many.md_merged.snap
+++ b/tests/core/snapshots/test-dbl-usage-many.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-dedupe.md_merged.snap b/tests/core/snapshots/test-dedupe.md_merged.snap
index 236a2c900b..ef3dd4515a 100644
--- a/tests/core/snapshots/test-dedupe.md_merged.snap
+++ b/tests/core/snapshots/test-dedupe.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream(batch: {delay: 1, headers: []}) {
+schema @server(port: 8000) @upstream(batch: {delay: 1, headers: []}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-description-many.md_merged.snap b/tests/core/snapshots/test-description-many.md_merged.snap
index 7b2691b392..97546bd874 100644
--- a/tests/core/snapshots/test-description-many.md_merged.snap
+++ b/tests/core/snapshots/test-description-many.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-enable-jit.md_merged.snap b/tests/core/snapshots/test-enable-jit.md_merged.snap
index 99a8a80fcb..34b39c9706 100644
--- a/tests/core/snapshots/test-enable-jit.md_merged.snap
+++ b/tests/core/snapshots/test-enable-jit.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "0.0.0.0", port: 8000) @upstream {
+schema @server(hostname: "0.0.0.0", port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-enum-aliases.md_merged.snap b/tests/core/snapshots/test-enum-aliases.md_merged.snap
index 91e46e9261..ac0bb9a2cd 100644
--- a/tests/core/snapshots/test-enum-aliases.md_merged.snap
+++ b/tests/core/snapshots/test-enum-aliases.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-enum-as-argument.md_merged.snap b/tests/core/snapshots/test-enum-as-argument.md_merged.snap
index f7b74c6ca2..8285fdddbf 100644
--- a/tests/core/snapshots/test-enum-as-argument.md_merged.snap
+++ b/tests/core/snapshots/test-enum-as-argument.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-enum-default.md_merged.snap b/tests/core/snapshots/test-enum-default.md_merged.snap
index 20c33a1ae6..ef634cb22d 100644
--- a/tests/core/snapshots/test-enum-default.md_merged.snap
+++ b/tests/core/snapshots/test-enum-default.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(port: 8080)
@upstream(batch: {delay: 10, headers: []}, httpCache: 42)
- @link(id: "news", src: "./service.proto", type: Protobuf) {
+ @link(id: "news", src: "./service.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-enum-description.md_merged.snap b/tests/core/snapshots/test-enum-description.md_merged.snap
index f8ce409f4d..0477ff563a 100644
--- a/tests/core/snapshots/test-enum-description.md_merged.snap
+++ b/tests/core/snapshots/test-enum-description.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-enum-merge.md_client.snap b/tests/core/snapshots/test-enum-merge.md_client.snap
new file mode 100644
index 0000000000..e29c78b5ab
--- /dev/null
+++ b/tests/core/snapshots/test-enum-merge.md_client.snap
@@ -0,0 +1,18 @@
+---
+source: tests/core/spec.rs
+expression: formatted
+snapshot_kind: text
+---
+enum Foo {
+ BAR
+ BAZ
+ BOOM
+}
+
+type Query {
+ foo: Foo
+}
+
+schema {
+ query: Query
+}
diff --git a/tests/core/snapshots/test-enum-merge.md_merged.snap b/tests/core/snapshots/test-enum-merge.md_merged.snap
index fc8d316853..3e12e99b89 100644
--- a/tests/core/snapshots/test-enum-merge.md_merged.snap
+++ b/tests/core/snapshots/test-enum-merge.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) @link(src: "schema_1.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-enum.md_merged.snap b/tests/core/snapshots/test-enum.md_merged.snap
index dbd1544547..3164ac2457 100644
--- a/tests/core/snapshots/test-enum.md_merged.snap
+++ b/tests/core/snapshots/test-enum.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-eval-partial.md_merged.snap b/tests/core/snapshots/test-eval-partial.md_merged.snap
index 1ee42b866e..3783a2f59d 100644
--- a/tests/core/snapshots/test-eval-partial.md_merged.snap
+++ b/tests/core/snapshots/test-eval-partial.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8080) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) {
+schema
+ @server(port: 8080)
+ @upstream(batch: {delay: 100, headers: []}, httpCache: 42)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-expr-scalar-as-string.md_merged.snap b/tests/core/snapshots/test-expr-scalar-as-string.md_merged.snap
index 27657666e1..3893de52d5 100644
--- a/tests/core/snapshots/test-expr-scalar-as-string.md_merged.snap
+++ b/tests/core/snapshots/test-expr-scalar-as-string.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-expr-with-mustache.md_merged.snap b/tests/core/snapshots/test-expr-with-mustache.md_merged.snap
index b59bb7f1e2..0d7b1c5a2f 100644
--- a/tests/core/snapshots/test-expr-with-mustache.md_merged.snap
+++ b/tests/core/snapshots/test-expr-with-mustache.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-expr.md_merged.snap b/tests/core/snapshots/test-expr.md_merged.snap
index 3ddfdaa657..11a3f7e49d 100644
--- a/tests/core/snapshots/test-expr.md_merged.snap
+++ b/tests/core/snapshots/test-expr.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-graphqlsource.md_merged.snap b/tests/core/snapshots/test-graphqlsource.md_merged.snap
index a66230f9ca..b6e40d04f4 100644
--- a/tests/core/snapshots/test-graphqlsource.md_merged.snap
+++ b/tests/core/snapshots/test-graphqlsource.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-grpc.md_merged.snap b/tests/core/snapshots/test-grpc.md_merged.snap
index 41d30bb609..dd74aec697 100644
--- a/tests/core/snapshots/test-grpc.md_merged.snap
+++ b/tests/core/snapshots/test-grpc.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(port: 8000)
@upstream(batch: {delay: 10, headers: [], maxSize: 1000})
- @link(id: "news", src: "news.proto", type: Protobuf) {
+ @link(id: "news", src: "news.proto", type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-http-baseurl.md_merged.snap b/tests/core/snapshots/test-http-baseurl.md_merged.snap
index cc47be3bf5..7934ec4890 100644
--- a/tests/core/snapshots/test-http-baseurl.md_merged.snap
+++ b/tests/core/snapshots/test-http-baseurl.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-http-batchKey.md_merged.snap b/tests/core/snapshots/test-http-batchKey.md_merged.snap
index db32d6cc8b..b5107d8123 100644
--- a/tests/core/snapshots/test-http-batchKey.md_merged.snap
+++ b/tests/core/snapshots/test-http-batchKey.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream(batch: {delay: 10, headers: [], maxSize: 1000}) {
+schema
+ @server(port: 8000)
+ @upstream(batch: {delay: 10, headers: [], maxSize: 1000})
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-http-headers.md_merged.snap b/tests/core/snapshots/test-http-headers.md_merged.snap
index c37ce5693a..6e4f640f7f 100644
--- a/tests/core/snapshots/test-http-headers.md_merged.snap
+++ b/tests/core/snapshots/test-http-headers.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-http-tmpl.md_merged.snap b/tests/core/snapshots/test-http-tmpl.md_merged.snap
index 433090ad72..e22bcd5d6d 100644
--- a/tests/core/snapshots/test-http-tmpl.md_merged.snap
+++ b/tests/core/snapshots/test-http-tmpl.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-http-with-mustache-expr.md_merged.snap b/tests/core/snapshots/test-http-with-mustache-expr.md_merged.snap
index 1d8d5bf889..00d6124b55 100644
--- a/tests/core/snapshots/test-http-with-mustache-expr.md_merged.snap
+++ b/tests/core/snapshots/test-http-with-mustache-expr.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-http.md_merged.snap b/tests/core/snapshots/test-http.md_merged.snap
index cd22df357e..ce1dbe9a1e 100644
--- a/tests/core/snapshots/test-http.md_merged.snap
+++ b/tests/core/snapshots/test-http.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-inline-list.md_merged.snap b/tests/core/snapshots/test-inline-list.md_merged.snap
index 91c70844e4..6e6dea3de0 100644
--- a/tests/core/snapshots/test-inline-list.md_merged.snap
+++ b/tests/core/snapshots/test-inline-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-inline.md_merged.snap b/tests/core/snapshots/test-inline.md_merged.snap
index 4109c5111c..1c864cb7c2 100644
--- a/tests/core/snapshots/test-inline.md_merged.snap
+++ b/tests/core/snapshots/test-inline.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-input-documentation.md_merged.snap b/tests/core/snapshots/test-input-documentation.md_merged.snap
index 8fcbe93e49..e1b814c4ce 100644
--- a/tests/core/snapshots/test-input-documentation.md_merged.snap
+++ b/tests/core/snapshots/test-input-documentation.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
mutation: Mutation
}
diff --git a/tests/core/snapshots/test-input-out.md_merged.snap b/tests/core/snapshots/test-input-out.md_merged.snap
index 12b686f37a..35e88b7bd5 100644
--- a/tests/core/snapshots/test-input-out.md_merged.snap
+++ b/tests/core/snapshots/test-input-out.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-input-with-arg-out.md_merged.snap b/tests/core/snapshots/test-input-with-arg-out.md_merged.snap
index 25c6801da3..1f3fbd938d 100644
--- a/tests/core/snapshots/test-input-with-arg-out.md_merged.snap
+++ b/tests/core/snapshots/test-input-with-arg-out.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-interface-result.md_merged.snap b/tests/core/snapshots/test-interface-result.md_merged.snap
index 9596ef2ad4..b1ca4d7bc2 100644
--- a/tests/core/snapshots/test-interface-result.md_merged.snap
+++ b/tests/core/snapshots/test-interface-result.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-interface.md_merged.snap b/tests/core/snapshots/test-interface.md_merged.snap
index 5ffda913b3..c8e7299bce 100644
--- a/tests/core/snapshots/test-interface.md_merged.snap
+++ b/tests/core/snapshots/test-interface.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-js-multi-onRequest-handlers.md_merged.snap b/tests/core/snapshots/test-js-multi-onRequest-handlers.md_merged.snap
index d517ca727e..e85cb2c0f0 100644
--- a/tests/core/snapshots/test-js-multi-onRequest-handlers.md_merged.snap
+++ b/tests/core/snapshots/test-js-multi-onRequest-handlers.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(onRequest: "foo") @link(src: "test1.js", type: Script) {
+schema
+ @server
+ @upstream(onRequest: "foo")
+ @link(src: "test1.js", type: Script)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-js-request-response-2.md_merged.snap b/tests/core/snapshots/test-js-request-response-2.md_merged.snap
index 3dc3fa9b99..cf9fc01cf9 100644
--- a/tests/core/snapshots/test-js-request-response-2.md_merged.snap
+++ b/tests/core/snapshots/test-js-request-response-2.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(onRequest: "onRequest") @link(src: "test.js", type: Script) {
+schema
+ @server
+ @upstream(onRequest: "onRequest")
+ @link(src: "test.js", type: Script)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-js-request-response.md_merged.snap b/tests/core/snapshots/test-js-request-response.md_merged.snap
index 3dc3fa9b99..cf9fc01cf9 100644
--- a/tests/core/snapshots/test-js-request-response.md_merged.snap
+++ b/tests/core/snapshots/test-js-request-response.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(onRequest: "onRequest") @link(src: "test.js", type: Script) {
+schema
+ @server
+ @upstream(onRequest: "onRequest")
+ @link(src: "test.js", type: Script)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-link-support.md_merged.snap b/tests/core/snapshots/test-link-support.md_merged.snap
index b634ff91a3..4bb30e16ed 100644
--- a/tests/core/snapshots/test-link-support.md_merged.snap
+++ b/tests/core/snapshots/test-link-support.md_merged.snap
@@ -6,7 +6,8 @@ snapshot_kind: text
schema
@server(port: 8000)
@upstream(batch: {delay: 10, headers: [], maxSize: 1000})
- @link(id: "news", src: "news.proto", meta: {description: "Test"}, type: Protobuf) {
+ @link(id: "news", src: "news.proto", meta: {description: "Test"}, type: Protobuf)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-list-args.md_merged.snap b/tests/core/snapshots/test-list-args.md_merged.snap
index 251187ef8d..a79e1fdd13 100644
--- a/tests/core/snapshots/test-list-args.md_merged.snap
+++ b/tests/core/snapshots/test-list-args.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(queryValidation: true) @upstream {
+schema @server(queryValidation: true) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-merge-input.md_client.snap b/tests/core/snapshots/test-merge-input.md_client.snap
new file mode 100644
index 0000000000..e91f41973f
--- /dev/null
+++ b/tests/core/snapshots/test-merge-input.md_client.snap
@@ -0,0 +1,16 @@
+---
+source: tests/core/spec.rs
+expression: formatted
+snapshot_kind: text
+---
+type Query {
+ foo(x: Test): Boolean
+}
+
+input Test {
+ b: String
+}
+
+schema {
+ query: Query
+}
diff --git a/tests/core/snapshots/test-merge-input.md_merged.snap b/tests/core/snapshots/test-merge-input.md_merged.snap
index 38d084b008..703f562e8d 100644
--- a/tests/core/snapshots/test-merge-input.md_merged.snap
+++ b/tests/core/snapshots/test-merge-input.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) @link(src: "schema_1.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-merge-nested.md_client.snap b/tests/core/snapshots/test-merge-nested.md_client.snap
new file mode 100644
index 0000000000..84e2c05dc5
--- /dev/null
+++ b/tests/core/snapshots/test-merge-nested.md_client.snap
@@ -0,0 +1,23 @@
+---
+source: tests/core/spec.rs
+expression: formatted
+snapshot_kind: text
+---
+type Foo {
+ """
+ test2
+ """
+ a: String
+ """
+ test1
+ """
+ b: String
+}
+
+type Query {
+ hi: Foo
+}
+
+schema {
+ query: Query
+}
diff --git a/tests/core/snapshots/test-merge-nested.md_merged.snap b/tests/core/snapshots/test-merge-nested.md_merged.snap
index a280778f39..65af0ac9b8 100644
--- a/tests/core/snapshots/test-merge-nested.md_merged.snap
+++ b/tests/core/snapshots/test-merge-nested.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) @link(src: "schema_1.graphql", type: Config) {
query: Query
}
@@ -19,5 +19,5 @@ type Foo {
}
type Query {
- hi: Foo @expr(body: "world") @expr(body: {a: "world"})
+ hi: Foo @expr(body: {b: "hello"}) @expr(body: {a: "world"})
}
diff --git a/tests/core/snapshots/test-merge-right-with-link-config.md_merged.snap b/tests/core/snapshots/test-merge-right-with-link-config.md_merged.snap
index 43a8b80655..b68ed716fd 100644
--- a/tests/core/snapshots/test-merge-right-with-link-config.md_merged.snap
+++ b/tests/core/snapshots/test-merge-right-with-link-config.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(allowedHeaders: ["Authorization"]) @link(src: "stripe-types.graphql", type: Config) {
+schema
+ @server
+ @upstream(allowedHeaders: ["Authorization"])
+ @link(src: "stripe-types.graphql", type: Config)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-merge-server-sdl.md_merged.snap b/tests/core/snapshots/test-merge-server-sdl.md_merged.snap
index cd22df357e..ce1dbe9a1e 100644
--- a/tests/core/snapshots/test-merge-server-sdl.md_merged.snap
+++ b/tests/core/snapshots/test-merge-server-sdl.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-merge-union.md_client.snap b/tests/core/snapshots/test-merge-union.md_client.snap
new file mode 100644
index 0000000000..7bb3dc2334
--- /dev/null
+++ b/tests/core/snapshots/test-merge-union.md_client.snap
@@ -0,0 +1,27 @@
+---
+source: tests/core/spec.rs
+expression: formatted
+snapshot_kind: text
+---
+type Bar {
+ bar: String
+}
+
+type Baz {
+ baz: String
+}
+
+type Foo {
+ a: String
+ foo: String
+}
+
+union FooBar = Bar | Baz | Foo
+
+type Query {
+ foo: FooBar
+}
+
+schema {
+ query: Query
+}
diff --git a/tests/core/snapshots/test-merge-union.md_merged.snap b/tests/core/snapshots/test-merge-union.md_merged.snap
index 0cbf042e85..862ae2c88c 100644
--- a/tests/core/snapshots/test-merge-union.md_merged.snap
+++ b/tests/core/snapshots/test-merge-union.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) @link(src: "schema_1.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-modify.md_merged.snap b/tests/core/snapshots/test-modify.md_merged.snap
index 67ea796b33..0fe7dd050f 100644
--- a/tests/core/snapshots/test-modify.md_merged.snap
+++ b/tests/core/snapshots/test-modify.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-multi-interface.md_merged.snap b/tests/core/snapshots/test-multi-interface.md_merged.snap
index 583c0a5edb..868e1a4488 100644
--- a/tests/core/snapshots/test-multi-interface.md_merged.snap
+++ b/tests/core/snapshots/test-multi-interface.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-multiple-config-types.md_merged.snap b/tests/core/snapshots/test-multiple-config-types.md_merged.snap
index e05036c91a..1e40c9807f 100644
--- a/tests/core/snapshots/test-multiple-config-types.md_merged.snap
+++ b/tests/core/snapshots/test-multiple-config-types.md_merged.snap
@@ -3,7 +3,11 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream @link(id: "types", src: "types.graphql", type: Config) {
+schema
+ @server
+ @upstream
+ @link(id: "types", src: "types.graphql", type: Config)
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-multiple-resolvable-directives-on-field.md_merged.snap b/tests/core/snapshots/test-multiple-resolvable-directives-on-field.md_merged.snap
index 36b39ceaef..ea37cecba3 100644
--- a/tests/core/snapshots/test-multiple-resolvable-directives-on-field.md_merged.snap
+++ b/tests/core/snapshots/test-multiple-resolvable-directives-on-field.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-nested-input.md_merged.snap b/tests/core/snapshots/test-nested-input.md_merged.snap
index f1af17927d..ccb9033afe 100644
--- a/tests/core/snapshots/test-nested-input.md_merged.snap
+++ b/tests/core/snapshots/test-nested-input.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-nested-value.md_merged.snap b/tests/core/snapshots/test-nested-value.md_merged.snap
index f81545e195..54422e6a77 100644
--- a/tests/core/snapshots/test-nested-value.md_merged.snap
+++ b/tests/core/snapshots/test-nested-value.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-null-in-array.md_merged.snap b/tests/core/snapshots/test-null-in-array.md_merged.snap
index 09c71a8e3f..c867bc0212 100644
--- a/tests/core/snapshots/test-null-in-array.md_merged.snap
+++ b/tests/core/snapshots/test-null-in-array.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-null-in-object.md_merged.snap b/tests/core/snapshots/test-null-in-object.md_merged.snap
index fca5bf4c96..3415f6ba1d 100644
--- a/tests/core/snapshots/test-null-in-object.md_merged.snap
+++ b/tests/core/snapshots/test-null-in-object.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-omit-list.md_merged.snap b/tests/core/snapshots/test-omit-list.md_merged.snap
index 1064d17850..a204ba4f95 100644
--- a/tests/core/snapshots/test-omit-list.md_merged.snap
+++ b/tests/core/snapshots/test-omit-list.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-omit.md_merged.snap b/tests/core/snapshots/test-omit.md_merged.snap
index f6a93ab9fc..0a4eb39ea0 100644
--- a/tests/core/snapshots/test-omit.md_merged.snap
+++ b/tests/core/snapshots/test-omit.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-on-response-body.md_merged.snap b/tests/core/snapshots/test-on-response-body.md_merged.snap
index 8e6a03e6db..7e73e1f591 100644
--- a/tests/core/snapshots/test-on-response-body.md_merged.snap
+++ b/tests/core/snapshots/test-on-response-body.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream @link(src: "test.js", type: Script) {
+schema @server @upstream @link(src: "test.js", type: Script) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-optional-key-skip-empty.md_merged.snap b/tests/core/snapshots/test-optional-key-skip-empty.md_merged.snap
index 8cef87639a..5ab1ee172b 100644
--- a/tests/core/snapshots/test-optional-key-skip-empty.md_merged.snap
+++ b/tests/core/snapshots/test-optional-key-skip-empty.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream {
+schema @server(port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-params-as-body.md_merged.snap b/tests/core/snapshots/test-params-as-body.md_merged.snap
index 72da37e0d5..e7b8377b62 100644
--- a/tests/core/snapshots/test-params-as-body.md_merged.snap
+++ b/tests/core/snapshots/test-params-as-body.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream {
+schema @server(port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-query-documentation.md_merged.snap b/tests/core/snapshots/test-query-documentation.md_merged.snap
index 3ff8b266ed..72a7be2511 100644
--- a/tests/core/snapshots/test-query-documentation.md_merged.snap
+++ b/tests/core/snapshots/test-query-documentation.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-query.md_merged.snap b/tests/core/snapshots/test-query.md_merged.snap
index 964f29c16d..6422bd18e5 100644
--- a/tests/core/snapshots/test-query.md_merged.snap
+++ b/tests/core/snapshots/test-query.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-ref-other.md_merged.snap b/tests/core/snapshots/test-ref-other.md_merged.snap
index b68ace1656..8afce89520 100644
--- a/tests/core/snapshots/test-ref-other.md_merged.snap
+++ b/tests/core/snapshots/test-ref-other.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8000) @upstream {
+schema @server(port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-required-fields.md_merged.snap b/tests/core/snapshots/test-required-fields.md_merged.snap
index 5cb6c7f4f3..3b0133bc57 100644
--- a/tests/core/snapshots/test-required-fields.md_merged.snap
+++ b/tests/core/snapshots/test-required-fields.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-scalars-builtin.md_merged.snap b/tests/core/snapshots/test-scalars-builtin.md_merged.snap
index f279807bdd..3c4c1e54ee 100644
--- a/tests/core/snapshots/test-scalars-builtin.md_merged.snap
+++ b/tests/core/snapshots/test-scalars-builtin.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "localhost", port: 8000) @upstream {
+schema @server(hostname: "localhost", port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-scalars-integers.md_merged.snap b/tests/core/snapshots/test-scalars-integers.md_merged.snap
index 76f051652f..a66779c3bc 100644
--- a/tests/core/snapshots/test-scalars-integers.md_merged.snap
+++ b/tests/core/snapshots/test-scalars-integers.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "localhost", port: 8000) @upstream {
+schema @server(hostname: "localhost", port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-scalars-validation.md_merged.snap b/tests/core/snapshots/test-scalars-validation.md_merged.snap
index e03035e098..531c455f99 100644
--- a/tests/core/snapshots/test-scalars-validation.md_merged.snap
+++ b/tests/core/snapshots/test-scalars-validation.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "localhost", port: 8000) @upstream {
+schema @server(hostname: "localhost", port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-scalars.md_merged.snap b/tests/core/snapshots/test-scalars.md_merged.snap
index 5059882fea..e8ad454d53 100644
--- a/tests/core/snapshots/test-scalars.md_merged.snap
+++ b/tests/core/snapshots/test-scalars.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(hostname: "localhost", port: 8000) @upstream {
+schema @server(hostname: "localhost", port: 8000) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-server-vars.md_merged.snap b/tests/core/snapshots/test-server-vars.md_merged.snap
index 9e747b7c71..77c3706e23 100644
--- a/tests/core/snapshots/test-server-vars.md_merged.snap
+++ b/tests/core/snapshots/test-server-vars.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(vars: [{key: "foo", value: "bar"}]) @upstream {
+schema @server(vars: [{key: "foo", value: "bar"}]) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-set-cookie-headers.md_merged.snap b/tests/core/snapshots/test-set-cookie-headers.md_merged.snap
index 4fc810e0d0..e9b8fd2bb2 100644
--- a/tests/core/snapshots/test-set-cookie-headers.md_merged.snap
+++ b/tests/core/snapshots/test-set-cookie-headers.md_merged.snap
@@ -3,7 +3,10 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(headers: {setCookies: true}, hostname: "0.0.0.0", port: 8080) @upstream {
+schema
+ @server(headers: {setCookies: true}, hostname: "0.0.0.0", port: 8080)
+ @upstream
+ @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-union-ambiguous.md_merged.snap b/tests/core/snapshots/test-union-ambiguous.md_merged.snap
index 585c8182bc..c1a352f4c5 100644
--- a/tests/core/snapshots/test-union-ambiguous.md_merged.snap
+++ b/tests/core/snapshots/test-union-ambiguous.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-union-fieldtype.md_merged.snap b/tests/core/snapshots/test-union-fieldtype.md_merged.snap
index 13628d0617..88ed3f8165 100644
--- a/tests/core/snapshots/test-union-fieldtype.md_merged.snap
+++ b/tests/core/snapshots/test-union-fieldtype.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-union-optional.md_merged.snap b/tests/core/snapshots/test-union-optional.md_merged.snap
index 308b79562d..1255482781 100644
--- a/tests/core/snapshots/test-union-optional.md_merged.snap
+++ b/tests/core/snapshots/test-union-optional.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-union.md_merged.snap b/tests/core/snapshots/test-union.md_merged.snap
index 13628d0617..88ed3f8165 100644
--- a/tests/core/snapshots/test-union.md_merged.snap
+++ b/tests/core/snapshots/test-union.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-upstream-headers.md_merged.snap b/tests/core/snapshots/test-upstream-headers.md_merged.snap
index 9e2217c6c9..d4b63dc53e 100644
--- a/tests/core/snapshots/test-upstream-headers.md_merged.snap
+++ b/tests/core/snapshots/test-upstream-headers.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(allowedHeaders: ["X-bar", "x-foo"]) {
+schema @server @upstream(allowedHeaders: ["X-bar", "x-foo"]) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/test-upstream.md_merged.snap b/tests/core/snapshots/test-upstream.md_merged.snap
index 608b9a2957..53fd82388a 100644
--- a/tests/core/snapshots/test-upstream.md_merged.snap
+++ b/tests/core/snapshots/test-upstream.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(proxy: {url: "http://localhost:8085"}) {
+schema @server @upstream(proxy: {url: "http://localhost:8085"}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/union-nested-resolver.md_merged.snap b/tests/core/snapshots/union-nested-resolver.md_merged.snap
index cad916ee6e..f6054b0814 100644
--- a/tests/core/snapshots/union-nested-resolver.md_merged.snap
+++ b/tests/core/snapshots/union-nested-resolver.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server(port: 8030) @upstream {
+schema @server(port: 8030) @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/upstream-batching.md_merged.snap b/tests/core/snapshots/upstream-batching.md_merged.snap
index ddd433b3ba..be65eda4cc 100644
--- a/tests/core/snapshots/upstream-batching.md_merged.snap
+++ b/tests/core/snapshots/upstream-batching.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 100}) {
+schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 100}) @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/upstream-fail-request.md_merged.snap b/tests/core/snapshots/upstream-fail-request.md_merged.snap
index e498e56248..ce99160b3a 100644
--- a/tests/core/snapshots/upstream-fail-request.md_merged.snap
+++ b/tests/core/snapshots/upstream-fail-request.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/with-args-url.md_merged.snap b/tests/core/snapshots/with-args-url.md_merged.snap
index 30e485dda8..566c77b1d1 100644
--- a/tests/core/snapshots/with-args-url.md_merged.snap
+++ b/tests/core/snapshots/with-args-url.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/with-args.md_merged.snap b/tests/core/snapshots/with-args.md_merged.snap
index 77916cb59c..17587918a4 100644
--- a/tests/core/snapshots/with-args.md_merged.snap
+++ b/tests/core/snapshots/with-args.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/with-nesting.md_merged.snap b/tests/core/snapshots/with-nesting.md_merged.snap
index 83bc1735ae..1b1e735058 100644
--- a/tests/core/snapshots/with-nesting.md_merged.snap
+++ b/tests/core/snapshots/with-nesting.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/yaml-nested-unions.md_merged.snap b/tests/core/snapshots/yaml-nested-unions.md_merged.snap
index ae67c46c85..5726534a00 100644
--- a/tests/core/snapshots/yaml-nested-unions.md_merged.snap
+++ b/tests/core/snapshots/yaml-nested-unions.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/yaml-union-in-type.md_merged.snap b/tests/core/snapshots/yaml-union-in-type.md_merged.snap
index 4b809f3fa5..04fa65902f 100644
--- a/tests/core/snapshots/yaml-union-in-type.md_merged.snap
+++ b/tests/core/snapshots/yaml-union-in-type.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/snapshots/yaml-union.md_merged.snap b/tests/core/snapshots/yaml-union.md_merged.snap
index 3ddfd33fe8..7c87c370f1 100644
--- a/tests/core/snapshots/yaml-union.md_merged.snap
+++ b/tests/core/snapshots/yaml-union.md_merged.snap
@@ -3,7 +3,7 @@ source: tests/core/spec.rs
expression: formatter
snapshot_kind: text
---
-schema @server @upstream {
+schema @server @upstream @link(src: "schema_0.graphql", type: Config) {
query: Query
}
diff --git a/tests/core/spec.rs b/tests/core/spec.rs
index 56a569da2b..1892aaf959 100644
--- a/tests/core/spec.rs
+++ b/tests/core/spec.rs
@@ -16,11 +16,10 @@ use tailcall::core::async_graphql_hyper::{GraphQLBatchRequest, GraphQLRequest};
use tailcall::core::blueprint::{Blueprint, BlueprintError};
use tailcall::core::config::reader::ConfigReader;
use tailcall::core::config::transformer::Required;
-use tailcall::core::config::{Config, ConfigModule, ConfigReaderContext, Source};
+use tailcall::core::config::{Config, ConfigModule, ConfigReaderContext, LinkType, Source};
use tailcall::core::http::handle_request;
use tailcall::core::mustache::PathStringEval;
use tailcall::core::print_schema::print_schema;
-use tailcall::core::variance::Invariant;
use tailcall::core::Mustache;
use tailcall_prettier::Parser;
use tailcall_valid::{Cause, Valid, ValidationError, Validator};
@@ -97,54 +96,53 @@ async fn check_identity(spec: &ExecutionSpec, reader_ctx: &ConfigReaderContext<'
// enabled for either new tests that request it or old graphql_spec
// tests that were explicitly written with it in mind
if spec.check_identity {
- for (source, content) in spec.server.iter() {
- if matches!(source, Source::GraphQL) {
- let mustache = Mustache::parse(content);
- let content = PathStringEval::new().eval_partial(&mustache, reader_ctx);
- let config = Config::from_source(source.to_owned(), &content).unwrap();
- let actual = config.to_sdl();
-
- // \r is added automatically in windows, it's safe to replace it with \n
- let content = content.replace("\r\n", "\n");
-
- let path_str = spec.path.display().to_string();
- let context = format!("path: {}", path_str);
-
- let actual = tailcall_prettier::format(actual, &tailcall_prettier::Parser::Gql)
- .await
- .map_err(|e| e.with_context(context.clone()))
- .unwrap();
-
- let expected = tailcall_prettier::format(content, &tailcall_prettier::Parser::Gql)
- .await
- .map_err(|e| e.with_context(context.clone()))
- .unwrap();
-
- pretty_assertions::assert_eq!(
- actual,
- expected,
- "Identity check failed for {:#?}",
- spec.path,
- );
- } else {
- panic!(
- "Spec {:#?} has \"check identity\" enabled, but its config isn't in GraphQL.",
- spec.path
- );
- }
+ for link in spec
+ .config
+ .links
+ .iter()
+ .filter(|link| link.type_of == LinkType::Config)
+ {
+ let content = reader_ctx.runtime.file.read(&link.src).await.unwrap();
+ let mustache = Mustache::parse(&content);
+ let content = PathStringEval::new().eval_partial(&mustache, reader_ctx);
+ let config = Config::from_source(Source::GraphQL, &content).unwrap();
+ let actual = config.to_sdl();
+
+ // \r is added automatically in windows, it's safe to replace it with \n
+ let content = content.replace("\r\n", "\n");
+
+ let path_str = spec.path.display().to_string();
+ let context = format!("path: {}", path_str);
+
+ let actual = tailcall_prettier::format(actual, &tailcall_prettier::Parser::Gql)
+ .await
+ .map_err(|e| e.with_context(context.clone()))
+ .unwrap();
+
+ let expected = tailcall_prettier::format(content, &tailcall_prettier::Parser::Gql)
+ .await
+ .map_err(|e| e.with_context(context.clone()))
+ .unwrap();
+
+ pretty_assertions::assert_eq!(
+ actual,
+ expected,
+ "Identity check failed for {:#?}",
+ spec.path,
+ );
}
}
}
async fn run_query_tests_on_spec(
spec: ExecutionSpec,
- server: Vec,
+ config_module: &ConfigModule,
mock_http_client: Arc,
) {
if let Some(tests) = spec.test.as_ref() {
let app_ctx = spec
.app_context(
- server.first().unwrap(),
+ config_module,
spec.env.clone().unwrap_or_default(),
mock_http_client.clone(),
)
@@ -200,42 +198,27 @@ async fn test_spec(spec: ExecutionSpec) {
let reader = ConfigReader::init(runtime);
- // Resolve all configs
- let config_modules = join_all(spec.server.iter().map(|(source, content)| async {
- let mustache = Mustache::parse(content);
- let content = PathStringEval::new().eval_partial(&mustache, &reader_ctx);
+ let config = Config::from(spec.config.clone());
- let config = Config::from_source(source.to_owned(), &content)?;
+ let config_module = reader.resolve(config, spec.path.parent()).await;
- reader.resolve(config, spec.path.parent()).await
- }))
- .await;
-
- let config_module = Valid::from_iter(config_modules.iter(), |config_module| {
- Valid::from(config_module.as_ref().map_err(|e| {
- match e.downcast_ref::>() {
+ let config_module =
+ Valid::from(
+ config_module.map_err(|e| match e.downcast_ref::>() {
Some(err) => err.clone(),
None => ValidationError::new(e.to_string()),
- }
- }))
- })
- .and_then(|cfgs| {
- let mut cfgs = cfgs.into_iter();
- let config_module = cfgs.next().expect("At least one config should be defined");
-
- cfgs.fold(Valid::succeed(config_module.clone()), |acc, c| {
- acc.and_then(|acc| acc.unify(c.clone()))
- })
- })
- // Apply required transformers to the configuration
- .and_then(|cfg| cfg.transform(Required));
+ }),
+ )
+ // Apply required transformers to the configuration
+ .and_then(|cfg| cfg.transform(Required));
// check sdl error if any
if is_sdl_error(&spec, config_module.clone()).await {
return;
}
- let merged = config_module.to_result().unwrap().to_sdl();
+ let config_module = config_module.to_result().unwrap();
+ let merged = config_module.to_sdl();
let formatter = tailcall_prettier::format(merged, &Parser::Gql)
.await
@@ -245,34 +228,25 @@ async fn test_spec(spec: ExecutionSpec) {
insta::assert_snapshot!(snapshot_name, formatter);
- let config_modules = config_modules
- .into_iter()
- .collect::, _>>()
- .unwrap();
-
check_identity(&spec, &reader_ctx).await;
// client: Check if client spec matches snapshot
- if config_modules.len() == 1 {
- let config = &config_modules[0];
-
- let client = print_schema(
- (Blueprint::try_from(config)
- .context(format!("file: {}", spec.path.to_str().unwrap()))
- .unwrap())
- .to_schema(),
- );
-
- let formatted = tailcall_prettier::format(client, &Parser::Gql)
- .await
- .unwrap();
- let snapshot_name = format!("{}_client", spec.safe_name);
-
- insta::assert_snapshot!(snapshot_name, formatted);
- }
+ let client = print_schema(
+ (Blueprint::try_from(&config_module)
+ .context(format!("file: {}", spec.path.to_str().unwrap()))
+ .unwrap())
+ .to_schema(),
+ );
+
+ let formatted = tailcall_prettier::format(client, &Parser::Gql)
+ .await
+ .unwrap();
+ let snapshot_name = format!("{}_client", spec.safe_name);
+
+ insta::assert_snapshot!(snapshot_name, formatted);
// run query tests
- run_query_tests_on_spec(spec, config_modules, mock_http_client).await;
+ run_query_tests_on_spec(spec, &config_module, mock_http_client).await;
}
pub async fn load_and_test_execution_spec(path: &Path) -> anyhow::Result<()> {
diff --git a/tests/execution/add-field-index-list.md b/tests/execution/add-field-index-list.md
index da99c87b88..6a2d6636a7 100644
--- a/tests/execution/add-field-index-list.md
+++ b/tests/execution/add-field-index-list.md
@@ -1,6 +1,6 @@
# Sending field index list
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/add-field-many-list.md b/tests/execution/add-field-many-list.md
index 26116300b9..f0f6495b09 100644
--- a/tests/execution/add-field-many-list.md
+++ b/tests/execution/add-field-many-list.md
@@ -4,7 +4,7 @@ identity: true
# add-field-many-list
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/add-field-many.md b/tests/execution/add-field-many.md
index 659262f768..a68b3b4ad8 100644
--- a/tests/execution/add-field-many.md
+++ b/tests/execution/add-field-many.md
@@ -4,7 +4,7 @@ identity: true
# add-field-many
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/add-field-modify.md b/tests/execution/add-field-modify.md
index 3f70a90066..bf2116ae83 100644
--- a/tests/execution/add-field-modify.md
+++ b/tests/execution/add-field-modify.md
@@ -1,6 +1,6 @@
# Add field modify
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/add-field-with-composition.md b/tests/execution/add-field-with-composition.md
index 64979661e8..358485ff61 100644
--- a/tests/execution/add-field-with-composition.md
+++ b/tests/execution/add-field-with-composition.md
@@ -1,6 +1,6 @@
# Add field with composition
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/add-field-with-modify.md b/tests/execution/add-field-with-modify.md
index 8bce563368..81ae026c4f 100644
--- a/tests/execution/add-field-with-modify.md
+++ b/tests/execution/add-field-with-modify.md
@@ -1,6 +1,6 @@
# Add field with modify
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/add-field.md b/tests/execution/add-field.md
index e25e63cf3d..4cf1e76f1a 100644
--- a/tests/execution/add-field.md
+++ b/tests/execution/add-field.md
@@ -1,6 +1,6 @@
# Add field
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/apollo-federation-entities-batch.md b/tests/execution/apollo-federation-entities-batch.md
index ce3d2549af..7682879f3d 100644
--- a/tests/execution/apollo-federation-entities-batch.md
+++ b/tests/execution/apollo-federation-entities-batch.md
@@ -1,7 +1,18 @@
# Apollo federation query for batching resolvers
-```graphql @config
-schema @server(port: 8000, enableFederation: true) @upstream(httpCache: 42, batch: {delay: 100}) {
+```yaml @config
+server:
+ port: 8000
+ enableFederation: true
+
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/apollo-federation-entities-validation.md b/tests/execution/apollo-federation-entities-validation.md
index ff964ba958..9a8395d509 100644
--- a/tests/execution/apollo-federation-entities-validation.md
+++ b/tests/execution/apollo-federation-entities-validation.md
@@ -4,8 +4,18 @@ error: true
# Apollo federation query validation
-```graphql @config
-schema @server(port: 8000, enableFederation: true) @upstream(httpCache: 42, batch: {delay: 100}) {
+```yaml @config
+server:
+ port: 8000
+ enableFederation: true
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/apollo-federation-entities.md b/tests/execution/apollo-federation-entities.md
index d4f15f348c..313f70b03a 100644
--- a/tests/execution/apollo-federation-entities.md
+++ b/tests/execution/apollo-federation-entities.md
@@ -1,10 +1,19 @@
# Apollo federation query
-```graphql @config
-schema
- @server(port: 8000, enableFederation: true)
- @upstream(httpCache: 42, batch: {delay: 100})
- @link(src: "./posts.graphql") {
+```yaml @config
+server:
+ port: 8000
+ enableFederation: true
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+links:
+ - src: ./posts.graphql
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/apollo-federation-validation.md b/tests/execution/apollo-federation-validation.md
index b02d77dd88..4b319b37df 100644
--- a/tests/execution/apollo-federation-validation.md
+++ b/tests/execution/apollo-federation-validation.md
@@ -4,8 +4,18 @@ error: true
# Apollo federation validation
-```graphql @config
-schema @server(port: 8000, enableFederation: true) @upstream(httpCache: 42, batch: {delay: 100}) {
+```yaml @config
+server:
+ port: 8000
+ enableFederation: true
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/apollo-tracing.md b/tests/execution/apollo-tracing.md
index e13fc7d460..f5df30cec2 100644
--- a/tests/execution/apollo-tracing.md
+++ b/tests/execution/apollo-tracing.md
@@ -1,6 +1,6 @@
# Apollo Tracing
-```graphql @config
+```graphql @schema
schema
@server(port: 8000, hostname: "0.0.0.0")
@telemetry(export: {apollo: {apiKey: "", graphRef: "tailcall-demo-3@current"}}) {
diff --git a/tests/execution/async-cache-disabled.md b/tests/execution/async-cache-disabled.md
index 9abd1a626c..32a37637f1 100644
--- a/tests/execution/async-cache-disabled.md
+++ b/tests/execution/async-cache-disabled.md
@@ -1,7 +1,13 @@
# Async Cache Disabled
-```graphql @config
-schema @server(port: 8000, queryValidation: false) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/async-cache-enable-multiple-resolvers.md b/tests/execution/async-cache-enable-multiple-resolvers.md
index 00d2830902..6abc027519 100644
--- a/tests/execution/async-cache-enable-multiple-resolvers.md
+++ b/tests/execution/async-cache-enable-multiple-resolvers.md
@@ -1,7 +1,13 @@
# Async Cache Enabled
-```graphql @config
-schema @server(port: 8000, queryValidation: false) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/async-cache-enabled.md b/tests/execution/async-cache-enabled.md
index 668b915ca6..07d8feb7ff 100644
--- a/tests/execution/async-cache-enabled.md
+++ b/tests/execution/async-cache-enabled.md
@@ -1,7 +1,13 @@
# Async Cache Enabled
-```graphql @config
-schema @server(port: 8000, queryValidation: false) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/async-cache-global.md b/tests/execution/async-cache-global.md
index eed25e3497..db7028ad7e 100644
--- a/tests/execution/async-cache-global.md
+++ b/tests/execution/async-cache-global.md
@@ -1,7 +1,13 @@
# Async Cache Inflight Enabled
-```graphql @config
-schema @server(port: 8000, queryValidation: false) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/async-cache-inflight-request.md b/tests/execution/async-cache-inflight-request.md
index 56e28bd3b6..ab07f9e0d6 100644
--- a/tests/execution/async-cache-inflight-request.md
+++ b/tests/execution/async-cache-inflight-request.md
@@ -1,7 +1,13 @@
# Async Cache Inflight and InRequest
-```graphql @config
-schema @server(port: 8000, queryValidation: false) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/auth-basic.md b/tests/execution/auth-basic.md
index a1d370a42b..81a08b798e 100644
--- a/tests/execution/auth-basic.md
+++ b/tests/execution/auth-basic.md
@@ -1,7 +1,16 @@
# Auth with BasicAuth
-```graphql @config
-schema @server(port: 8000) @link(id: "htpasswd", type: Htpasswd, src: ".htpasswd") {
+```yaml @config
+server:
+ port: 8000
+links:
+ - id: htpasswd
+ src: .htpasswd
+ type: Htpasswd
+```
+
+```graphql @schema
+schema {
query: Query
mutation: Mutation
}
diff --git a/tests/execution/auth-jwt.md b/tests/execution/auth-jwt.md
index 4cc16e1f76..94e89882e1 100644
--- a/tests/execution/auth-jwt.md
+++ b/tests/execution/auth-jwt.md
@@ -1,7 +1,16 @@
# Auth with JWT loaded from expr
-```graphql @config
-schema @server(port: 8000) @link(id: "jwks", type: Jwks, src: "jwks.json") {
+```yaml @config
+server:
+ port: 8000
+links:
+ - id: jwks
+ src: jwks.json
+ type: Jwks
+```
+
+```graphql @schema
+schema {
query: Query
mutation: Mutation
}
diff --git a/tests/execution/auth-multiple-complex.md b/tests/execution/auth-multiple-complex.md
index df8210ff1f..97b99d1cf2 100644
--- a/tests/execution/auth-multiple-complex.md
+++ b/tests/execution/auth-multiple-complex.md
@@ -1,12 +1,20 @@
# auth multiple
-```graphql @config
-schema
- @server
- @upstream
- @link(id: "a", src: ".htpasswd_a", type: Htpasswd)
- @link(id: "b", src: ".htpasswd_b", type: Htpasswd)
- @link(id: "c", src: ".htpasswd_c", type: Htpasswd) {
+```yaml @config
+links:
+ - id: a
+ src: .htpasswd_a
+ type: Htpasswd
+ - id: b
+ src: .htpasswd_b
+ type: Htpasswd
+ - id: c
+ src: .htpasswd_c
+ type: Htpasswd
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/auth-multiple.md b/tests/execution/auth-multiple.md
index bc8f24a7c0..08d157dc7b 100644
--- a/tests/execution/auth-multiple.md
+++ b/tests/execution/auth-multiple.md
@@ -1,12 +1,20 @@
# auth multiple
-```graphql @config
-schema
- @server
- @upstream
- @link(id: "a", src: ".htpasswd_a", type: Htpasswd)
- @link(id: "b", src: ".htpasswd_b", type: Htpasswd)
- @link(id: "c", src: ".htpasswd_c", type: Htpasswd) {
+```yaml @config
+links:
+ - id: a
+ src: .htpasswd_a
+ type: Htpasswd
+ - id: b
+ src: .htpasswd_b
+ type: Htpasswd
+ - id: c
+ src: .htpasswd_c
+ type: Htpasswd
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/auth-protected-without-auth.md b/tests/execution/auth-protected-without-auth.md
index e7d2a8d2c7..4d22578e29 100644
--- a/tests/execution/auth-protected-without-auth.md
+++ b/tests/execution/auth-protected-without-auth.md
@@ -4,7 +4,7 @@ error: true
# Using @protected operator without specifying server.auth config
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/auth-validations.md b/tests/execution/auth-validations.md
index a9aca9b59c..4ab6a2c186 100644
--- a/tests/execution/auth-validations.md
+++ b/tests/execution/auth-validations.md
@@ -4,8 +4,15 @@ error: true
# auth multiple
-```graphql @config
-schema @server @upstream @link(id: "a", src: ".htpasswd_a", type: Htpasswd) {
+```yaml @config
+links:
+ - id: a
+ src: .htpasswd_a
+ type: Htpasswd
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/auth.md b/tests/execution/auth.md
index c31f89e7c2..e8a623616c 100644
--- a/tests/execution/auth.md
+++ b/tests/execution/auth.md
@@ -4,12 +4,18 @@ identity: true
# auth
-```graphql @config
-schema
- @server
- @upstream
- @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd)
- @link(id: "jwks", src: "jwks.json", type: Jwks) {
+```yaml @config
+links:
+ - id: htpasswd
+ src: .htpasswd
+ type: Htpasswd
+ - id: jwks
+ src: jwks.json
+ type: Jwks
+```
+
+```graphql @schema
+schema @server @upstream {
query: Query
}
diff --git a/tests/execution/auth_order.md b/tests/execution/auth_order.md
index 6959c2b95a..9b2121d182 100644
--- a/tests/execution/auth_order.md
+++ b/tests/execution/auth_order.md
@@ -1,7 +1,14 @@
# auth order
-```graphql @config
-schema @server @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) {
+```yaml @config
+links:
+ - id: htpasswd
+ src: .htpasswd
+ type: Htpasswd
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/batching-default.md b/tests/execution/batching-default.md
index 0b1271c631..76931eac90 100644
--- a/tests/execution/batching-default.md
+++ b/tests/execution/batching-default.md
@@ -1,7 +1,14 @@
# Batching default
-```graphql @config
-schema @server @upstream(httpCache: 42, batch: {delay: 10}) {
+```yaml @config
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/batching-disabled.md b/tests/execution/batching-disabled.md
index 5783980497..1795928d7e 100644
--- a/tests/execution/batching-disabled.md
+++ b/tests/execution/batching-disabled.md
@@ -1,7 +1,15 @@
# Batching disabled
-```graphql @config
-schema @server @upstream(httpCache: 42, batch: {maxSize: 100, delay: 0, headers: []}) {
+```yaml @config
+upstream:
+ httpCache: 42
+ batch:
+ maxSize: 100
+ delay: 0
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/batching-group-by-default.md b/tests/execution/batching-group-by-default.md
index 178fb487df..116719f6d3 100644
--- a/tests/execution/batching-group-by-default.md
+++ b/tests/execution/batching-group-by-default.md
@@ -1,7 +1,15 @@
# Batching group by default
-```graphql @config
-schema @server @upstream(httpCache: 42, batch: {delay: 1, maxSize: 1000}) {
+```yaml @config
+upstream:
+ httpCache: 42
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/batching-group-by-optional-key.md b/tests/execution/batching-group-by-optional-key.md
index 6bb613d256..d780eb25af 100644
--- a/tests/execution/batching-group-by-optional-key.md
+++ b/tests/execution/batching-group-by-optional-key.md
@@ -1,7 +1,18 @@
# Batching group by
-```graphql @config
-schema @server(port: 8000, queryValidation: false) @upstream(httpCache: 42, batch: {delay: 1, maxSize: 1000}) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+upstream:
+ httpCache: 42
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/batching-group-by.md b/tests/execution/batching-group-by.md
index a7775f6470..6f990203e4 100644
--- a/tests/execution/batching-group-by.md
+++ b/tests/execution/batching-group-by.md
@@ -1,7 +1,18 @@
# Batching group by
-```graphql @config
-schema @server(port: 8000, queryValidation: false) @upstream(httpCache: 42, batch: {delay: 1, maxSize: 1000}) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+upstream:
+ httpCache: 42
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/batching-post.md b/tests/execution/batching-post.md
index 336f61287d..c2ced6d539 100644
--- a/tests/execution/batching-post.md
+++ b/tests/execution/batching-post.md
@@ -1,9 +1,18 @@
# Batching post
-```graphql @config
-schema
- @server(port: 8000, queryValidation: false)
- @upstream(httpCache: 42, batch: {maxSize: 1000, delay: 1, headers: []}) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+upstream:
+ httpCache: 42
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/batching-validation.md b/tests/execution/batching-validation.md
index 208107efc9..c33c1a6752 100644
--- a/tests/execution/batching-validation.md
+++ b/tests/execution/batching-validation.md
@@ -2,10 +2,17 @@
error: true
---
+```yaml @config
+upstream:
+ httpCache: 42
+ batch:
+ delay: 1
+```
+
# batching validation
-```graphql @config
-schema @upstream(httpCache: 42, batch: {delay: 1}) {
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/batching.md b/tests/execution/batching.md
index 34eb5b6f0d..501fb6de2d 100644
--- a/tests/execution/batching.md
+++ b/tests/execution/batching.md
@@ -1,7 +1,12 @@
# Sending a batched graphql request
-```graphql @config
-schema @server(batchRequests: true) @upstream {
+```yaml @config
+server:
+ batchRequests: true
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/body-batching-cases.md b/tests/execution/body-batching-cases.md
index a8e124a49a..f2242c7ef1 100644
--- a/tests/execution/body-batching-cases.md
+++ b/tests/execution/body-batching-cases.md
@@ -1,7 +1,16 @@
# Batching default
-```graphql @config
-schema @server(port: 8000) @upstream(httpCache: 42, batch: {delay: 1}) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 1
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/body-batching.md b/tests/execution/body-batching.md
index a5fce54fce..cb1184532f 100644
--- a/tests/execution/body-batching.md
+++ b/tests/execution/body-batching.md
@@ -1,9 +1,18 @@
# Batching post
-```graphql @config
-schema
- @server(port: 8000, queryValidation: false)
- @upstream(httpCache: 42, batch: {maxSize: 1000, delay: 1, headers: []}) {
+```yaml @config
+server:
+ port: 8000
+ queryValidation: false
+upstream:
+ httpCache: 42
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/cache-control.md b/tests/execution/cache-control.md
index c359473e72..d4bd574ece 100644
--- a/tests/execution/cache-control.md
+++ b/tests/execution/cache-control.md
@@ -1,7 +1,13 @@
# Sending requests to verify Cache-Control behavior
-```graphql @config
-schema @server(headers: {cacheControl: true}) @upstream {
+```yaml @config
+server:
+ headers:
+ cacheControl: true
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/caching-collision.md b/tests/execution/caching-collision.md
index fa378cfcac..2322c76b27 100644
--- a/tests/execution/caching-collision.md
+++ b/tests/execution/caching-collision.md
@@ -1,7 +1,14 @@
# Caching Collision
-```graphql @config
-schema @upstream(batch: {delay: 1, maxSize: 1000}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/caching.md b/tests/execution/caching.md
index 96d56aaaca..725665d123 100644
--- a/tests/execution/caching.md
+++ b/tests/execution/caching.md
@@ -1,7 +1,14 @@
# Caching
-```graphql @config
-schema @upstream(batch: {delay: 1, maxSize: 1000}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/call-graphql-datasource.md b/tests/execution/call-graphql-datasource.md
index 06fca0df99..45116cd68b 100644
--- a/tests/execution/call-graphql-datasource.md
+++ b/tests/execution/call-graphql-datasource.md
@@ -1,7 +1,15 @@
# Call operator with graphQL datasource
-```graphql @config
-schema @server(port: 8000, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8000
+ hostname: "0.0.0.0"
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/call-multiple-steps-piping.md b/tests/execution/call-multiple-steps-piping.md
index 436a3d2a38..9e95f7b54d 100644
--- a/tests/execution/call-multiple-steps-piping.md
+++ b/tests/execution/call-multiple-steps-piping.md
@@ -1,6 +1,6 @@
# Call multiple steps piping
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/call-mutation.md b/tests/execution/call-mutation.md
index bcda2cd7b0..8fadc86a5b 100644
--- a/tests/execution/call-mutation.md
+++ b/tests/execution/call-mutation.md
@@ -1,7 +1,7 @@
# Call mutation
-```graphql @config
-schema @server {
+```graphql @schema
+schema {
query: Query
mutation: Mutation
}
diff --git a/tests/execution/call-operator.md b/tests/execution/call-operator.md
index ce1a1bde90..2ac895a3da 100644
--- a/tests/execution/call-operator.md
+++ b/tests/execution/call-operator.md
@@ -36,11 +36,20 @@ message NewsList {
}
```
-```graphql @config
-schema
- @server(port: 8000, hostname: "0.0.0.0")
- @upstream(httpCache: 42)
- @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+upstream:
+ httpCache: 42
+server:
+ port: 8000
+ hostname: "0.0.0.0"
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/cors-allow-cred-false.md b/tests/execution/cors-allow-cred-false.md
index c99f979190..978e87fef4 100644
--- a/tests/execution/cors-allow-cred-false.md
+++ b/tests/execution/cors-allow-cred-false.md
@@ -1,19 +1,22 @@
# Cors allow cred false
-```graphql @config
-schema
- @upstream(batch: {delay: 1, maxSize: 1000})
- @server(
- headers: {
- cors: {
- allowHeaders: ["Authorization"]
- allowMethods: [POST, OPTIONS]
- allowOrigins: ["abc.com", "xyz.com"]
- allowPrivateNetwork: true
- maxAge: 23
- }
- }
- ) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+server:
+ headers:
+ cors:
+ allowHeaders: ["Authorization"]
+ allowMethods: [POST, OPTIONS]
+ allowOrigins: ["abc.com", "xyz.com"]
+ allowPrivateNetwork: true
+ maxAge: 23
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/cors-allow-cred-true.md b/tests/execution/cors-allow-cred-true.md
index 4afbed4c5e..6c8659d912 100644
--- a/tests/execution/cors-allow-cred-true.md
+++ b/tests/execution/cors-allow-cred-true.md
@@ -1,19 +1,22 @@
# Cors allow cred true
-```graphql @config
-schema
- @upstream(batch: {delay: 1, maxSize: 1000})
- @server(
- headers: {
- cors: {
- allowCredentials: true
- allowMethods: [OPTIONS, POST, GET]
- allowOrigins: ["abc.com", "xyz.com"]
- exposeHeaders: [""]
- maxAge: 23
- }
- }
- ) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+server:
+ headers:
+ cors:
+ allowCredentials: true
+ allowMethods: [OPTIONS, POST, GET]
+ allowOrigins: ["abc.com", "xyz.com"]
+ exposeHeaders: [""]
+ maxAge: 23
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/cors-allow-cred-vary.md b/tests/execution/cors-allow-cred-vary.md
index cf67c41d68..eead0ba9d6 100644
--- a/tests/execution/cors-allow-cred-vary.md
+++ b/tests/execution/cors-allow-cred-vary.md
@@ -1,19 +1,22 @@
# Cors allow cred vary
-```graphql @config
-schema
- @upstream(batch: {delay: 1, maxSize: 1000})
- @server(
- headers: {
- cors: {
- allowCredentials: true
- allowMethods: [OPTIONS, POST, GET]
- allowOrigins: ["abc.com", "xyz.com"]
- exposeHeaders: [""]
- maxAge: 23
- }
- }
- ) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+server:
+ headers:
+ cors:
+ allowCredentials: true
+ allowMethods: [OPTIONS, POST, GET]
+ allowOrigins: ["abc.com", "xyz.com"]
+ exposeHeaders: [""]
+ maxAge: 23
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/cors-invalid-expose-headers.md b/tests/execution/cors-invalid-expose-headers.md
index ca84768eb2..409b9d8177 100644
--- a/tests/execution/cors-invalid-expose-headers.md
+++ b/tests/execution/cors-invalid-expose-headers.md
@@ -4,10 +4,21 @@ error: true
# Cors invalid exposeHeaders
-```graphql @config
-schema
- @upstream(batch: {delay: 1, maxSize: 1000})
- @server(headers: {cors: {allowCredentials: true, exposeHeaders: ["*"], allowMethods: [POST, OPTIONS]}}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+server:
+ headers:
+ cors:
+ allowCredentials: true
+ exposeHeaders: ["*"]
+ allowMethods: [POST, OPTIONS]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/cors-invalid-headers.md b/tests/execution/cors-invalid-headers.md
index d303b23608..f16d3ece61 100644
--- a/tests/execution/cors-invalid-headers.md
+++ b/tests/execution/cors-invalid-headers.md
@@ -4,10 +4,21 @@ error: true
# Cors invalid allowHeaders
-```graphql @config
-schema
- @upstream(batch: {delay: 1, maxSize: 1000})
- @server(headers: {cors: {allowCredentials: true, allowHeaders: ["*"], allowMethods: [POST, OPTIONS]}}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+server:
+ headers:
+ cors:
+ allowCredentials: true
+ allowHeaders: ["*"]
+ allowMethods: [POST, OPTIONS]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/cors-invalid-methods.md b/tests/execution/cors-invalid-methods.md
index 8a21a3ba4e..4a23e4946c 100644
--- a/tests/execution/cors-invalid-methods.md
+++ b/tests/execution/cors-invalid-methods.md
@@ -4,8 +4,19 @@ error: true
# Cors invalid allowMethods
-```graphql @config
-schema @upstream(batch: {delay: 1, maxSize: 1000}) @server(headers: {cors: {allowCredentials: true}}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+server:
+ headers:
+ cors:
+ allowCredentials: true
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/cors-invalid-origins.md b/tests/execution/cors-invalid-origins.md
index e0aab6a8e5..4a20125126 100644
--- a/tests/execution/cors-invalid-origins.md
+++ b/tests/execution/cors-invalid-origins.md
@@ -4,10 +4,21 @@ error: true
# Cors invalid allowOrigins
-```graphql @config
-schema
- @upstream(batch: {delay: 1, maxSize: 1000})
- @server(headers: {cors: {allowCredentials: true, allowOrigins: ["*"], allowMethods: [POST, OPTIONS]}}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+server:
+ headers:
+ cors:
+ allowCredentials: true
+ allowOrigins: ["*"]
+ allowMethods: [POST, OPTIONS]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/custom-headers.md b/tests/execution/custom-headers.md
index 9bf05ba6f4..52208f9750 100644
--- a/tests/execution/custom-headers.md
+++ b/tests/execution/custom-headers.md
@@ -1,7 +1,17 @@
# Custom Headers
-```graphql @config
-schema @server(headers: {custom: [{key: "x-id", value: "1"}, {key: "x-name", value: "John Doe"}]}) @upstream {
+```yaml @config
+server:
+ headers:
+ custom:
+ - key: "x-id"
+ value: "1"
+ - key: "x-name"
+ value: "John Doe"
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/custom-scalars.md b/tests/execution/custom-scalars.md
index 221b6666c8..9e7d2f5854 100644
--- a/tests/execution/custom-scalars.md
+++ b/tests/execution/custom-scalars.md
@@ -1,6 +1,6 @@
# Using all custom scalars
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/dedupe_batch_query_execution.md b/tests/execution/dedupe_batch_query_execution.md
index eed25e3497..a6247d09db 100644
--- a/tests/execution/dedupe_batch_query_execution.md
+++ b/tests/execution/dedupe_batch_query_execution.md
@@ -1,6 +1,6 @@
# Async Cache Inflight Enabled
-```graphql @config
+```graphql @schema
schema @server(port: 8000, queryValidation: false) {
query: Query
}
diff --git a/tests/execution/default-value-arg.md b/tests/execution/default-value-arg.md
index b7af7aa22a..ab15f34e4f 100644
--- a/tests/execution/default-value-arg.md
+++ b/tests/execution/default-value-arg.md
@@ -1,6 +1,6 @@
# default value for input Type
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/default-value-config.md b/tests/execution/default-value-config.md
index e64167835b..72ddb10669 100644
--- a/tests/execution/default-value-config.md
+++ b/tests/execution/default-value-config.md
@@ -1,6 +1,6 @@
# default value for input Type
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/enum-args.md b/tests/execution/enum-args.md
index 254395fd5d..a709f6ea28 100644
--- a/tests/execution/enum-args.md
+++ b/tests/execution/enum-args.md
@@ -1,6 +1,6 @@
# Enum Arguments
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/env-value.md b/tests/execution/env-value.md
index 12eaa4db67..d232b45338 100644
--- a/tests/execution/env-value.md
+++ b/tests/execution/env-value.md
@@ -1,6 +1,6 @@
# Env value
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/experimental-headers-error.md b/tests/execution/experimental-headers-error.md
index 5850b142f3..3b7f2f7efd 100644
--- a/tests/execution/experimental-headers-error.md
+++ b/tests/execution/experimental-headers-error.md
@@ -4,8 +4,14 @@ error: true
# test-experimental-headers-error
-```graphql @config
-schema @server(headers: {experimental: ["non-experimental", "foo", "bar", "tailcall"]}) {
+```yaml @config
+server:
+ headers:
+ experimental: ["non-experimental", "foo", "bar", "tailcall"]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/experimental-headers.md b/tests/execution/experimental-headers.md
index ee2f046ced..bfff1be5e7 100644
--- a/tests/execution/experimental-headers.md
+++ b/tests/execution/experimental-headers.md
@@ -1,7 +1,15 @@
# Experimental headers
-```graphql @config
-schema @server(headers: {experimental: ["x-tailcall", "X-experimental"]}) {
+```yaml @config
+server:
+ headers:
+ experimental:
+ - "x-tailcall"
+ - "X-experimental"
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/federation-subgraph-force-disabled.md b/tests/execution/federation-subgraph-force-disabled.md
index 0872380477..900ccfc038 100644
--- a/tests/execution/federation-subgraph-force-disabled.md
+++ b/tests/execution/federation-subgraph-force-disabled.md
@@ -1,7 +1,17 @@
# Federation subgraph with no entities in the config
-```graphql @config
-schema @server(port: 8000, enableFederation: false) @upstream(httpCache: 42, batch: {delay: 100}) {
+```yaml @config
+server:
+ port: 8000
+ enableFederation: false
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/federation-subgraph-force-enabled.md b/tests/execution/federation-subgraph-force-enabled.md
index 741c2966ec..928d68937d 100644
--- a/tests/execution/federation-subgraph-force-enabled.md
+++ b/tests/execution/federation-subgraph-force-enabled.md
@@ -1,7 +1,17 @@
# Federation subgraph with no entities in the config and enableFederation=true
-```graphql @config
-schema @server(port: 8000, enableFederation: true) @upstream(httpCache: 42, batch: {delay: 100}) {
+```yaml @config
+server:
+ port: 8000
+ enableFederation: true
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/federation-subgraph-no-entities.md b/tests/execution/federation-subgraph-no-entities.md
index c5388b0135..8c94452213 100644
--- a/tests/execution/federation-subgraph-no-entities.md
+++ b/tests/execution/federation-subgraph-no-entities.md
@@ -1,7 +1,16 @@
# Federation subgraph with no entities in the config
-```graphql @config
-schema @server(port: 8000) @upstream(httpCache: 42, batch: {delay: 100}) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-001.md b/tests/execution/graphql-conformance-001.md
index d7b9b0ade5..5b2ce5b12e 100644
--- a/tests/execution/graphql-conformance-001.md
+++ b/tests/execution/graphql-conformance-001.md
@@ -1,7 +1,16 @@
# Basic queries with field ordering check
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-002.md b/tests/execution/graphql-conformance-002.md
index 5f9123db3c..7c38939b0e 100644
--- a/tests/execution/graphql-conformance-002.md
+++ b/tests/execution/graphql-conformance-002.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not send the whole query to the remote server. It sends a shallow version of the query.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-003.md b/tests/execution/graphql-conformance-003.md
index ca9ea18187..186721d94c 100644
--- a/tests/execution/graphql-conformance-003.md
+++ b/tests/execution/graphql-conformance-003.md
@@ -1,7 +1,16 @@
# Test field inputs query
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-004.md b/tests/execution/graphql-conformance-004.md
index a3d5dadbdf..df24cc4d2b 100644
--- a/tests/execution/graphql-conformance-004.md
+++ b/tests/execution/graphql-conformance-004.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not send the alias to the remote server.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-005.md b/tests/execution/graphql-conformance-005.md
index f14694bf6c..63c0c7bf17 100644
--- a/tests/execution/graphql-conformance-005.md
+++ b/tests/execution/graphql-conformance-005.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not send the alias to the remote server.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-006.md b/tests/execution/graphql-conformance-006.md
index f3fa413c96..580c085cd3 100644
--- a/tests/execution/graphql-conformance-006.md
+++ b/tests/execution/graphql-conformance-006.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not send the whole query with the **fragments** to the remote server.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-007.md b/tests/execution/graphql-conformance-007.md
index 6ad7dcd8dd..393fbfdbd1 100644
--- a/tests/execution/graphql-conformance-007.md
+++ b/tests/execution/graphql-conformance-007.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not send the whole query with the **fragments** to the remote server.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-008.md b/tests/execution/graphql-conformance-008.md
index 68dda9176f..31b8979111 100644
--- a/tests/execution/graphql-conformance-008.md
+++ b/tests/execution/graphql-conformance-008.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not send the whole query with the **fragments** to the remote server.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-009.md b/tests/execution/graphql-conformance-009.md
index 97d4b36627..29a2d2db6a 100644
--- a/tests/execution/graphql-conformance-009.md
+++ b/tests/execution/graphql-conformance-009.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not construct the query correctly. Moreover it does not validate the query that is invalid (contains a missing field).
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-010.md b/tests/execution/graphql-conformance-010.md
index 772c971319..a39829d710 100644
--- a/tests/execution/graphql-conformance-010.md
+++ b/tests/execution/graphql-conformance-010.md
@@ -1,7 +1,16 @@
# Test ordering of input fields
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-011.md b/tests/execution/graphql-conformance-011.md
index 009280306e..164f79abc5 100644
--- a/tests/execution/graphql-conformance-011.md
+++ b/tests/execution/graphql-conformance-011.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because tailcall does not send the `@log` directive to the remote server. Moreover it does not correctly format the scalar to string value.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-012.md b/tests/execution/graphql-conformance-012.md
index ef500bff0f..bf3e991c25 100644
--- a/tests/execution/graphql-conformance-012.md
+++ b/tests/execution/graphql-conformance-012.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not send the whole query with the **fragments** to the remote server.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-013.md b/tests/execution/graphql-conformance-013.md
index 174e6e4e3f..10c89d4c6d 100644
--- a/tests/execution/graphql-conformance-013.md
+++ b/tests/execution/graphql-conformance-013.md
@@ -1,7 +1,16 @@
# Test schema inspection
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-014.md b/tests/execution/graphql-conformance-014.md
index de6667b571..4798664223 100644
--- a/tests/execution/graphql-conformance-014.md
+++ b/tests/execution/graphql-conformance-014.md
@@ -1,7 +1,16 @@
# Test double query
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-015.md b/tests/execution/graphql-conformance-015.md
index 4d15fce3f7..abe68e5678 100644
--- a/tests/execution/graphql-conformance-015.md
+++ b/tests/execution/graphql-conformance-015.md
@@ -1,7 +1,16 @@
# Optional input fields
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-017.md b/tests/execution/graphql-conformance-017.md
index 52f42047b0..22b5f6ff16 100644
--- a/tests/execution/graphql-conformance-017.md
+++ b/tests/execution/graphql-conformance-017.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not send the whole query with the **fragments** to the remote server.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-018.md b/tests/execution/graphql-conformance-018.md
index 3fcea4bb7c..c1b1e4e9c4 100644
--- a/tests/execution/graphql-conformance-018.md
+++ b/tests/execution/graphql-conformance-018.md
@@ -1,7 +1,16 @@
# Basic queries with field modify check
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
@@ -39,7 +48,7 @@ type User {
query: |
query getUser {
user(id: 4) {
- city
+ city
newName
}
}
diff --git a/tests/execution/graphql-conformance-http-001.md b/tests/execution/graphql-conformance-http-001.md
index 810140bafd..3d3baea6ac 100644
--- a/tests/execution/graphql-conformance-http-001.md
+++ b/tests/execution/graphql-conformance-http-001.md
@@ -1,7 +1,16 @@
# Basic queries with field ordering check
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-002.md b/tests/execution/graphql-conformance-http-002.md
index ad54906a97..7350736fba 100644
--- a/tests/execution/graphql-conformance-http-002.md
+++ b/tests/execution/graphql-conformance-http-002.md
@@ -1,7 +1,16 @@
# Test complex nested query
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-003.md b/tests/execution/graphql-conformance-http-003.md
index cea81685ca..9622d1234f 100644
--- a/tests/execution/graphql-conformance-http-003.md
+++ b/tests/execution/graphql-conformance-http-003.md
@@ -1,7 +1,16 @@
# Test field inputs query
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-004.md b/tests/execution/graphql-conformance-http-004.md
index fe7f465026..4e7d17141d 100644
--- a/tests/execution/graphql-conformance-http-004.md
+++ b/tests/execution/graphql-conformance-http-004.md
@@ -1,7 +1,16 @@
# Test complex aliasing
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-005.md b/tests/execution/graphql-conformance-http-005.md
index 95206090d4..c6986bc7db 100644
--- a/tests/execution/graphql-conformance-http-005.md
+++ b/tests/execution/graphql-conformance-http-005.md
@@ -1,6 +1,15 @@
# Test field aliasing
-```graphql @config
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-006.md b/tests/execution/graphql-conformance-http-006.md
index dda1223b85..f016040dff 100644
--- a/tests/execution/graphql-conformance-http-006.md
+++ b/tests/execution/graphql-conformance-http-006.md
@@ -1,7 +1,16 @@
# Test complex nested query
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-007.md b/tests/execution/graphql-conformance-http-007.md
index 36e13e2f25..429918eaa8 100644
--- a/tests/execution/graphql-conformance-http-007.md
+++ b/tests/execution/graphql-conformance-http-007.md
@@ -1,7 +1,16 @@
# Test named fragments.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-008.md b/tests/execution/graphql-conformance-http-008.md
index 9da1ef0aab..5921db672c 100644
--- a/tests/execution/graphql-conformance-http-008.md
+++ b/tests/execution/graphql-conformance-http-008.md
@@ -1,7 +1,16 @@
# Test inline fragments.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-009.md b/tests/execution/graphql-conformance-http-009.md
index 5460ffde97..903e96983b 100644
--- a/tests/execution/graphql-conformance-http-009.md
+++ b/tests/execution/graphql-conformance-http-009.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because we do not check that variables are defined
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-010.md b/tests/execution/graphql-conformance-http-010.md
index 53ca9c24e2..6dc89d1d96 100644
--- a/tests/execution/graphql-conformance-http-010.md
+++ b/tests/execution/graphql-conformance-http-010.md
@@ -1,7 +1,16 @@
# Test ordering of input fields
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-011.md b/tests/execution/graphql-conformance-http-011.md
index 7b2736d59c..406c5aae89 100644
--- a/tests/execution/graphql-conformance-http-011.md
+++ b/tests/execution/graphql-conformance-http-011.md
@@ -6,8 +6,17 @@ skip: true
TODO: Skipped because Tailcall does not parse the scalar type correctly into a string.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-012.md b/tests/execution/graphql-conformance-http-012.md
index f5c9a45630..963e3551a7 100644
--- a/tests/execution/graphql-conformance-http-012.md
+++ b/tests/execution/graphql-conformance-http-012.md
@@ -1,7 +1,16 @@
# Test unions
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-013.md b/tests/execution/graphql-conformance-http-013.md
index 40be3a0103..1a5621acd7 100644
--- a/tests/execution/graphql-conformance-http-013.md
+++ b/tests/execution/graphql-conformance-http-013.md
@@ -1,7 +1,16 @@
# Test schema inspection
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-014.md b/tests/execution/graphql-conformance-http-014.md
index e590b6c641..86c78c144b 100644
--- a/tests/execution/graphql-conformance-http-014.md
+++ b/tests/execution/graphql-conformance-http-014.md
@@ -1,7 +1,16 @@
# Test double query
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-015.md b/tests/execution/graphql-conformance-http-015.md
index 5bcb908a0f..4b214f9037 100644
--- a/tests/execution/graphql-conformance-http-015.md
+++ b/tests/execution/graphql-conformance-http-015.md
@@ -1,7 +1,16 @@
# Optional input fields
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-http-017.md b/tests/execution/graphql-conformance-http-017.md
index 5e77f7e36e..c271dfcfc2 100644
--- a/tests/execution/graphql-conformance-http-017.md
+++ b/tests/execution/graphql-conformance-http-017.md
@@ -1,7 +1,16 @@
# Complex fragments.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-nested-lists-fragment.md b/tests/execution/graphql-conformance-nested-lists-fragment.md
index 7e1c3b4474..7dff9eea1e 100644
--- a/tests/execution/graphql-conformance-nested-lists-fragment.md
+++ b/tests/execution/graphql-conformance-nested-lists-fragment.md
@@ -1,7 +1,16 @@
# List of lists.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-nested-lists-http.md b/tests/execution/graphql-conformance-nested-lists-http.md
index 2e204a8978..88a6b4e2fe 100644
--- a/tests/execution/graphql-conformance-nested-lists-http.md
+++ b/tests/execution/graphql-conformance-nested-lists-http.md
@@ -1,7 +1,16 @@
# List of lists.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-conformance-nested-lists.md b/tests/execution/graphql-conformance-nested-lists.md
index 999f1ae38d..3a146252a0 100644
--- a/tests/execution/graphql-conformance-nested-lists.md
+++ b/tests/execution/graphql-conformance-nested-lists.md
@@ -1,7 +1,16 @@
# List of lists.
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-dataloader-batch-request.md b/tests/execution/graphql-dataloader-batch-request.md
index 02542cbfa2..965f06e4a0 100644
--- a/tests/execution/graphql-dataloader-batch-request.md
+++ b/tests/execution/graphql-dataloader-batch-request.md
@@ -1,7 +1,13 @@
# Graphql datasource
-```graphql @config
-schema @upstream(batch: {delay: 1}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-dataloader-no-batch-request.md b/tests/execution/graphql-dataloader-no-batch-request.md
index 8c7eeb94f2..82b62039d0 100644
--- a/tests/execution/graphql-dataloader-no-batch-request.md
+++ b/tests/execution/graphql-dataloader-no-batch-request.md
@@ -1,7 +1,13 @@
# Graphql datasource
-```graphql @config
-schema @upstream(batch: {delay: 1}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-datasource-errors.md b/tests/execution/graphql-datasource-errors.md
index 51fedd473e..d2e66be421 100644
--- a/tests/execution/graphql-datasource-errors.md
+++ b/tests/execution/graphql-datasource-errors.md
@@ -1,6 +1,6 @@
# Graphql datasource
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/graphql-datasource-mutation.md b/tests/execution/graphql-datasource-mutation.md
index 8a1c1d30cb..3ab52f8055 100644
--- a/tests/execution/graphql-datasource-mutation.md
+++ b/tests/execution/graphql-datasource-mutation.md
@@ -1,6 +1,6 @@
# Graphql datasource
-```graphql @config
+```graphql @schema
schema {
query: Query
mutation: Mutation
diff --git a/tests/execution/graphql-datasource-no-args.md b/tests/execution/graphql-datasource-no-args.md
index 18feb29f84..dab3bb1a00 100644
--- a/tests/execution/graphql-datasource-no-args.md
+++ b/tests/execution/graphql-datasource-no-args.md
@@ -1,6 +1,6 @@
# Graphql datasource
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/graphql-datasource-query-directives.md b/tests/execution/graphql-datasource-query-directives.md
index e1580c70c3..452b9acc69 100644
--- a/tests/execution/graphql-datasource-query-directives.md
+++ b/tests/execution/graphql-datasource-query-directives.md
@@ -2,7 +2,7 @@
Directives in query should be passed as is
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/graphql-datasource-with-args.md b/tests/execution/graphql-datasource-with-args.md
index c3c6b58fa5..afc7de1862 100644
--- a/tests/execution/graphql-datasource-with-args.md
+++ b/tests/execution/graphql-datasource-with-args.md
@@ -1,6 +1,6 @@
# Graphql datasource
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/graphql-datasource-with-empty-enum.md b/tests/execution/graphql-datasource-with-empty-enum.md
index 341cdead27..c2c6f155e8 100644
--- a/tests/execution/graphql-datasource-with-empty-enum.md
+++ b/tests/execution/graphql-datasource-with-empty-enum.md
@@ -1,6 +1,6 @@
# Graphql datasource
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/graphql-datasource-with-mandatory-enum.md b/tests/execution/graphql-datasource-with-mandatory-enum.md
index fe0a1b8cdf..98e0bb23b5 100644
--- a/tests/execution/graphql-datasource-with-mandatory-enum.md
+++ b/tests/execution/graphql-datasource-with-mandatory-enum.md
@@ -1,6 +1,6 @@
# Graphql datasource
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/graphql-nested-datasource.md b/tests/execution/graphql-nested-datasource.md
index 2816e3874a..abecc470a2 100644
--- a/tests/execution/graphql-nested-datasource.md
+++ b/tests/execution/graphql-nested-datasource.md
@@ -1,7 +1,16 @@
# GraphQL datasource inside another graphQL datasource
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ hostname: "0.0.0.0"
+ queryValidation: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/graphql-nested.md b/tests/execution/graphql-nested.md
index bb9a277611..45a4cd2b63 100644
--- a/tests/execution/graphql-nested.md
+++ b/tests/execution/graphql-nested.md
@@ -1,6 +1,6 @@
# Complicated queries
-```graphql @config
+```graphql @schema
schema @server(port: 8000, hostname: "0.0.0.0") {
query: Query
}
diff --git a/tests/execution/grpc-batch.md b/tests/execution/grpc-batch.md
index a14ef78937..bfffb35354 100644
--- a/tests/execution/grpc-batch.md
+++ b/tests/execution/grpc-batch.md
@@ -1,5 +1,18 @@
# Grpc datasource with batching
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
```protobuf @file:news.proto
syntax = "proto3";
@@ -36,11 +49,8 @@ message NewsList {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(httpCache: 42, batch: {delay: 10})
- @link(id: "news", src: "news.proto", type: Protobuf) {
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/grpc-error.md b/tests/execution/grpc-error.md
index ecbea4039f..38596c3550 100644
--- a/tests/execution/grpc-error.md
+++ b/tests/execution/grpc-error.md
@@ -36,11 +36,21 @@ message NewsList {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(httpCache: 42, batch: {delay: 10})
- @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+server:
+ port: 8000
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
@@ -49,12 +59,14 @@ type Query {
newsById(news: NewsInput!): News!
@grpc(method: "news.NewsService.GetNews", url: "http://localhost:50051", body: "{{.args.news}}")
}
+
input NewsInput {
id: Int
title: String
body: String
postImage: String
}
+
type NewsData {
news: [News]
}
diff --git a/tests/execution/grpc-json.md b/tests/execution/grpc-json.md
index 6302c8f62d..68c958d2fa 100644
--- a/tests/execution/grpc-json.md
+++ b/tests/execution/grpc-json.md
@@ -36,8 +36,17 @@ message NewsList {
}
```
-```graphql @config
-schema @server(port: 8000) @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/grpc-map.md b/tests/execution/grpc-map.md
index eb0a6a88bc..6204d059cb 100644
--- a/tests/execution/grpc-map.md
+++ b/tests/execution/grpc-map.md
@@ -1,5 +1,17 @@
# Grpc map type
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+links:
+ - src: "map.proto"
+ type: Protobuf
+```
+
```protobuf @file:map.proto
syntax = "proto3";
@@ -19,12 +31,8 @@ service MapService {
```
-```graphql @config
-schema @server(port: 8000) @upstream(httpCache: 42, batch: {delay: 10}) @link(src: "map.proto", type: Protobuf) {
- query: Query
-}
-
-schema @server @upstream {
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/grpc-oneof.md b/tests/execution/grpc-oneof.md
index d7028105b3..43737f8d96 100644
--- a/tests/execution/grpc-oneof.md
+++ b/tests/execution/grpc-oneof.md
@@ -44,8 +44,20 @@ service OneOfService {
```
-```graphql @config
-schema @server(port: 8000) @upstream(httpCache: 42, batch: {delay: 10}) @link(src: "oneof.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+links:
+ - src: "oneof.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/grpc-proto-with-same-package.md b/tests/execution/grpc-proto-with-same-package.md
index 2a3984bfbe..b6e8987b60 100644
--- a/tests/execution/grpc-proto-with-same-package.md
+++ b/tests/execution/grpc-proto-with-same-package.md
@@ -33,8 +33,18 @@ service BarService {
}
```
-```graphql @config
-schema @server(port: 8000) @link(src: "foo.proto", type: Protobuf) @link(src: "bar.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+links:
+ - src: "foo.proto"
+ type: Protobuf
+ - src: "bar.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/grpc-reflection.md b/tests/execution/grpc-reflection.md
index 8b0f747662..7f97e6a022 100644
--- a/tests/execution/grpc-reflection.md
+++ b/tests/execution/grpc-reflection.md
@@ -1,7 +1,17 @@
# Grpc datasource
-```graphql @config
-schema @server(port: 8000) @upstream(httpCache: 42) @link(src: "http://localhost:50051", type: Grpc) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+links:
+ - src: "http://localhost:50051"
+ type: Grpc
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/grpc-simple.md b/tests/execution/grpc-simple.md
index 44b0484826..ed89443629 100644
--- a/tests/execution/grpc-simple.md
+++ b/tests/execution/grpc-simple.md
@@ -36,11 +36,21 @@ message NewsList {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(httpCache: 42, batch: {delay: 10})
- @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/grpc-url-from-upstream.md b/tests/execution/grpc-url-from-upstream.md
index 57bf2169de..d106078a36 100644
--- a/tests/execution/grpc-url-from-upstream.md
+++ b/tests/execution/grpc-url-from-upstream.md
@@ -36,11 +36,21 @@ message NewsList {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(httpCache: 42, batch: {delay: 10})
- @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/http-select.md b/tests/execution/http-select.md
index d36cbeb361..2d58a65adc 100644
--- a/tests/execution/http-select.md
+++ b/tests/execution/http-select.md
@@ -1,7 +1,16 @@
# Basic queries with field ordering check
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ queryValidation: false
+ hostname: "0.0.0.0"
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/inline-field.md b/tests/execution/inline-field.md
index 25e91254dc..978e5962f1 100644
--- a/tests/execution/inline-field.md
+++ b/tests/execution/inline-field.md
@@ -1,6 +1,6 @@
# Inline field
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/inline-index-list.md b/tests/execution/inline-index-list.md
index 1bef22e400..6a12e6e163 100644
--- a/tests/execution/inline-index-list.md
+++ b/tests/execution/inline-index-list.md
@@ -1,6 +1,6 @@
# Test inline index list
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/inline-many-list.md b/tests/execution/inline-many-list.md
index 521a922217..8323b6cba4 100644
--- a/tests/execution/inline-many-list.md
+++ b/tests/execution/inline-many-list.md
@@ -4,7 +4,7 @@ identity: true
# inline-many-list
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/inline-many.md b/tests/execution/inline-many.md
index 1bb8f3cba4..0cd7c641cf 100644
--- a/tests/execution/inline-many.md
+++ b/tests/execution/inline-many.md
@@ -4,7 +4,7 @@ identity: true
# inline-many
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/input-type-protected-error.md b/tests/execution/input-type-protected-error.md
index 46f655b9bb..c6be90c4ce 100644
--- a/tests/execution/input-type-protected-error.md
+++ b/tests/execution/input-type-protected-error.md
@@ -4,7 +4,7 @@ error: true
# input-type-protected-error
-```graphql @config
+```graphql @schema
schema {
query: Query
mutation: Mutation
diff --git a/tests/execution/introspection-query-with-disabled-introspection.md b/tests/execution/introspection-query-with-disabled-introspection.md
index 0120d8213d..41193af643 100644
--- a/tests/execution/introspection-query-with-disabled-introspection.md
+++ b/tests/execution/introspection-query-with-disabled-introspection.md
@@ -1,7 +1,17 @@
# Test schema inspection with false flag
-```graphql @config
-schema @server(port: 8001, queryValidation: false, hostname: "0.0.0.0", introspection: false) @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8001
+ queryValidation: false
+ hostname: "0.0.0.0"
+ introspection: false
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/io-cache.md b/tests/execution/io-cache.md
index 20e4a962c8..965f51e74c 100644
--- a/tests/execution/io-cache.md
+++ b/tests/execution/io-cache.md
@@ -1,7 +1,15 @@
# Call operator with GraphQL data source
-```graphql @config
-schema @server(port: 8000, hostname: "0.0.0.0") @upstream(httpCache: 42) {
+```yaml @config
+server:
+ port: 8000
+ hostname: "0.0.0.0"
+upstream:
+ httpCache: 42
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/jit-enum-array.md b/tests/execution/jit-enum-array.md
index 9deef4924d..392e859c18 100644
--- a/tests/execution/jit-enum-array.md
+++ b/tests/execution/jit-enum-array.md
@@ -1,6 +1,6 @@
# Test expr with mustache
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/js-directive.md b/tests/execution/js-directive.md
index f8d7213e63..611b6c3811 100644
--- a/tests/execution/js-directive.md
+++ b/tests/execution/js-directive.md
@@ -11,8 +11,14 @@ function name(val) {
}
```
-```graphql @config
-schema @server @link(type: Script, src: "test.js") {
+```yaml @config
+links:
+ - type: Script
+ src: test.js
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/jsonplaceholder-call-post.md b/tests/execution/jsonplaceholder-call-post.md
index 5e00e0a3d0..fecba03c5d 100644
--- a/tests/execution/jsonplaceholder-call-post.md
+++ b/tests/execution/jsonplaceholder-call-post.md
@@ -1,7 +1,17 @@
# jsonplaceholder-call-post
-```graphql @config
-schema @server(port: 8000, hostname: "0.0.0.0") @upstream(httpCache: 42, batch: {delay: 100}) {
+```yaml @config
+server:
+ port: 8000
+ hostname: "0.0.0.0"
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/merge-linked-config.md b/tests/execution/merge-linked-config.md
index f5de4c41bc..e323d39f10 100644
--- a/tests/execution/merge-linked-config.md
+++ b/tests/execution/merge-linked-config.md
@@ -3,7 +3,7 @@
Merge should happen only on schema while configurations like schema, upstream, telemetry should be defined only by the root config
```graphql @file:link-1.graphql
-schema @server(port: 3000) @upstream(httpCache: 42, batch: {delay: 22}) {
+schema {
query: Query
}
@@ -17,7 +17,7 @@ type Query {
```
```graphql @file:link-2.graphql
-schema @server(port: 4000) @upstream(httpCache: 33, batch: {delay: 48}) {
+schema {
query: Query
}
@@ -38,12 +38,22 @@ type User {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(httpCache: 10, batch: {delay: 10})
- @link(src: "link-1.graphql", type: Config)
- @link(src: "link-2.graphql", type: Config) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 10
+ batch:
+ delay: 10
+links:
+ - src: "link-1.graphql"
+ type: Config
+ - src: "link-2.graphql"
+ type: Config
+```
+
+```graphql @schema
+schema {
query: Query
}
```
diff --git a/tests/execution/modified-field.md b/tests/execution/modified-field.md
index ec58787210..04af4f8cf3 100644
--- a/tests/execution/modified-field.md
+++ b/tests/execution/modified-field.md
@@ -1,6 +1,6 @@
# Modified field
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/mutation-put.md b/tests/execution/mutation-put.md
index 2c2d30ca85..4478bd90ac 100644
--- a/tests/execution/mutation-put.md
+++ b/tests/execution/mutation-put.md
@@ -1,6 +1,6 @@
# Mutation put
-```graphql @config
+```graphql @schema
schema @server {
query: Query
mutation: Mutation
diff --git a/tests/execution/mutation.md b/tests/execution/mutation.md
index 34e4e72087..ba18a43ba4 100644
--- a/tests/execution/mutation.md
+++ b/tests/execution/mutation.md
@@ -1,6 +1,6 @@
# Mutation
-```graphql @config
+```graphql @schema
schema @server {
query: Query
mutation: Mutation
diff --git a/tests/execution/n-plus-one-list.md b/tests/execution/n-plus-one-list.md
index 36319928ea..83b10457cd 100644
--- a/tests/execution/n-plus-one-list.md
+++ b/tests/execution/n-plus-one-list.md
@@ -1,7 +1,14 @@
# n + 1 Request List
-```graphql @config
-schema @upstream(batch: {delay: 1, maxSize: 1000}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/n-plus-one.md b/tests/execution/n-plus-one.md
index 8123b64f51..f27c7804be 100644
--- a/tests/execution/n-plus-one.md
+++ b/tests/execution/n-plus-one.md
@@ -1,7 +1,14 @@
# n + 1 Request
-```graphql @config
-schema @upstream(batch: {delay: 1, maxSize: 1000}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/nested-objects.md b/tests/execution/nested-objects.md
index 9441d47664..c01c23eb21 100644
--- a/tests/execution/nested-objects.md
+++ b/tests/execution/nested-objects.md
@@ -1,6 +1,6 @@
# Nested objects
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/nested-recursive-types.md b/tests/execution/nested-recursive-types.md
index 260c514eb0..63f4b7e53f 100644
--- a/tests/execution/nested-recursive-types.md
+++ b/tests/execution/nested-recursive-types.md
@@ -1,6 +1,6 @@
# Nested Recursive Type
-```graphql @config
+```graphql @schema
schema {
query: Query
mutation: Mutation
diff --git a/tests/execution/nesting-level3.md b/tests/execution/nesting-level3.md
index 34ec2c1f05..f35496051f 100644
--- a/tests/execution/nesting-level3.md
+++ b/tests/execution/nesting-level3.md
@@ -1,6 +1,6 @@
# Nesting level 3
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/non-scalar-value-in-query.md b/tests/execution/non-scalar-value-in-query.md
index bb482f4292..dc60ac6e38 100644
--- a/tests/execution/non-scalar-value-in-query.md
+++ b/tests/execution/non-scalar-value-in-query.md
@@ -4,7 +4,7 @@ error: true
# test objects in args
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/nullable-arg-query.md b/tests/execution/nullable-arg-query.md
index 86f7351032..597618031a 100644
--- a/tests/execution/nullable-arg-query.md
+++ b/tests/execution/nullable-arg-query.md
@@ -1,6 +1,6 @@
# Nullable arg query
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/omit-index-list.md b/tests/execution/omit-index-list.md
index 1bef22e400..6a12e6e163 100644
--- a/tests/execution/omit-index-list.md
+++ b/tests/execution/omit-index-list.md
@@ -1,6 +1,6 @@
# Test inline index list
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/omit-many.md b/tests/execution/omit-many.md
index 0c0a9aff51..73b42fa2b7 100644
--- a/tests/execution/omit-many.md
+++ b/tests/execution/omit-many.md
@@ -4,7 +4,7 @@ identity: true
# omit-many
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/omit-resolved-by-parent.md b/tests/execution/omit-resolved-by-parent.md
index cb138de78e..6c4575fe51 100644
--- a/tests/execution/omit-resolved-by-parent.md
+++ b/tests/execution/omit-resolved-by-parent.md
@@ -1,6 +1,6 @@
# Resolved by parent
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/on-response-body-grpc.md b/tests/execution/on-response-body-grpc.md
index 647c140bbf..0433103021 100644
--- a/tests/execution/on-response-body-grpc.md
+++ b/tests/execution/on-response-body-grpc.md
@@ -31,8 +31,19 @@ message NewsId {
}
```
-```graphql @config
-schema @server(port: 8000) @link(type: Script, src: "test.js") @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+links:
+ - type: Script
+ src: "test.js"
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/predefined-scalar.md b/tests/execution/predefined-scalar.md
index 98f91a566e..20a9e899d6 100644
--- a/tests/execution/predefined-scalar.md
+++ b/tests/execution/predefined-scalar.md
@@ -2,7 +2,7 @@
error: true
---
-```graphql @config
+```graphql @schema
scalar Boolean
scalar Float
scalar ID
diff --git a/tests/execution/recursive-types-no-resolver.md b/tests/execution/recursive-types-no-resolver.md
index 36f3b31962..5a75e871e3 100644
--- a/tests/execution/recursive-types-no-resolver.md
+++ b/tests/execution/recursive-types-no-resolver.md
@@ -6,7 +6,7 @@ error: true
Should throw error about missing resolver without panicking with stack overflow error.
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/recursive-types.md b/tests/execution/recursive-types.md
index d9f2d063a2..4db4a1f7e5 100644
--- a/tests/execution/recursive-types.md
+++ b/tests/execution/recursive-types.md
@@ -1,6 +1,6 @@
# Recursive Type
-```graphql @config
+```graphql @schema
schema @server {
query: Query
mutation: Mutation
diff --git a/tests/execution/ref-other-nested.md b/tests/execution/ref-other-nested.md
index a5d87c839a..eb9548fb62 100644
--- a/tests/execution/ref-other-nested.md
+++ b/tests/execution/ref-other-nested.md
@@ -1,6 +1,6 @@
# Ref other nested
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/ref-other.md b/tests/execution/ref-other.md
index 6f432e89f3..f435c46368 100644
--- a/tests/execution/ref-other.md
+++ b/tests/execution/ref-other.md
@@ -1,6 +1,6 @@
# Ref other
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/related-fields-recursive.md b/tests/execution/related-fields-recursive.md
index 031f922ebf..7b4b221360 100644
--- a/tests/execution/related-fields-recursive.md
+++ b/tests/execution/related-fields-recursive.md
@@ -1,5 +1,11 @@
-```graphql @config
-schema @server(port: 8000, hostname: "0.0.0.0") {
+```yaml @config
+server:
+ port: 8000
+ hostname: "0.0.0.0"
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/rename-field.md b/tests/execution/rename-field.md
index 7672687fb8..5d96ab1fbc 100644
--- a/tests/execution/rename-field.md
+++ b/tests/execution/rename-field.md
@@ -1,6 +1,6 @@
# Rename field
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/request-to-upstream-batching.md b/tests/execution/request-to-upstream-batching.md
index d9de545e0d..a08d7de48e 100644
--- a/tests/execution/request-to-upstream-batching.md
+++ b/tests/execution/request-to-upstream-batching.md
@@ -1,7 +1,16 @@
# Batched graphql request to batched upstream query
-```graphql @config
-schema @server(batchRequests: true) @upstream(batch: {maxSize: 100, delay: 1, headers: []}) {
+```yaml @config
+server:
+ batchRequests: true
+upstream:
+ batch:
+ delay: 1
+ maxSize: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/resolve-with-headers.md b/tests/execution/resolve-with-headers.md
index cae60c693a..94f769981e 100644
--- a/tests/execution/resolve-with-headers.md
+++ b/tests/execution/resolve-with-headers.md
@@ -1,7 +1,13 @@
# Resolve with headers
-```graphql @config
-schema @upstream(allowedHeaders: ["authorization"]) {
+```yaml @config
+upstream:
+ allowedHeaders:
+ - authorization
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/resolve-with-vars.md b/tests/execution/resolve-with-vars.md
index 0270f57339..f4ae0b2215 100644
--- a/tests/execution/resolve-with-vars.md
+++ b/tests/execution/resolve-with-vars.md
@@ -1,7 +1,12 @@
# Resolve with vars
-```graphql @config
-schema @server(vars: [{key: "id", value: "1"}]) {
+```yaml @config
+server:
+ vars: [{key: "id", value: "1"}]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/resolved-by-parent.md b/tests/execution/resolved-by-parent.md
index cb138de78e..6c4575fe51 100644
--- a/tests/execution/resolved-by-parent.md
+++ b/tests/execution/resolved-by-parent.md
@@ -1,6 +1,6 @@
# Resolved by parent
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/rest-api-error.md b/tests/execution/rest-api-error.md
index 3dbcc09f08..f5c72302fa 100644
--- a/tests/execution/rest-api-error.md
+++ b/tests/execution/rest-api-error.md
@@ -9,8 +9,14 @@ query ($id: Int!) @rest(method: GET, path: "/user/$id") {
}
```
-```graphql @config
-schema @server @link(type: Operation, src: "operation-user.graphql") {
+```yaml @config
+links:
+ - type: Operation
+ src: operation-user.graphql
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/rest-api-post.md b/tests/execution/rest-api-post.md
index f0af5d19ff..765bfb5978 100644
--- a/tests/execution/rest-api-post.md
+++ b/tests/execution/rest-api-post.md
@@ -9,8 +9,14 @@ query ($id: Int!) @rest(method: POST, path: "/user/$id") {
}
```
-```graphql @config
-schema @server @link(type: Operation, src: "operation-user.graphql") {
+```yaml @config
+links:
+ - type: Operation
+ src: operation-user.graphql
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/rest-api.md b/tests/execution/rest-api.md
index a4bfba8d2f..aaa87d51bf 100644
--- a/tests/execution/rest-api.md
+++ b/tests/execution/rest-api.md
@@ -9,8 +9,14 @@ query ($id: Int!) @rest(method: GET, path: "/user/$id") {
}
```
-```graphql @config
-schema @server @link(type: Operation, src: "operation-user.graphql") {
+```yaml @config
+links:
+ - type: Operation
+ src: operation-user.graphql
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/routes-param-on-server-directive.md b/tests/execution/routes-param-on-server-directive.md
index e923ff6563..e28d6d4dca 100644
--- a/tests/execution/routes-param-on-server-directive.md
+++ b/tests/execution/routes-param-on-server-directive.md
@@ -1,7 +1,15 @@
# Sending field index list
-```graphql @config
-schema @server(port: 8000, routes: {graphQL: "/tailcall-gql", status: "/health"}) {
+```yaml @config
+server:
+ port: 8000
+ routes:
+ graphQL: "/tailcall-gql"
+ status: "/health"
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/showcase.md b/tests/execution/showcase.md
index cb5c3407ab..54d53a9a74 100644
--- a/tests/execution/showcase.md
+++ b/tests/execution/showcase.md
@@ -1,7 +1,12 @@
# Showcase GraphQL Request
-```graphql @config
-schema @server(showcase: true) {
+```yaml @config
+server:
+ showcase: true
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/simple-graphql.md b/tests/execution/simple-graphql.md
index 6b589653b3..69f85e0daa 100644
--- a/tests/execution/simple-graphql.md
+++ b/tests/execution/simple-graphql.md
@@ -1,6 +1,6 @@
# Simple GraphQL Request
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/simple-query.md b/tests/execution/simple-query.md
index 557c3b7e88..e8baaf4293 100644
--- a/tests/execution/simple-query.md
+++ b/tests/execution/simple-query.md
@@ -1,6 +1,6 @@
# Simple query
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-add-field-error.md b/tests/execution/test-add-field-error.md
index a5678ba8a7..8e2fc39699 100644
--- a/tests/execution/test-add-field-error.md
+++ b/tests/execution/test-add-field-error.md
@@ -4,7 +4,7 @@ error: true
# test-add-field-error
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-add-field-list.md b/tests/execution/test-add-field-list.md
index 66ff2af2ba..561490e02b 100644
--- a/tests/execution/test-add-field-list.md
+++ b/tests/execution/test-add-field-list.md
@@ -4,7 +4,7 @@ identity: true
# test-add-field-list
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-add-field.md b/tests/execution/test-add-field.md
index a37c071624..ed77cf83ea 100644
--- a/tests/execution/test-add-field.md
+++ b/tests/execution/test-add-field.md
@@ -4,7 +4,7 @@ identity: true
# test-add-field
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-add-link-to-empty-config.md b/tests/execution/test-add-link-to-empty-config.md
index 5a7f326350..1719e2d0b5 100644
--- a/tests/execution/test-add-link-to-empty-config.md
+++ b/tests/execution/test-add-link-to-empty-config.md
@@ -4,6 +4,14 @@ identity: true
# test-add-link-to-empty-config
+```yaml @config
+links:
+ - src: "link-expr.graphql"
+ type: Config
+ - src: "link-enum.graphql"
+ type: Config
+```
+
```graphql @file:link-expr.graphql
schema @server @upstream {
query: Query
@@ -15,7 +23,7 @@ type Query {
```
```graphql @file:link-enum.graphql
-schema @server {
+schema @server @upstream {
query: Query
}
@@ -29,8 +37,8 @@ type Query {
}
```
-```graphql @config
-schema @server @upstream @link(src: "link-expr.graphql", type: Config) @link(src: "link-enum.graphql", type: Config) {
+```graphql @schema
+schema @server @upstream {
query: Query
}
```
diff --git a/tests/execution/test-alias-on-enum.md b/tests/execution/test-alias-on-enum.md
index df29b2e942..b6862cf737 100644
--- a/tests/execution/test-alias-on-enum.md
+++ b/tests/execution/test-alias-on-enum.md
@@ -1,11 +1,17 @@
# test-alias-on-enum
-```graphql @config
-schema @server(batchRequests: true) @upstream(batch: {delay: 1, headers: [], maxSize: 100}) {
- query: Query
-}
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ headers: []
+ maxSize: 100
+server:
+ batchRequests: true
+```
-schema @server(enableJIT: false) {
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-all-blueprint-errors.md b/tests/execution/test-all-blueprint-errors.md
index 433c1ebadd..b4f7cb2de8 100644
--- a/tests/execution/test-all-blueprint-errors.md
+++ b/tests/execution/test-all-blueprint-errors.md
@@ -4,7 +4,7 @@ error: true
# test-all-blueprint-errors
-```graphql @config
+```graphql @schema
schema @server {
query: Query
mutation: Mutation
diff --git a/tests/execution/test-batch-operator-post.md b/tests/execution/test-batch-operator-post.md
index 4cdb775a79..4e077a3f45 100644
--- a/tests/execution/test-batch-operator-post.md
+++ b/tests/execution/test-batch-operator-post.md
@@ -4,8 +4,14 @@ error: true
# test-batch-operator-post
-```graphql @config
-schema @server @upstream(batch: {delay: 1}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-batching-group-by.md b/tests/execution/test-batching-group-by.md
index 42cff377b8..50bd684b07 100644
--- a/tests/execution/test-batching-group-by.md
+++ b/tests/execution/test-batching-group-by.md
@@ -4,8 +4,17 @@ identity: true
# test-batching-group-by
-```graphql @config
-schema @server(port: 4000) @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) {
+```yaml @config
+server:
+ port: 4000
+upstream:
+ batch:
+ delay: 1
+ maxSize: 1000
+```
+
+```graphql @schema
+schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-cache.md b/tests/execution/test-cache.md
index 4fa0789c4d..834d379b85 100644
--- a/tests/execution/test-cache.md
+++ b/tests/execution/test-cache.md
@@ -4,7 +4,7 @@ identity: true
# test-cache
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-call-operator-errors.md b/tests/execution/test-call-operator-errors.md
index 3f70b83a89..3eb3c6f08a 100644
--- a/tests/execution/test-call-operator-errors.md
+++ b/tests/execution/test-call-operator-errors.md
@@ -4,7 +4,7 @@ error: true
# test-call-operator
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-custom-scalar.md b/tests/execution/test-custom-scalar.md
index 327ef758b0..a7a0630433 100644
--- a/tests/execution/test-custom-scalar.md
+++ b/tests/execution/test-custom-scalar.md
@@ -4,7 +4,7 @@ identity: true
# test-custom-scalar
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-custom-types.md b/tests/execution/test-custom-types.md
index 6c725d06fd..0505ec5420 100644
--- a/tests/execution/test-custom-types.md
+++ b/tests/execution/test-custom-types.md
@@ -4,7 +4,7 @@ identity: true
# test-custom-types
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Que
mutation: Mut
diff --git a/tests/execution/test-dbl-usage-many.md b/tests/execution/test-dbl-usage-many.md
index c4e88fe9fa..948270a3c3 100644
--- a/tests/execution/test-dbl-usage-many.md
+++ b/tests/execution/test-dbl-usage-many.md
@@ -1,6 +1,6 @@
# test-dbl-usage
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-dedupe.md b/tests/execution/test-dedupe.md
index f041c5615f..759e06bdec 100644
--- a/tests/execution/test-dedupe.md
+++ b/tests/execution/test-dedupe.md
@@ -1,7 +1,15 @@
# testing dedupe functionality
-```graphql @config
-schema @server(port: 8000) @upstream(batch: {delay: 1}) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ batch:
+ delay: 1
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-description-many.md b/tests/execution/test-description-many.md
index 12f6243b92..ae5ebafbab 100644
--- a/tests/execution/test-description-many.md
+++ b/tests/execution/test-description-many.md
@@ -4,7 +4,7 @@ identity: true
# test-description-many
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-directives-undef-null-fields.md b/tests/execution/test-directives-undef-null-fields.md
index 5db0b02de4..bce693d365 100644
--- a/tests/execution/test-directives-undef-null-fields.md
+++ b/tests/execution/test-directives-undef-null-fields.md
@@ -4,8 +4,13 @@ error: true
# test-directives-undef-null-fields
-```graphql @config
-schema @server(vars: [{key: "a", value: "1"}, {key: "c", value: "d"}]) {
+```yaml @config
+server:
+ vars: [{key: "a", value: "1"}, {key: "c", value: "d"}]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-discriminator-invalid.md b/tests/execution/test-discriminator-invalid.md
index 47e450edf0..1e91f9b65f 100644
--- a/tests/execution/test-discriminator-invalid.md
+++ b/tests/execution/test-discriminator-invalid.md
@@ -4,7 +4,7 @@ error: true
# Test union type resolve
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-duplicated-link.md b/tests/execution/test-duplicated-link.md
index 521197171b..e5acfa07ac 100644
--- a/tests/execution/test-duplicated-link.md
+++ b/tests/execution/test-duplicated-link.md
@@ -4,8 +4,27 @@ error: true
# test-duplicated-link
+```yaml @config
+links:
+ - id: placeholder
+ src: jsonplaceholder.graphql
+ type: Config
+ - id: placeholder1
+ src: jsonplaceholder.graphql
+ type: Config
+ - id: placeholder1
+ src: jsonplaceholder.graphql
+ type: Config
+ - id: placeholder2
+ src: jsonplaceholder.graphql
+ type: Config
+ - id: placeholder2
+ src: jsonplaceholder.graphql
+ type: Config
+```
+
```graphql @file:jsonplaceholder.graphql
-schema @server(port: 8000, hostname: "0.0.0.0") @upstream(httpCache: 42, batch: {delay: 100}) {
+schema {
query: Query
}
@@ -33,13 +52,8 @@ type Post {
}
```
-```graphql @config
-schema
- @link(type: Config, src: "jsonplaceholder.graphql", id: "placeholder")
- @link(type: Config, src: "jsonplaceholder.graphql", id: "placeholder1")
- @link(type: Config, src: "jsonplaceholder.graphql", id: "placeholder1")
- @link(type: Config, src: "jsonplaceholder.graphql", id: "placeholder2")
- @link(type: Config, src: "jsonplaceholder.graphql", id: "placeholder2") {
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-empty-link.md b/tests/execution/test-empty-link.md
index 3f23f3470a..6306ae1d0a 100644
--- a/tests/execution/test-empty-link.md
+++ b/tests/execution/test-empty-link.md
@@ -4,8 +4,15 @@ error: true
# test-empty-link
-```graphql @config
-schema @link(type: Config, src: "") @link(type: Config) {
+```yaml @config
+links:
+ - type: Config
+ src: ""
+ - type: Config
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-enable-jit.md b/tests/execution/test-enable-jit.md
index 71b08311e7..1bb78a32c3 100644
--- a/tests/execution/test-enable-jit.md
+++ b/tests/execution/test-enable-jit.md
@@ -1,7 +1,14 @@
# test-enable-jit
-```graphql @config
-schema @server(port: 8000, hostname: "0.0.0.0", enableJIT: true) {
+```yaml @config
+server:
+ port: 8000
+ hostname: "0.0.0.0"
+ enableJIT: true
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-enum-aliases.md b/tests/execution/test-enum-aliases.md
index d45048b889..b66250b71f 100644
--- a/tests/execution/test-enum-aliases.md
+++ b/tests/execution/test-enum-aliases.md
@@ -4,7 +4,7 @@ identity: true
# test-enum-aliases
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-enum-as-argument.md b/tests/execution/test-enum-as-argument.md
index e7c03ae191..4d774dc3c6 100644
--- a/tests/execution/test-enum-as-argument.md
+++ b/tests/execution/test-enum-as-argument.md
@@ -1,6 +1,6 @@
# test enum as argument
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-enum-default.md b/tests/execution/test-enum-default.md
index d069982aac..096cbb71e3 100644
--- a/tests/execution/test-enum-default.md
+++ b/tests/execution/test-enum-default.md
@@ -28,12 +28,22 @@ message NewsList {
}
```
-```graphql @config
+```yaml @config
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+server:
+ port: 8080
+links:
+ - id: "news"
+ src: "./service.proto"
+ type: Protobuf
+```
+
+```graphql @schema
# for test upstream server see [repo](https://github.com/tailcallhq/rust-grpc)
-schema
- @server(port: 8080)
- @upstream(httpCache: 42, batch: {delay: 10})
- @link(id: "news", src: "./service.proto", type: Protobuf) {
+schema {
query: Query
}
diff --git a/tests/execution/test-enum-description.md b/tests/execution/test-enum-description.md
index 2e8deca038..7821931f8a 100644
--- a/tests/execution/test-enum-description.md
+++ b/tests/execution/test-enum-description.md
@@ -4,7 +4,7 @@ identity: true
# test-enum-description
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-enum-empty.md b/tests/execution/test-enum-empty.md
index c1d3ebcf55..e325f28dd0 100644
--- a/tests/execution/test-enum-empty.md
+++ b/tests/execution/test-enum-empty.md
@@ -4,7 +4,7 @@ error: true
# test-enum-empty
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-enum-merge.md b/tests/execution/test-enum-merge.md
index 49f776448f..48b7c9fec7 100644
--- a/tests/execution/test-enum-merge.md
+++ b/tests/execution/test-enum-merge.md
@@ -1,6 +1,6 @@
# test-enum-merge
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
@@ -15,7 +15,7 @@ type Query {
}
```
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-enum.md b/tests/execution/test-enum.md
index 7417e1b912..826487e8a1 100644
--- a/tests/execution/test-enum.md
+++ b/tests/execution/test-enum.md
@@ -4,7 +4,7 @@ identity: true
# test-enum
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-eval-partial.md b/tests/execution/test-eval-partial.md
index 9114e22438..4474f128f3 100644
--- a/tests/execution/test-eval-partial.md
+++ b/tests/execution/test-eval-partial.md
@@ -1,5 +1,14 @@
-```graphql @config
-schema @server(port: 8080) @upstream(httpCache: 42, batch: {delay: 100}) {
+```yaml @config
+server:
+ port: 8080
+upstream:
+ httpCache: 42
+ batch:
+ delay: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-expr-error.md b/tests/execution/test-expr-error.md
index 4967026f34..27a253ade7 100644
--- a/tests/execution/test-expr-error.md
+++ b/tests/execution/test-expr-error.md
@@ -4,7 +4,7 @@ error: true
# test-expr-error
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-expr-scalar-as-string.md b/tests/execution/test-expr-scalar-as-string.md
index f3cd83f15d..e1578cdc7f 100644
--- a/tests/execution/test-expr-scalar-as-string.md
+++ b/tests/execution/test-expr-scalar-as-string.md
@@ -1,6 +1,6 @@
# Test expr for data that contains scalar type in string
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-expr-with-add-field.md b/tests/execution/test-expr-with-add-field.md
index 29a8f4ff56..b12c4560fb 100644
--- a/tests/execution/test-expr-with-add-field.md
+++ b/tests/execution/test-expr-with-add-field.md
@@ -4,7 +4,7 @@ error: true
# test-expr-with-add-field
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-expr-with-inline.md b/tests/execution/test-expr-with-inline.md
index 9e137d6c61..0036b8336a 100644
--- a/tests/execution/test-expr-with-inline.md
+++ b/tests/execution/test-expr-with-inline.md
@@ -4,7 +4,7 @@ error: true
# test-expr-with-inline
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-expr-with-mustache.md b/tests/execution/test-expr-with-mustache.md
index 71fa826d4a..727b58762f 100644
--- a/tests/execution/test-expr-with-mustache.md
+++ b/tests/execution/test-expr-with-mustache.md
@@ -1,6 +1,6 @@
# Test expr with mustache
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-expr.md b/tests/execution/test-expr.md
index dc633248fa..3ac5246e26 100644
--- a/tests/execution/test-expr.md
+++ b/tests/execution/test-expr.md
@@ -4,7 +4,7 @@ identity: true
# test-expr
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-field-already-implemented-from-Interface.md b/tests/execution/test-field-already-implemented-from-Interface.md
index cb6b3f3dd5..41c8d90606 100644
--- a/tests/execution/test-field-already-implemented-from-Interface.md
+++ b/tests/execution/test-field-already-implemented-from-Interface.md
@@ -4,7 +4,7 @@ error: true
# test-field-already-implemented-from-Interface
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-graphql-with-add-field.md b/tests/execution/test-graphql-with-add-field.md
index 202b39d00d..accb44ea4f 100644
--- a/tests/execution/test-graphql-with-add-field.md
+++ b/tests/execution/test-graphql-with-add-field.md
@@ -4,7 +4,7 @@ error: true
# test-graphql-with-add-field
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-graphqlsource-no-base-url.md b/tests/execution/test-graphqlsource-no-base-url.md
index d17f9bbffa..ee69186c7d 100644
--- a/tests/execution/test-graphqlsource-no-base-url.md
+++ b/tests/execution/test-graphqlsource-no-base-url.md
@@ -4,7 +4,7 @@ error: true
# test-graphqlsource-no-base-url
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-graphqlsource.md b/tests/execution/test-graphqlsource.md
index 6a9728b0a0..bd87700218 100644
--- a/tests/execution/test-graphqlsource.md
+++ b/tests/execution/test-graphqlsource.md
@@ -4,7 +4,7 @@ identity: true
# test-graphqlsource
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-groupby-without-batching.md b/tests/execution/test-groupby-without-batching.md
index 53a82c4fbf..7526b7df01 100644
--- a/tests/execution/test-groupby-without-batching.md
+++ b/tests/execution/test-groupby-without-batching.md
@@ -4,7 +4,7 @@ error: true
# test-groupby-without-batching
-```graphql @config
+```graphql @schema
schema @upstream(httpCache: 42) {
query: Query
}
diff --git a/tests/execution/test-grpc-group-by.md b/tests/execution/test-grpc-group-by.md
index 397366b11e..84e1a1570e 100644
--- a/tests/execution/test-grpc-group-by.md
+++ b/tests/execution/test-grpc-group-by.md
@@ -40,11 +40,21 @@ message NewsList {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(httpCache: 42, batch: {delay: 10})
- @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-grpc-invalid-method-format.md b/tests/execution/test-grpc-invalid-method-format.md
index 8553448234..4f2aef01be 100644
--- a/tests/execution/test-grpc-invalid-method-format.md
+++ b/tests/execution/test-grpc-invalid-method-format.md
@@ -4,7 +4,7 @@ error: true
# test-grpc-invalid-method-format
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-grpc-invalid-proto-id.md b/tests/execution/test-grpc-invalid-proto-id.md
index 647a7e8a03..307f5dd32b 100644
--- a/tests/execution/test-grpc-invalid-proto-id.md
+++ b/tests/execution/test-grpc-invalid-proto-id.md
@@ -4,7 +4,7 @@ error: true
# test-grpc-invalid-proto-id
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-grpc-missing-fields.md b/tests/execution/test-grpc-missing-fields.md
index c7cd3a6acf..334c5c0060 100644
--- a/tests/execution/test-grpc-missing-fields.md
+++ b/tests/execution/test-grpc-missing-fields.md
@@ -39,8 +39,15 @@ message NewsList {
}
```
-```graphql @config
-schema @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+links:
+ - id: news
+ src: news.proto
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-grpc-nested-data.md b/tests/execution/test-grpc-nested-data.md
index ec29ca987e..17b0751eb7 100644
--- a/tests/execution/test-grpc-nested-data.md
+++ b/tests/execution/test-grpc-nested-data.md
@@ -40,11 +40,21 @@ message NewsList {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(httpCache: 42, batch: {delay: 10})
- @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ httpCache: 42
+ batch:
+ delay: 10
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-grpc-nested-optional.md b/tests/execution/test-grpc-nested-optional.md
index 4738c57ef3..cf3073000c 100644
--- a/tests/execution/test-grpc-nested-optional.md
+++ b/tests/execution/test-grpc-nested-optional.md
@@ -40,8 +40,15 @@ message NewsList {
}
```
-```graphql @config
-schema @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+links:
+ - id: news
+ src: news.proto
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-grpc-optional.md b/tests/execution/test-grpc-optional.md
index 8ab1f9f632..898e53874e 100644
--- a/tests/execution/test-grpc-optional.md
+++ b/tests/execution/test-grpc-optional.md
@@ -40,8 +40,15 @@ message NewsList {
}
```
-```graphql @config
-schema @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+links:
+ - id: news
+ src: news.proto
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-grpc-proto-path.md b/tests/execution/test-grpc-proto-path.md
index 97e39e24e4..edf016e3e0 100644
--- a/tests/execution/test-grpc-proto-path.md
+++ b/tests/execution/test-grpc-proto-path.md
@@ -4,8 +4,15 @@ error: true
# test-grpc-proto-path
-```graphql @config
-schema @link(id: "news", src: "tailcall/src/grpcnews.proto", type: Protobuf) {
+```yaml @config
+links:
+ - id: news
+ src: tailcall/src/grpcnews.proto
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-grpc-service-method.md b/tests/execution/test-grpc-service-method.md
index 4042cef8da..8d8424ca37 100644
--- a/tests/execution/test-grpc-service-method.md
+++ b/tests/execution/test-grpc-service-method.md
@@ -40,8 +40,15 @@ message NewsList {
}
```
-```graphql @config
-schema @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+links:
+ - id: news
+ src: news.proto
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-grpc-service.md b/tests/execution/test-grpc-service.md
index d3b5e9875d..dc482bd3b3 100644
--- a/tests/execution/test-grpc-service.md
+++ b/tests/execution/test-grpc-service.md
@@ -40,8 +40,15 @@ message NewsList {
}
```
-```graphql @config
-schema @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+links:
+ - id: news
+ src: news.proto
+ type: Protobuf
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-grpc.md b/tests/execution/test-grpc.md
index 92a7cb4f61..314f7ccbcc 100644
--- a/tests/execution/test-grpc.md
+++ b/tests/execution/test-grpc.md
@@ -40,11 +40,21 @@ message NewsList {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(batch: {delay: 10, headers: [], maxSize: 1000})
- @link(id: "news", src: "news.proto", type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ batch:
+ delay: 10
+ maxSize: 1000
+links:
+ - id: "news"
+ src: "news.proto"
+ type: Protobuf
+```
+
+```graphql @schema
+schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-hostname-faliure.md b/tests/execution/test-hostname-faliure.md
index c6db06ef99..008532e07f 100644
--- a/tests/execution/test-hostname-faliure.md
+++ b/tests/execution/test-hostname-faliure.md
@@ -4,8 +4,13 @@ error: true
# test-hostname-faliure
-```graphql @config
-schema @server(hostname: "abc") {
+```yaml @config
+server:
+ hostname: abc
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-http-baseurl.md b/tests/execution/test-http-baseurl.md
index 88502b2cbe..d63aada446 100644
--- a/tests/execution/test-http-baseurl.md
+++ b/tests/execution/test-http-baseurl.md
@@ -4,7 +4,7 @@ identity: true
# test-http-url
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-http-batchKey.md b/tests/execution/test-http-batchKey.md
index 2d952368e6..ff691edb8f 100644
--- a/tests/execution/test-http-batchKey.md
+++ b/tests/execution/test-http-batchKey.md
@@ -1,7 +1,16 @@
# Http with args as body
-```graphql @config
-schema @server(port: 8000) @upstream(batch: {maxSize: 1000, delay: 10}) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ batch:
+ delay: 10
+ maxSize: 1000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-http-headers.md b/tests/execution/test-http-headers.md
index 30e7ee81e3..98694e2002 100644
--- a/tests/execution/test-http-headers.md
+++ b/tests/execution/test-http-headers.md
@@ -4,7 +4,7 @@ identity: true
# test-http-headers
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-http-tmpl.md b/tests/execution/test-http-tmpl.md
index 38cccf1537..3dbadb42eb 100644
--- a/tests/execution/test-http-tmpl.md
+++ b/tests/execution/test-http-tmpl.md
@@ -4,7 +4,7 @@ identity: true
# test-http-tmpl
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-http-with-add-field.md b/tests/execution/test-http-with-add-field.md
index 667ecab7d9..3287d83d76 100644
--- a/tests/execution/test-http-with-add-field.md
+++ b/tests/execution/test-http-with-add-field.md
@@ -4,7 +4,7 @@ error: true
# test-http-with-add-field
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-http-with-inline.md b/tests/execution/test-http-with-inline.md
index 987e950b37..79fcbe31c6 100644
--- a/tests/execution/test-http-with-inline.md
+++ b/tests/execution/test-http-with-inline.md
@@ -4,7 +4,7 @@ error: true
# test-http-with-inline
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-http-with-mustache-expr.md b/tests/execution/test-http-with-mustache-expr.md
index c8c7fc45a7..2d49c09dd8 100644
--- a/tests/execution/test-http-with-mustache-expr.md
+++ b/tests/execution/test-http-with-mustache-expr.md
@@ -1,6 +1,6 @@
# Test expr with mustache
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-http.md b/tests/execution/test-http.md
index 7db87c9881..8495a74089 100644
--- a/tests/execution/test-http.md
+++ b/tests/execution/test-http.md
@@ -4,7 +4,7 @@ identity: true
# test-http
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-inline-error.md b/tests/execution/test-inline-error.md
index 4ef115d3f2..645363281e 100644
--- a/tests/execution/test-inline-error.md
+++ b/tests/execution/test-inline-error.md
@@ -4,7 +4,7 @@ error: true
# test-inline-error
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-inline-list.md b/tests/execution/test-inline-list.md
index 77236cb184..51a26a57e2 100644
--- a/tests/execution/test-inline-list.md
+++ b/tests/execution/test-inline-list.md
@@ -4,7 +4,7 @@ identity: true
# test-inline-list
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-inline.md b/tests/execution/test-inline.md
index b71b56bbba..cb86ff531c 100644
--- a/tests/execution/test-inline.md
+++ b/tests/execution/test-inline.md
@@ -4,7 +4,7 @@ identity: true
# test-inline
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-input-documentation.md b/tests/execution/test-input-documentation.md
index ea4d15697f..831fc4cb83 100644
--- a/tests/execution/test-input-documentation.md
+++ b/tests/execution/test-input-documentation.md
@@ -4,7 +4,7 @@ identity: true
# test-input-type-documentation
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
mutation: Mutation
diff --git a/tests/execution/test-input-out.md b/tests/execution/test-input-out.md
index e3d5ee7fa1..aac28f66ea 100644
--- a/tests/execution/test-input-out.md
+++ b/tests/execution/test-input-out.md
@@ -1,6 +1,6 @@
# test-input-type
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-input-with-arg-out.md b/tests/execution/test-input-with-arg-out.md
index f4f2e3dc88..558c6c3c1b 100644
--- a/tests/execution/test-input-with-arg-out.md
+++ b/tests/execution/test-input-with-arg-out.md
@@ -1,6 +1,6 @@
# test-input-with-arg-type
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-interface-result.md b/tests/execution/test-interface-result.md
index e538790eb8..2d43e2432a 100644
--- a/tests/execution/test-interface-result.md
+++ b/tests/execution/test-interface-result.md
@@ -4,7 +4,7 @@ identity: true
# test-interface-result
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-interface.md b/tests/execution/test-interface.md
index 01459506d4..47f49fc6c0 100644
--- a/tests/execution/test-interface.md
+++ b/tests/execution/test-interface.md
@@ -4,7 +4,7 @@ identity: true
# test-interface
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-invalid-add-field.md b/tests/execution/test-invalid-add-field.md
index a66cff16d1..266c6f58e3 100644
--- a/tests/execution/test-invalid-add-field.md
+++ b/tests/execution/test-invalid-add-field.md
@@ -4,7 +4,7 @@ error: true
# Test invalid add fields
-```graphql @config
+```graphql @schema
schema @server(port: 8000) {
query: Query
}
diff --git a/tests/execution/test-invalid-query-in-http.md b/tests/execution/test-invalid-query-in-http.md
index 26453a2d3c..5658edc72f 100644
--- a/tests/execution/test-invalid-query-in-http.md
+++ b/tests/execution/test-invalid-query-in-http.md
@@ -4,7 +4,7 @@ error: true
# test-invalid-query-in-http
-```graphql @config
+```graphql @schema
schema @server(vars: [{key: "id", value: "1"}]) {
query: Query
}
diff --git a/tests/execution/test-invalid-server.md b/tests/execution/test-invalid-server.md
index ca556bb200..97b1e41f7c 100644
--- a/tests/execution/test-invalid-server.md
+++ b/tests/execution/test-invalid-server.md
@@ -4,7 +4,7 @@ error: true
# test-invalid-server
-```graphql @config
+```graphql @schema
schema @server(port: "8000") {
query: Query
}
diff --git a/tests/execution/test-js-multi-onRequest-handlers.md b/tests/execution/test-js-multi-onRequest-handlers.md
index 94d54c7532..004ee02a39 100644
--- a/tests/execution/test-js-multi-onRequest-handlers.md
+++ b/tests/execution/test-js-multi-onRequest-handlers.md
@@ -28,8 +28,16 @@ function bar({request}) {
}
```
-```graphql @config
-schema @server @upstream(onRequest: "foo") @link(type: Script, src: "test1.js") {
+```yml @config
+upstream:
+ onRequest: "foo"
+links:
+ - type: Script
+ src: "test1.js"
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-js-multiple-scripts.md b/tests/execution/test-js-multiple-scripts.md
index 9fc3038d41..9d7216a982 100644
--- a/tests/execution/test-js-multiple-scripts.md
+++ b/tests/execution/test-js-multiple-scripts.md
@@ -12,8 +12,18 @@ function onRequest(request) {}
function onRequest(request) {}
```
-```graphql @config
-schema @server @link(type: Script, src: "test1.js") @link(type: Script, src: "test2.js") {
+```yml @config
+upstream:
+ onRequest: "onRequest"
+links:
+ - type: Script
+ src: "test1.js"
+ - type: Script
+ src: "test2.js"
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-js-request-response-2.md b/tests/execution/test-js-request-response-2.md
index 85ca90874f..1d7246cc84 100644
--- a/tests/execution/test-js-request-response-2.md
+++ b/tests/execution/test-js-request-response-2.md
@@ -24,8 +24,16 @@ function onRequest({request}) {
}
```
-```graphql @config
-schema @server @upstream(onRequest: "onRequest") @link(type: Script, src: "test.js") {
+```yml @config
+upstream:
+ onRequest: "onRequest"
+links:
+ - type: Script
+ src: "test.js"
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-js-request-response.md b/tests/execution/test-js-request-response.md
index b1173ab755..2a8b5241ae 100644
--- a/tests/execution/test-js-request-response.md
+++ b/tests/execution/test-js-request-response.md
@@ -22,8 +22,16 @@ function onRequest({request}) {
}
```
-```graphql @config
-schema @server @upstream(onRequest: "onRequest") @link(type: Script, src: "test.js") {
+```yml @config
+upstream:
+ onRequest: "onRequest"
+links:
+ - type: Script
+ src: "test.js"
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-lack-resolver.md b/tests/execution/test-lack-resolver.md
index 06c915f7ad..f032f3c66d 100644
--- a/tests/execution/test-lack-resolver.md
+++ b/tests/execution/test-lack-resolver.md
@@ -4,7 +4,7 @@ error: true
# test-lack-resolver
-```graphql @config
+```graphql @schema
schema @server(port: 8000) {
query: Query
}
diff --git a/tests/execution/test-link-support.md b/tests/execution/test-link-support.md
index cba33c2127..6465f5a23a 100644
--- a/tests/execution/test-link-support.md
+++ b/tests/execution/test-link-support.md
@@ -24,11 +24,24 @@ message NewsId {
}
```
-```graphql @config
-schema
- @server(port: 8000)
- @upstream(batch: {delay: 10, headers: [], maxSize: 1000})
- @link(id: "news", src: "news.proto", meta: {description: "Test"}, type: Protobuf) {
+```yaml @config
+server:
+ port: 8000
+upstream:
+ batch:
+ delay: 10
+ headers: []
+ maxSize: 1000
+links:
+ - id: "news"
+ src: "news.proto"
+ meta:
+ description: "Test"
+ type: Protobuf
+```
+
+```graphql @schema
+schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-list-args.md b/tests/execution/test-list-args.md
index b24706da6a..5cf516a44f 100644
--- a/tests/execution/test-list-args.md
+++ b/tests/execution/test-list-args.md
@@ -1,7 +1,12 @@
# With List args
-```graphql @config
-schema @server(queryValidation: true) {
+```yaml @config
+server:
+ queryValidation: true
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-merge-input.md b/tests/execution/test-merge-input.md
index 11deca1961..bbcb2a17b0 100644
--- a/tests/execution/test-merge-input.md
+++ b/tests/execution/test-merge-input.md
@@ -1,7 +1,7 @@
# Test merge input
-```graphql @config
-schema @server {
+```graphql @schema
+schema {
query: Query
}
@@ -15,8 +15,8 @@ type Query {
}
```
-```graphql @config
-schema @server {
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-merge-invalid.md b/tests/execution/test-merge-invalid.md
index 71cb0b0838..1a1f850dd3 100644
--- a/tests/execution/test-merge-invalid.md
+++ b/tests/execution/test-merge-invalid.md
@@ -4,7 +4,7 @@ error: true
# Test merge error
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
@@ -18,7 +18,7 @@ type Foo {
}
```
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-merge-nested.md b/tests/execution/test-merge-nested.md
index 34aad648af..a64b764fb5 100644
--- a/tests/execution/test-merge-nested.md
+++ b/tests/execution/test-merge-nested.md
@@ -1,12 +1,12 @@
# test-merge-nested
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
type Query {
- hi: Foo @expr(body: "world")
+ hi: Foo @expr(body: {b: "hello"})
}
type Foo {
@@ -17,7 +17,7 @@ type Foo {
}
```
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-merge-right-with-link-config.md b/tests/execution/test-merge-right-with-link-config.md
index ac3d4e561f..6980b2e03e 100644
--- a/tests/execution/test-merge-right-with-link-config.md
+++ b/tests/execution/test-merge-right-with-link-config.md
@@ -1,13 +1,21 @@
# test-merge-right-with-link-config
+```yaml @config
+upstream:
+ allowedHeaders: ["Authorization"]
+links:
+ - src: "stripe-types.graphql"
+ type: Config
+```
+
```graphql @file:stripe-types.graphql
type Foo {
bar: String
}
```
-```graphql @config
-schema @upstream(allowedHeaders: ["Authorization"]) @link(src: "stripe-types.graphql", type: Config) {
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-merge-server-sdl.md b/tests/execution/test-merge-server-sdl.md
index 96f777374d..d3cc61c17c 100644
--- a/tests/execution/test-merge-server-sdl.md
+++ b/tests/execution/test-merge-server-sdl.md
@@ -1,6 +1,6 @@
# test-merge-server-sdl
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-merge-union.md b/tests/execution/test-merge-union.md
index ac69f3872a..602fd84298 100644
--- a/tests/execution/test-merge-union.md
+++ b/tests/execution/test-merge-union.md
@@ -1,6 +1,6 @@
# test-merge-union
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
@@ -20,7 +20,7 @@ type Query {
}
```
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-missing-argument-on-all-resolvers.md b/tests/execution/test-missing-argument-on-all-resolvers.md
index 6c9b6499ee..2a8e5c7582 100644
--- a/tests/execution/test-missing-argument-on-all-resolvers.md
+++ b/tests/execution/test-missing-argument-on-all-resolvers.md
@@ -40,7 +40,14 @@ message NewsList {
}
```
-```graphql @config
+```yaml @config
+links:
+ - id: news
+ type: Protobuf
+ src: news.proto
+```
+
+```graphql @schema
schema @link(id: "news", src: "news.proto", type: Protobuf) {
query: Query
}
diff --git a/tests/execution/test-missing-mutation-resolver.md b/tests/execution/test-missing-mutation-resolver.md
index c52e7e29f0..9a77d25851 100644
--- a/tests/execution/test-missing-mutation-resolver.md
+++ b/tests/execution/test-missing-mutation-resolver.md
@@ -4,7 +4,7 @@ error: true
# test-missing-mutation-resolver
-```graphql @config
+```graphql @schema
schema {
query: Query
mutation: Mutation
diff --git a/tests/execution/test-missing-query-resolver.md b/tests/execution/test-missing-query-resolver.md
index c19168fe30..7b56b01921 100644
--- a/tests/execution/test-missing-query-resolver.md
+++ b/tests/execution/test-missing-query-resolver.md
@@ -4,7 +4,7 @@ error: true
# test-missing-query-resolver
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-missing-root-types.md b/tests/execution/test-missing-root-types.md
index 637c00706b..aed509c744 100644
--- a/tests/execution/test-missing-root-types.md
+++ b/tests/execution/test-missing-root-types.md
@@ -4,7 +4,7 @@ error: true
# test-missing-root-types
-```graphql @config
+```graphql @schema
schema {
query: QueryType
mutation: MutationDef
diff --git a/tests/execution/test-missing-schema-query.md b/tests/execution/test-missing-schema-query.md
index 92c4030d26..2793917667 100644
--- a/tests/execution/test-missing-schema-query.md
+++ b/tests/execution/test-missing-schema-query.md
@@ -4,7 +4,7 @@ error: true
# test-missing-schema-query
-```graphql @config
+```graphql @schema
schema {
mutation: Mutation
}
diff --git a/tests/execution/test-modify.md b/tests/execution/test-modify.md
index 35dbec5c66..d5f33f395b 100644
--- a/tests/execution/test-modify.md
+++ b/tests/execution/test-modify.md
@@ -4,7 +4,7 @@ identity: true
# test-modify
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-multi-interface.md b/tests/execution/test-multi-interface.md
index c0f49847cb..c9dde93bf5 100644
--- a/tests/execution/test-multi-interface.md
+++ b/tests/execution/test-multi-interface.md
@@ -4,7 +4,7 @@ identity: true
# test-multi-interface
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-multiple-config-types.md b/tests/execution/test-multiple-config-types.md
index 53b026b70a..7bb1a3dcd3 100644
--- a/tests/execution/test-multiple-config-types.md
+++ b/tests/execution/test-multiple-config-types.md
@@ -1,7 +1,14 @@
# Multiple Configs
-```graphql @config
-schema @server @link(id: "types", type: Config, src: "types.graphql") {
+```yaml @config
+links:
+ - id: types
+ type: Config
+ src: types.graphql
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-multiple-resolvable-directives-on-field-validation.md b/tests/execution/test-multiple-resolvable-directives-on-field-validation.md
index 18f27eaa63..02998028ed 100644
--- a/tests/execution/test-multiple-resolvable-directives-on-field-validation.md
+++ b/tests/execution/test-multiple-resolvable-directives-on-field-validation.md
@@ -4,7 +4,7 @@ error: true
# Test validation for multiple resolvable directives on field
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-multiple-resolvable-directives-on-field.md b/tests/execution/test-multiple-resolvable-directives-on-field.md
index c666e81b70..d1216038cc 100644
--- a/tests/execution/test-multiple-resolvable-directives-on-field.md
+++ b/tests/execution/test-multiple-resolvable-directives-on-field.md
@@ -1,6 +1,6 @@
# Multiple resolvable directives on field
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-nested-input.md b/tests/execution/test-nested-input.md
index b4cf9150d3..dd703e4c2d 100644
--- a/tests/execution/test-nested-input.md
+++ b/tests/execution/test-nested-input.md
@@ -4,7 +4,7 @@ identity: true
# test-nested-input
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-nested-value.md b/tests/execution/test-nested-value.md
index adbca01b28..65afcd0fae 100644
--- a/tests/execution/test-nested-value.md
+++ b/tests/execution/test-nested-value.md
@@ -4,7 +4,7 @@ identity: true
# test-nested-value
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-no-base-url.md b/tests/execution/test-no-base-url.md
index 7cfe23fe58..0f0f013ee8 100644
--- a/tests/execution/test-no-base-url.md
+++ b/tests/execution/test-no-base-url.md
@@ -4,7 +4,7 @@ error: true
# test-no-base-url
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/test-null-in-array.md b/tests/execution/test-null-in-array.md
index 9eb7fd3abc..b0a56bac0d 100644
--- a/tests/execution/test-null-in-array.md
+++ b/tests/execution/test-null-in-array.md
@@ -1,6 +1,6 @@
# Empty Array Response
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-null-in-object.md b/tests/execution/test-null-in-object.md
index de14c23ed1..6afe0159a2 100644
--- a/tests/execution/test-null-in-object.md
+++ b/tests/execution/test-null-in-object.md
@@ -1,6 +1,6 @@
# Empty Object Response
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-omit-list.md b/tests/execution/test-omit-list.md
index 4b3aa019ae..412db1cd22 100644
--- a/tests/execution/test-omit-list.md
+++ b/tests/execution/test-omit-list.md
@@ -4,7 +4,7 @@ identity: true
# test-omit-list
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-omit.md b/tests/execution/test-omit.md
index 690406b899..442288dc43 100644
--- a/tests/execution/test-omit.md
+++ b/tests/execution/test-omit.md
@@ -4,7 +4,7 @@ identity: true
# test-omit
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-on-response-body.md b/tests/execution/test-on-response-body.md
index d7263816c8..bf8e67023a 100644
--- a/tests/execution/test-on-response-body.md
+++ b/tests/execution/test-on-response-body.md
@@ -8,8 +8,14 @@ function onResponse(data) {
}
```
-```graphql @config
-schema @server @link(type: Script, src: "test.js") {
+```yaml @config
+links:
+ - src: test.js
+ type: Script
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-optional-key-skip-empty.md b/tests/execution/test-optional-key-skip-empty.md
index 026ca35e16..e45dcc0fcf 100644
--- a/tests/execution/test-optional-key-skip-empty.md
+++ b/tests/execution/test-optional-key-skip-empty.md
@@ -1,7 +1,12 @@
# Setting SkipEmpty
-```graphql @config
-schema @server(port: 8000) {
+```yaml @config
+server:
+ port: 8000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-params-as-body.md b/tests/execution/test-params-as-body.md
index 2dfd14680f..6ddd0d217e 100644
--- a/tests/execution/test-params-as-body.md
+++ b/tests/execution/test-params-as-body.md
@@ -1,7 +1,12 @@
# Http with args as body
-```graphql @config
-schema @server(port: 8000) {
+```yaml @config
+server:
+ port: 8000
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-query-documentation.md b/tests/execution/test-query-documentation.md
index 2054adbc71..b3388016de 100644
--- a/tests/execution/test-query-documentation.md
+++ b/tests/execution/test-query-documentation.md
@@ -4,7 +4,7 @@ identity: true
# test-query-documentation
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-query.md b/tests/execution/test-query.md
index 0a0c443bb2..b22b9a4514 100644
--- a/tests/execution/test-query.md
+++ b/tests/execution/test-query.md
@@ -4,7 +4,7 @@ identity: true
# test-query
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-ref-other.md b/tests/execution/test-ref-other.md
index b67fadd0f1..f6ebe70277 100644
--- a/tests/execution/test-ref-other.md
+++ b/tests/execution/test-ref-other.md
@@ -4,7 +4,12 @@ identity: true
# test-ref-other
-```graphql @config
+```yaml @config
+server:
+ port: 8000
+```
+
+```graphql @schema
schema @server(port: 8000) @upstream {
query: Query
}
diff --git a/tests/execution/test-required-fields.md b/tests/execution/test-required-fields.md
index 341c1c1a0a..de00ca71c8 100644
--- a/tests/execution/test-required-fields.md
+++ b/tests/execution/test-required-fields.md
@@ -1,6 +1,6 @@
# Test API
-```graphql @config
+```graphql @schema
schema @server(enableJIT: true) {
query: Query
}
diff --git a/tests/execution/test-response-header-value.md b/tests/execution/test-response-header-value.md
index 804493af78..2710a92db6 100644
--- a/tests/execution/test-response-header-value.md
+++ b/tests/execution/test-response-header-value.md
@@ -4,8 +4,14 @@ error: true
# test-response-header-value
-```graphql @config
-schema @server(headers: {custom: [{key: "a", value: "a \n b"}]}) {
+```yaml @config
+server:
+ headers:
+ custom: [{key: "a", value: "a \n b"}]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-response-headers-multi.md b/tests/execution/test-response-headers-multi.md
index 8c16b1965c..30bc1e7d63 100644
--- a/tests/execution/test-response-headers-multi.md
+++ b/tests/execution/test-response-headers-multi.md
@@ -4,8 +4,14 @@ error: true
# test-response-headers-multi
-```graphql @config
-schema @server(headers: {custom: [{key: "a b", value: "a \n b"}, {key: "a c", value: "a \n b"}]}) {
+```yaml @config
+server:
+ headers:
+ custom: [{key: "a b", value: "a \n b"}, {key: "a c", value: "a \n b"}]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-response-headers-name.md b/tests/execution/test-response-headers-name.md
index 387a6e1791..6c705162ac 100644
--- a/tests/execution/test-response-headers-name.md
+++ b/tests/execution/test-response-headers-name.md
@@ -4,8 +4,14 @@ error: true
# test-response-headers-name
-```graphql @config
-schema @server(headers: {custom: [{key: "🤣", value: "a"}]}) {
+```yaml @config
+server:
+ headers:
+ custom: [{key: "🤣", value: "a"}]
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-scalars-builtin.md b/tests/execution/test-scalars-builtin.md
index 41299d727e..8277c655da 100644
--- a/tests/execution/test-scalars-builtin.md
+++ b/tests/execution/test-scalars-builtin.md
@@ -1,7 +1,13 @@
# Test builtin GraphQL scalars
-```graphql @config
-schema @server(port: 8000, hostname: "localhost") {
+```yaml @config
+server:
+ port: 8000
+ hostname: localhost
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-scalars-integers.md b/tests/execution/test-scalars-integers.md
index 7991cdfc9e..8b853ff13c 100644
--- a/tests/execution/test-scalars-integers.md
+++ b/tests/execution/test-scalars-integers.md
@@ -1,7 +1,13 @@
# Test scalars related to integer representation
-```graphql @config
-schema @server(port: 8000, hostname: "localhost") {
+```yaml @config
+server:
+ port: 8000
+ hostname: localhost
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-scalars-validation.md b/tests/execution/test-scalars-validation.md
index 2abed70b19..e8331b3596 100644
--- a/tests/execution/test-scalars-validation.md
+++ b/tests/execution/test-scalars-validation.md
@@ -1,7 +1,13 @@
# Test scalar validation for input and output types
-```graphql @config
-schema @server(port: 8000, hostname: "localhost") {
+```yaml @config
+server:
+ port: 8000
+ hostname: localhost
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-scalars.md b/tests/execution/test-scalars.md
index 45e8679542..d8ac097527 100644
--- a/tests/execution/test-scalars.md
+++ b/tests/execution/test-scalars.md
@@ -1,10 +1,16 @@
# Test scalars
-```graphql @config
+```yaml @config
+server:
+ port: 8000
+ hostname: localhost
+```
+
+```graphql @schema
# this is custom scalars in config
scalar AnyScalar
-schema @server(port: 8000, hostname: "localhost") {
+schema {
query: Query
}
diff --git a/tests/execution/test-server-vars.md b/tests/execution/test-server-vars.md
index 0a7a4e9fa0..b3e8853054 100644
--- a/tests/execution/test-server-vars.md
+++ b/tests/execution/test-server-vars.md
@@ -4,8 +4,15 @@ identity: true
# test-server-vars
-```graphql @config
-schema @server(vars: [{key: "foo", value: "bar"}]) @upstream {
+```yaml @config
+server:
+ vars:
+ - key: "foo"
+ value: "bar"
+```
+
+```graphql @schema
+schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-set-cookie-headers.md b/tests/execution/test-set-cookie-headers.md
index d9cc17c090..e8fda884a7 100644
--- a/tests/execution/test-set-cookie-headers.md
+++ b/tests/execution/test-set-cookie-headers.md
@@ -1,7 +1,15 @@
# Set Cookie Header
-```graphql @config
-schema @server(port: 8080, hostname: "0.0.0.0", headers: {setCookies: true}) {
+```yaml @config
+server:
+ port: 8080
+ hostname: "0.0.0.0"
+ headers:
+ setCookies: true
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/test-undefined-query.md b/tests/execution/test-undefined-query.md
index 12b973d39b..912fffb64b 100644
--- a/tests/execution/test-undefined-query.md
+++ b/tests/execution/test-undefined-query.md
@@ -4,7 +4,7 @@ error: true
# test-undefined-query
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-union-ambiguous.md b/tests/execution/test-union-ambiguous.md
index 2a5cc7f260..4b6066c97d 100644
--- a/tests/execution/test-union-ambiguous.md
+++ b/tests/execution/test-union-ambiguous.md
@@ -2,7 +2,7 @@
In some cases, when the resolved data shape does not strongly correspond to GraphQL types, the discriminator may return the first possible type or no possible types at all.
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-union-fieldtype.md b/tests/execution/test-union-fieldtype.md
index 05841279a4..a6a7046b7e 100644
--- a/tests/execution/test-union-fieldtype.md
+++ b/tests/execution/test-union-fieldtype.md
@@ -1,6 +1,6 @@
# Test union type resolve
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-union-many-types.md b/tests/execution/test-union-many-types.md
index 67f84d6214..26edf8b3e6 100644
--- a/tests/execution/test-union-many-types.md
+++ b/tests/execution/test-union-many-types.md
@@ -6,7 +6,7 @@ skip: true
TODO: snapshot mismatch when running the test on 32bit architecture
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-union-optional.md b/tests/execution/test-union-optional.md
index 750ba5a023..7ca363d35e 100644
--- a/tests/execution/test-union-optional.md
+++ b/tests/execution/test-union-optional.md
@@ -1,6 +1,6 @@
# Test union optional
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/test-union.md b/tests/execution/test-union.md
index d23e3edb4b..f3386e74dd 100644
--- a/tests/execution/test-union.md
+++ b/tests/execution/test-union.md
@@ -4,7 +4,7 @@ identity: true
# Test union type resolve
-```graphql @config
+```graphql @schema
schema @server @upstream {
query: Query
}
diff --git a/tests/execution/test-upstream-headers.md b/tests/execution/test-upstream-headers.md
index 66fd983df6..6d9a06d79f 100644
--- a/tests/execution/test-upstream-headers.md
+++ b/tests/execution/test-upstream-headers.md
@@ -1,7 +1,12 @@
# test-upstream-headers
-```graphql @config
-schema @upstream(allowedHeaders: ["x-foo", "X-bar"]) {
+```yaml @config
+upstream:
+ allowedHeaders: ["x-foo", "X-bar"]
+```
+
+```graphql @schema
+schema {
query: Query
}
type Query {
diff --git a/tests/execution/test-upstream.md b/tests/execution/test-upstream.md
index 1eb43f28c1..0a73de3ec2 100644
--- a/tests/execution/test-upstream.md
+++ b/tests/execution/test-upstream.md
@@ -4,8 +4,14 @@ identity: true
# test-upstream
-```graphql @config
-schema @server @upstream(proxy: {url: "http://localhost:8085"}) {
+```yaml @config
+upstream:
+ proxy:
+ url: "http://localhost:8085"
+```
+
+```graphql @schema
+schema @server @upstream {
query: Query
}
diff --git a/tests/execution/undeclared-type-no-base-url.md b/tests/execution/undeclared-type-no-base-url.md
index b4635843c3..59e1f333ac 100644
--- a/tests/execution/undeclared-type-no-base-url.md
+++ b/tests/execution/undeclared-type-no-base-url.md
@@ -4,7 +4,7 @@ error: true
# undeclared-type-no-base-url
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/undeclared-type.md b/tests/execution/undeclared-type.md
index d0a0aa6280..7c60dd7d97 100644
--- a/tests/execution/undeclared-type.md
+++ b/tests/execution/undeclared-type.md
@@ -4,7 +4,7 @@ error: true
# undeclared-type
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/union-nested-resolver.md b/tests/execution/union-nested-resolver.md
index 9aa7141a0e..27cc9f7ccb 100644
--- a/tests/execution/union-nested-resolver.md
+++ b/tests/execution/union-nested-resolver.md
@@ -1,7 +1,12 @@
# Field with resolver in one of the possible types of Union
-```graphql @config
-schema @server(port: 8030) @upstream {
+```yaml @config
+server:
+ port: 8030
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/upstream-batching.md b/tests/execution/upstream-batching.md
index b911bad51a..65ba727199 100644
--- a/tests/execution/upstream-batching.md
+++ b/tests/execution/upstream-batching.md
@@ -1,7 +1,14 @@
# Sending requests to be batched by the upstream server
-```graphql @config
-schema @server @upstream(batch: {maxSize: 100, delay: 1, headers: []}) {
+```yaml @config
+upstream:
+ batch:
+ delay: 1
+ maxSize: 100
+```
+
+```graphql @schema
+schema {
query: Query
}
diff --git a/tests/execution/upstream-fail-request.md b/tests/execution/upstream-fail-request.md
index 72c04a8685..4806420a78 100644
--- a/tests/execution/upstream-fail-request.md
+++ b/tests/execution/upstream-fail-request.md
@@ -1,6 +1,6 @@
# Simple GraphQL Request
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/with-args-url.md b/tests/execution/with-args-url.md
index 0fa10d9b4b..94f81d6568 100644
--- a/tests/execution/with-args-url.md
+++ b/tests/execution/with-args-url.md
@@ -1,6 +1,6 @@
# With args URL
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/with-args.md b/tests/execution/with-args.md
index d456d08596..78b9ffa837 100644
--- a/tests/execution/with-args.md
+++ b/tests/execution/with-args.md
@@ -1,6 +1,6 @@
# With args
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/with-nesting.md b/tests/execution/with-nesting.md
index 3938544b33..4c575e55d8 100644
--- a/tests/execution/with-nesting.md
+++ b/tests/execution/with-nesting.md
@@ -1,6 +1,6 @@
# With nesting
-```graphql @config
+```graphql @schema
schema @server {
query: Query
}
diff --git a/tests/execution/yaml-nested-unions.md b/tests/execution/yaml-nested-unions.md
index 59b939c0a3..e938e2986d 100644
--- a/tests/execution/yaml-nested-unions.md
+++ b/tests/execution/yaml-nested-unions.md
@@ -1,6 +1,6 @@
# Using union types inside other union types
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/yaml-union-in-type.md b/tests/execution/yaml-union-in-type.md
index 8a56322500..5633662485 100644
--- a/tests/execution/yaml-union-in-type.md
+++ b/tests/execution/yaml-union-in-type.md
@@ -1,6 +1,6 @@
# Using Union types inside usual type
-```graphql @config
+```graphql @schema
schema {
query: Query
}
diff --git a/tests/execution/yaml-union.md b/tests/execution/yaml-union.md
index ec31ed9073..dbd2427592 100644
--- a/tests/execution/yaml-union.md
+++ b/tests/execution/yaml-union.md
@@ -1,6 +1,6 @@
# Using Union types in yaml config
-```graphql @config
+```graphql @schema
schema {
query: Query
}