From dedcb4bd62fe4764ab0694960ab9c2112090367d Mon Sep 17 00:00:00 2001 From: Sandipsinh Rathod Date: Fri, 3 May 2024 21:49:11 +0530 Subject: [PATCH] drop check id flag --- generated/.tailcallrc.schema.json | 1 - ...nerator__from_proto__test__from_proto.snap | 2 +- ...m_proto__test__from_proto_no_pkg_file.snap | 2 +- ...rom_proto__test__greetings_proto_file.snap | 2 +- ...tor__from_proto__test__required_types.snap | 2 +- tests/core/parse.rs | 5 -- tests/core/runtime.rs | 1 - .../add-field-index-list.md_merged.snap | 2 +- .../add-field-many-list.md_merged.snap | 2 +- .../snapshots/add-field-many.md_merged.snap | 2 +- .../snapshots/add-field-modify.md_merged.snap | 2 +- .../add-field-with-composition.md_merged.snap | 2 +- .../add-field-with-modify.md_merged.snap | 2 +- tests/core/snapshots/add-field.md_merged.snap | 2 +- .../snapshots/apollo-tracing.md_merged.snap | 2 +- .../core/snapshots/auth-basic.md_merged.snap | 2 +- tests/core/snapshots/auth-jwt.md_merged.snap | 2 +- tests/core/snapshots/auth.md_merged.snap | 2 +- .../snapshots/batching-default.md_merged.snap | 2 +- .../batching-disabled.md_merged.snap | 2 +- .../batching-group-by-default.md_merged.snap | 2 +- .../batching-group-by.md_merged.snap | 2 +- .../snapshots/batching-post.md_merged.snap | 2 +- tests/core/snapshots/batching.md_merged.snap | 2 +- .../snapshots/cache-control.md_merged.snap | 2 +- .../caching-collision.md_merged.snap | 2 +- tests/core/snapshots/caching.md_merged.snap | 2 +- .../call-multiple-steps-piping.md_merged.snap | 2 +- .../snapshots/call-mutation.md_merged.snap | 2 +- .../cors-allow-cred-false.md_merged.snap | 2 +- .../cors-allow-cred-true.md_merged.snap | 2 +- .../cors-allow-cred-vary.md_merged.snap | 2 +- .../snapshots/custom-headers.md_merged.snap | 2 +- tests/core/snapshots/env-value.md_merged.snap | 2 +- .../experimental-headers.md_merged.snap | 2 +- ...ql-dataloader-batch-request.md_merged.snap | 2 +- ...dataloader-no-batch-request.md_merged.snap | 2 +- .../graphql-datasource-errors.md_merged.snap | 2 +- ...graphql-datasource-mutation.md_merged.snap | 2 +- .../graphql-datasource-no-args.md_merged.snap | 2 +- ...raphql-datasource-with-args.md_merged.snap | 2 +- .../core/snapshots/grpc-batch.md_merged.snap | 2 +- .../core/snapshots/grpc-error.md_merged.snap | 2 +- ...-override-url-from-upstream.md_merged.snap | 2 +- .../core/snapshots/grpc-simple.md_merged.snap | 2 +- .../grpc-url-from-upstream.md_merged.snap | 2 +- tests/core/snapshots/https.md_merged.snap | 2 +- .../snapshots/inline-field.md_merged.snap | 2 +- .../inline-index-list.md_merged.snap | 2 +- .../snapshots/inline-many-list.md_merged.snap | 2 +- .../core/snapshots/inline-many.md_merged.snap | 2 +- .../jsonplaceholder-call-post.md_merged.snap | 2 +- .../snapshots/modified-field.md_merged.snap | 2 +- .../snapshots/mutation-put.md_merged.snap | 2 +- tests/core/snapshots/mutation.md_merged.snap | 2 +- .../snapshots/n-plus-one-list.md_merged.snap | 2 +- .../core/snapshots/n-plus-one.md_merged.snap | 2 +- .../snapshots/nested-objects.md_merged.snap | 2 +- .../snapshots/nesting-level3.md_merged.snap | 2 +- .../nullable-arg-query.md_merged.snap | 2 +- .../snapshots/omit-index-list.md_merged.snap | 2 +- tests/core/snapshots/omit-many.md_merged.snap | 2 +- .../omit-resolved-by-parent.md_merged.snap | 2 +- .../recursive-type-json.md_merged.snap | 2 +- .../snapshots/recursive-types.md_merged.snap | 2 +- .../snapshots/ref-other-nested.md_merged.snap | 2 +- tests/core/snapshots/ref-other.md_merged.snap | 2 +- .../snapshots/rename-field.md_merged.snap | 2 +- ...equest-to-upstream-batching.md_merged.snap | 2 +- .../resolve-with-headers.md_merged.snap | 2 +- .../resolve-with-vars.md_merged.snap | 2 +- .../resolved-by-parent.md_merged.snap | 2 +- .../snapshots/rest-api-error.md_merged.snap | 2 +- .../snapshots/rest-api-post.md_merged.snap | 2 +- tests/core/snapshots/rest-api.md_merged.snap | 2 +- tests/core/snapshots/showcase.md_merged.snap | 2 +- .../snapshots/simple-graphql.md_merged.snap | 2 +- .../snapshots/simple-query.md_merged.snap | 2 +- .../test-add-field-list.md_merged.snap | 2 +- .../snapshots/test-add-field.md_merged.snap | 2 +- ...st-add-link-to-empty-config.md_merged.snap | 2 +- .../test-batching-group-by.md_merged.snap | 2 +- .../core/snapshots/test-cache.md_merged.snap | 2 +- ...st-conflict-allowed-headers.md_merged.snap | 2 +- .../test-conflict-vars.md_merged.snap | 2 +- .../test-custom-scalar.md_merged.snap | 2 +- .../test-custom-types.md_merged.snap | 2 +- .../test-description-many.md_merged.snap | 2 +- .../test-enum-default.md_merged.snap | 2 +- .../snapshots/test-enum-merge.md_merged.snap | 2 +- tests/core/snapshots/test-enum.md_merged.snap | 2 +- .../test-expr-with-mustache.md_merged.snap | 2 +- tests/core/snapshots/test-expr.md_merged.snap | 2 +- .../test-graphqlsource.md_merged.snap | 2 +- tests/core/snapshots/test-grpc.md_merged.snap | 2 +- .../test-http-baseurl.md_merged.snap | 2 +- .../test-http-headers.md_merged.snap | 2 +- .../snapshots/test-http-tmpl.md_merged.snap | 2 +- ...est-http-with-mustache-expr.md_merged.snap | 2 +- tests/core/snapshots/test-http.md_merged.snap | 2 +- .../snapshots/test-inline-list.md_merged.snap | 2 +- .../core/snapshots/test-inline.md_merged.snap | 2 +- .../test-interface-result.md_merged.snap | 2 +- .../snapshots/test-interface.md_merged.snap | 2 +- .../test-js-request-reponse.md_merged.snap | 2 +- .../snapshots/test-merge-batch.md_merged.snap | 2 +- .../test-merge-nested.md_merged.snap | 2 +- ...erge-right-with-link-config.md_merged.snap | 2 +- .../test-merge-server-sdl.md_merged.snap | 2 +- .../snapshots/test-merge-union.md_merged.snap | 2 +- .../core/snapshots/test-modify.md_merged.snap | 2 +- .../test-multi-interface.md_merged.snap | 2 +- .../test-nested-input.md_merged.snap | 2 +- .../snapshots/test-nested-link.md_merged.snap | 2 +- .../test-nested-value.md_merged.snap | 2 +- .../test-null-in-array.md_merged.snap | 2 +- .../test-null-in-object.md_merged.snap | 2 +- .../snapshots/test-omit-list.md_merged.snap | 2 +- tests/core/snapshots/test-omit.md_merged.snap | 2 +- .../test-query-documentation.md_merged.snap | 2 +- .../core/snapshots/test-query.md_merged.snap | 2 +- .../test-response-header-merge.md_merged.snap | 2 +- .../snapshots/test-scalars.md_merged.snap | 2 +- .../test-static-value.md_merged.snap | 2 +- tests/core/snapshots/test-tag.md_merged.snap | 2 +- .../core/snapshots/test-union.md_merged.snap | 2 +- .../test-upstream-headers.md_merged.snap | 2 +- .../snapshots/test-upstream.md_merged.snap | 2 +- .../upstream-batching.md_merged.snap | 2 +- .../upstream-fail-request.md_merged.snap | 2 +- .../snapshots/with-args-url.md_merged.snap | 2 +- tests/core/snapshots/with-args.md_merged.snap | 2 +- .../snapshots/with-nesting.md_merged.snap | 2 +- tests/core/spec.rs | 60 +++++++------------ tests/execution/add-field-many-list.md | 5 +- tests/execution/add-field-many.md | 5 +- tests/execution/add-field-modify.md | 5 +- tests/execution/add-field-with-composition.md | 4 +- .../async-cache-enable-multiple-resolvers.md | 4 +- tests/execution/async-cache-enabled.md | 4 +- tests/execution/batching-default.md | 7 ++- tests/execution/batching-group-by-default.md | 7 ++- tests/execution/batching-group-by.md | 11 +++- tests/execution/batching-post.md | 4 +- tests/execution/call-graphql-datasource.md | 7 ++- tests/execution/call-multiple-steps-piping.md | 23 ++++++- tests/execution/call-mutation.md | 15 +++-- tests/execution/cors-allow-cred-false.md | 15 ++++- tests/execution/cors-allow-cred-true.md | 15 ++++- tests/execution/cors-allow-cred-vary.md | 15 ++++- .../execution/cors-invalid-expose-headers.md | 13 +++- tests/execution/cors-invalid-headers.md | 13 +++- tests/execution/cors-invalid-methods.md | 11 +++- tests/execution/cors-invalid-origins.md | 13 +++- .../graphql-dataloader-batch-keys.md | 4 +- .../graphql-dataloader-batch-request.md | 8 ++- tests/execution/graphql-datasource-errors.md | 3 +- .../execution/graphql-datasource-mutation.md | 3 +- .../execution/graphql-datasource-with-args.md | 6 +- tests/execution/grpc-reflection.md | 22 ++++++- tests/execution/inline-many-list.md | 5 +- tests/execution/inline-many.md | 5 +- tests/execution/input-type-protected-error.md | 2 +- tests/execution/io-cache.md | 4 +- tests/execution/jsonplaceholder-call-post.md | 4 +- tests/execution/nullable-arg-query.md | 3 +- tests/execution/omit-many.md | 4 +- tests/execution/resolve-with-vars.md | 3 +- .../test-directives-undef-null-fields.md | 21 ++++--- tests/execution/test-set-cookie-headers.md | 4 +- tests/execution/with-args.md | 3 +- 171 files changed, 401 insertions(+), 226 deletions(-) diff --git a/generated/.tailcallrc.schema.json b/generated/.tailcallrc.schema.json index b2f55892fe..bcb7758bbb 100644 --- a/generated/.tailcallrc.schema.json +++ b/generated/.tailcallrc.schema.json @@ -168,7 +168,6 @@ "minimum": 0.0 }, "headers": { - "default": [], "type": "array", "items": { "type": "string" diff --git a/src/generator/snapshots/tailcall__generator__from_proto__test__from_proto.snap b/src/generator/snapshots/tailcall__generator__from_proto__test__from_proto.snap index 06dd410dba..e28bb382dc 100644 --- a/src/generator/snapshots/tailcall__generator__from_proto__test__from_proto.snap +++ b/src/generator/snapshots/tailcall__generator__from_proto__test__from_proto.snap @@ -2,7 +2,7 @@ source: src/generator/from_proto.rs expression: result --- -schema @server @upstream { +schema { query: Query } diff --git a/src/generator/snapshots/tailcall__generator__from_proto__test__from_proto_no_pkg_file.snap b/src/generator/snapshots/tailcall__generator__from_proto__test__from_proto_no_pkg_file.snap index 2947033ec3..8a43b49b7a 100644 --- a/src/generator/snapshots/tailcall__generator__from_proto__test__from_proto_no_pkg_file.snap +++ b/src/generator/snapshots/tailcall__generator__from_proto__test__from_proto_no_pkg_file.snap @@ -2,7 +2,7 @@ source: src/generator/from_proto.rs expression: result --- -schema @server @upstream { +schema { query: Query } diff --git a/src/generator/snapshots/tailcall__generator__from_proto__test__greetings_proto_file.snap b/src/generator/snapshots/tailcall__generator__from_proto__test__greetings_proto_file.snap index 65548ad9c4..45ac1d86b8 100644 --- a/src/generator/snapshots/tailcall__generator__from_proto__test__greetings_proto_file.snap +++ b/src/generator/snapshots/tailcall__generator__from_proto__test__greetings_proto_file.snap @@ -2,7 +2,7 @@ source: src/generator/from_proto.rs expression: result --- -schema @server @upstream { +schema { query: Query } diff --git a/src/generator/snapshots/tailcall__generator__from_proto__test__required_types.snap b/src/generator/snapshots/tailcall__generator__from_proto__test__required_types.snap index 95ced99cc2..bff11d8208 100644 --- a/src/generator/snapshots/tailcall__generator__from_proto__test__required_types.snap +++ b/src/generator/snapshots/tailcall__generator__from_proto__test__required_types.snap @@ -2,7 +2,7 @@ source: src/generator/from_proto.rs expression: config --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/parse.rs b/tests/core/parse.rs index 303744f300..180938ed01 100644 --- a/tests/core/parse.rs +++ b/tests/core/parse.rs @@ -55,7 +55,6 @@ impl ExecutionSpec { let mut files: BTreeMap = BTreeMap::new(); let mut test: Option> = None; let mut runner: Option = None; - let mut check_identity = false; let mut sdl_error = false; while let Some(node) = children.next() { @@ -89,8 +88,6 @@ impl ExecutionSpec { let split = expect.value.splitn(2, ':').collect::>(); match split[..] { [a, b] => { - check_identity = - a.contains("check_identity") && b.ends_with("true"); sdl_error = a.contains("expect_validation_error") && b.ends_with("true"); } @@ -260,8 +257,6 @@ impl ExecutionSpec { files, runner, - - check_identity, sdl_error, }; diff --git a/tests/core/runtime.rs b/tests/core/runtime.rs index 0b198a4796..9d4a70a106 100644 --- a/tests/core/runtime.rs +++ b/tests/core/runtime.rs @@ -32,7 +32,6 @@ pub struct ExecutionSpec { // Annotations for the runner pub runner: Option, - pub check_identity: bool, pub sdl_error: bool, } 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 592c6f8c8f..aef2bf4046 100644 --- a/tests/core/snapshots/add-field-index-list.md_merged.snap +++ b/tests/core/snapshots/add-field-index-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 e5802ae7b9..dfea457e15 100644 --- a/tests/core/snapshots/add-field-many-list.md_merged.snap +++ b/tests/core/snapshots/add-field-many-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 647189833f..10b8358fbf 100644 --- a/tests/core/snapshots/add-field-many.md_merged.snap +++ b/tests/core/snapshots/add-field-many.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 9c5aa370a1..73dae42eae 100644 --- a/tests/core/snapshots/add-field-modify.md_merged.snap +++ b/tests/core/snapshots/add-field-modify.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 973665cb76..fb874ff44c 100644 --- a/tests/core/snapshots/add-field-with-composition.md_merged.snap +++ b/tests/core/snapshots/add-field-with-composition.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 cad2840a4c..6a4537b0be 100644 --- a/tests/core/snapshots/add-field-with-modify.md_merged.snap +++ b/tests/core/snapshots/add-field-with-modify.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/add-field.md_merged.snap b/tests/core/snapshots/add-field.md_merged.snap index 82d16a885b..a587dab87a 100644 --- a/tests/core/snapshots/add-field.md_merged.snap +++ b/tests/core/snapshots/add-field.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/apollo-tracing.md_merged.snap b/tests/core/snapshots/apollo-tracing.md_merged.snap index 655fb0c12e..5812e1016c 100644 --- a/tests/core/snapshots/apollo-tracing.md_merged.snap +++ b/tests/core/snapshots/apollo-tracing.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(hostname: "0.0.0.0", port: 8000) @upstream { +schema @server(hostname: "0.0.0.0", port: 8000) { query: Query } diff --git a/tests/core/snapshots/auth-basic.md_merged.snap b/tests/core/snapshots/auth-basic.md_merged.snap index 990292607f..ec762bc4af 100644 --- a/tests/core/snapshots/auth-basic.md_merged.snap +++ b/tests/core/snapshots/auth-basic.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000) @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) { +schema @server(port: 8000) @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) { 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 69bf7be283..d20d5416a6 100644 --- a/tests/core/snapshots/auth-jwt.md_merged.snap +++ b/tests/core/snapshots/auth-jwt.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000) @upstream @link(id: "jwks", src: "jwks.json", type: Jwks) { +schema @server(port: 8000) @link(id: "jwks", src: "jwks.json", type: Jwks) { query: Query mutation: Mutation } diff --git a/tests/core/snapshots/auth.md_merged.snap b/tests/core/snapshots/auth.md_merged.snap index f89a8e3187..92d244bd36 100644 --- a/tests/core/snapshots/auth.md_merged.snap +++ b/tests/core/snapshots/auth.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) @link(id: "jwks", src: "jwks.json", type: Jwks) { +schema @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) @link(id: "jwks", src: "jwks.json", type: Jwks) { query: Query } diff --git a/tests/core/snapshots/batching-default.md_merged.snap b/tests/core/snapshots/batching-default.md_merged.snap index 0ef8726355..d530e0697a 100644 --- a/tests/core/snapshots/batching-default.md_merged.snap +++ b/tests/core/snapshots/batching-default.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 10, headers: []}, httpCache: true) { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 10}, httpCache: true) { query: Query } diff --git a/tests/core/snapshots/batching-disabled.md_merged.snap b/tests/core/snapshots/batching-disabled.md_merged.snap index 30586519f5..db8ed4425d 100644 --- a/tests/core/snapshots/batching-disabled.md_merged.snap +++ b/tests/core/snapshots/batching-disabled.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 0, headers: [], maxSize: 100}, httpCache: true) { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 0, maxSize: 100}, httpCache: true) { 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 7dc15f9633..42ff7b2214 100644 --- a/tests/core/snapshots/batching-group-by-default.md_merged.snap +++ b/tests/core/snapshots/batching-group-by-default.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: true) { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) { 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 2b75106aca..d9f268f50b 100644 --- a/tests/core/snapshots/batching-group-by.md_merged.snap +++ b/tests/core/snapshots/batching-group-by.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: true) { +schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) { query: Query } diff --git a/tests/core/snapshots/batching-post.md_merged.snap b/tests/core/snapshots/batching-post.md_merged.snap index 34b9791fe7..5b20f9f8af 100644 --- a/tests/core/snapshots/batching-post.md_merged.snap +++ b/tests/core/snapshots/batching-post.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: true) { +schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) { query: Query } diff --git a/tests/core/snapshots/batching.md_merged.snap b/tests/core/snapshots/batching.md_merged.snap index 71f73427cb..48be8b938e 100644 --- a/tests/core/snapshots/batching.md_merged.snap +++ b/tests/core/snapshots/batching.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(batchRequests: true) @upstream { +schema @server(batchRequests: true) { query: Query } diff --git a/tests/core/snapshots/cache-control.md_merged.snap b/tests/core/snapshots/cache-control.md_merged.snap index ce75b519b4..c9cb5788d7 100644 --- a/tests/core/snapshots/cache-control.md_merged.snap +++ b/tests/core/snapshots/cache-control.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(headers: {cacheControl: true}) @upstream { +schema @server(headers: {cacheControl: true}) { query: Query } diff --git a/tests/core/snapshots/caching-collision.md_merged.snap b/tests/core/snapshots/caching-collision.md_merged.snap index 39aa88d47e..c97003a8fd 100644 --- a/tests/core/snapshots/caching-collision.md_merged.snap +++ b/tests/core/snapshots/caching-collision.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) { +schema @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/core/snapshots/caching.md_merged.snap b/tests/core/snapshots/caching.md_merged.snap index c1bff907a4..c9949bd8cd 100644 --- a/tests/core/snapshots/caching.md_merged.snap +++ b/tests/core/snapshots/caching.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) { +schema @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { 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 d9d2d3a8ef..4fcbeac647 100644 --- a/tests/core/snapshots/call-multiple-steps-piping.md_merged.snap +++ b/tests/core/snapshots/call-multiple-steps-piping.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/call-mutation.md_merged.snap b/tests/core/snapshots/call-mutation.md_merged.snap index 4684f682f2..661c342c7f 100644 --- a/tests/core/snapshots/call-mutation.md_merged.snap +++ b/tests/core/snapshots/call-mutation.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { query: Query mutation: Mutation } 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 3d1469055a..05aa5ac4a0 100644 --- a/tests/core/snapshots/cors-allow-cred-false.md_merged.snap +++ b/tests/core/snapshots/cors-allow-cred-false.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(headers: {cors: {allowHeaders: ["Authorization"], allowMethods: ["POST", "OPTIONS"], allowOrigins: ["abc.com", "xyz.com"], allowPrivateNetwork: true, maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) { +schema @server(headers: {cors: {allowHeaders: ["Authorization"], allowMethods: ["POST", "OPTIONS"], allowOrigins: ["abc.com", "xyz.com"], allowPrivateNetwork: true, maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { 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 93e6b8bb82..83ebcb2d93 100644 --- a/tests/core/snapshots/cors-allow-cred-true.md_merged.snap +++ b/tests/core/snapshots/cors-allow-cred-true.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) { +schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { 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 93e6b8bb82..83ebcb2d93 100644 --- a/tests/core/snapshots/cors-allow-cred-vary.md_merged.snap +++ b/tests/core/snapshots/cors-allow-cred-vary.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) { +schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/core/snapshots/custom-headers.md_merged.snap b/tests/core/snapshots/custom-headers.md_merged.snap index 9ef0fa4ce6..2dcdcbd6a5 100644 --- a/tests/core/snapshots/custom-headers.md_merged.snap +++ b/tests/core/snapshots/custom-headers.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -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"}]}) { query: Query } diff --git a/tests/core/snapshots/env-value.md_merged.snap b/tests/core/snapshots/env-value.md_merged.snap index bd648ec48a..a311b87689 100644 --- a/tests/core/snapshots/env-value.md_merged.snap +++ b/tests/core/snapshots/env-value.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/experimental-headers.md_merged.snap b/tests/core/snapshots/experimental-headers.md_merged.snap index 9fdcd5e3d0..bf87cc7a02 100644 --- a/tests/core/snapshots/experimental-headers.md_merged.snap +++ b/tests/core/snapshots/experimental-headers.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(headers: {experimental: ["X-experimental", "x-tailcall"]}) @upstream { +schema @server(headers: {experimental: ["X-experimental", "x-tailcall"]}) { 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 2f76478dfa..2c9017d912 100644 --- a/tests/core/snapshots/graphql-dataloader-batch-request.md_merged.snap +++ b/tests/core/snapshots/graphql-dataloader-batch-request.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(batch: {delay: 1, headers: []}) { +schema @upstream(batch: {delay: 1}) { 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 16af3a561a..a0a84910f5 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 @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(batch: {delay: 1, headers: []}) { +schema @upstream(batch: {delay: 1}) { 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 8dfbfa8b10..f0abdfdb5c 100644 --- a/tests/core/snapshots/graphql-datasource-errors.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-errors.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 3cd8c33c5b..15fef89988 100644 --- a/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 c43eb701d7..0b5a60582a 100644 --- a/tests/core/snapshots/graphql-datasource-no-args.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-no-args.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 e84cc42c8a..0b24bfff8c 100644 --- a/tests/core/snapshots/graphql-datasource-with-args.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-with-args.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/grpc-batch.md_merged.snap b/tests/core/snapshots/grpc-batch.md_merged.snap index 26d6e41803..55390ecd44 100644 --- a/tests/core/snapshots/grpc-batch.md_merged.snap +++ b/tests/core/snapshots/grpc-batch.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000) @upstream(batch: {delay: 10, headers: []}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { +schema @server(port: 8000) @upstream(batch: {delay: 10}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { query: Query } diff --git a/tests/core/snapshots/grpc-error.md_merged.snap b/tests/core/snapshots/grpc-error.md_merged.snap index 385aa86cce..dc2075fc0d 100644 --- a/tests/core/snapshots/grpc-error.md_merged.snap +++ b/tests/core/snapshots/grpc-error.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000) @upstream(batch: {delay: 10, headers: []}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { +schema @server(port: 8000) @upstream(batch: {delay: 10}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { query: Query } diff --git a/tests/core/snapshots/grpc-override-url-from-upstream.md_merged.snap b/tests/core/snapshots/grpc-override-url-from-upstream.md_merged.snap index b4310be979..c3c20fa955 100644 --- a/tests/core/snapshots/grpc-override-url-from-upstream.md_merged.snap +++ b/tests/core/snapshots/grpc-override-url-from-upstream.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000) @upstream(baseURL: "http://not-a-valid-grpc-url.com", batch: {delay: 10, headers: []}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { +schema @server(port: 8000) @upstream(baseURL: "http://not-a-valid-grpc-url.com", batch: {delay: 10}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { query: Query } diff --git a/tests/core/snapshots/grpc-simple.md_merged.snap b/tests/core/snapshots/grpc-simple.md_merged.snap index 385aa86cce..dc2075fc0d 100644 --- a/tests/core/snapshots/grpc-simple.md_merged.snap +++ b/tests/core/snapshots/grpc-simple.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000) @upstream(batch: {delay: 10, headers: []}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { +schema @server(port: 8000) @upstream(batch: {delay: 10}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { 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 ccab578907..6f4cbbe035 100644 --- a/tests/core/snapshots/grpc-url-from-upstream.md_merged.snap +++ b/tests/core/snapshots/grpc-url-from-upstream.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000) @upstream(baseURL: "http://localhost:50051", batch: {delay: 10, headers: []}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { +schema @server(port: 8000) @upstream(baseURL: "http://localhost:50051", batch: {delay: 10}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) { query: Query } diff --git a/tests/core/snapshots/https.md_merged.snap b/tests/core/snapshots/https.md_merged.snap index 68c4914d04..f6d3d38fa7 100644 --- a/tests/core/snapshots/https.md_merged.snap +++ b/tests/core/snapshots/https.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "https://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "https://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/inline-field.md_merged.snap b/tests/core/snapshots/inline-field.md_merged.snap index 7251879bf9..d403d21f8e 100644 --- a/tests/core/snapshots/inline-field.md_merged.snap +++ b/tests/core/snapshots/inline-field.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 75482b2360..589548eb2d 100644 --- a/tests/core/snapshots/inline-index-list.md_merged.snap +++ b/tests/core/snapshots/inline-index-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 948144023f..7d1e18e0e0 100644 --- a/tests/core/snapshots/inline-many-list.md_merged.snap +++ b/tests/core/snapshots/inline-many-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/inline-many.md_merged.snap b/tests/core/snapshots/inline-many.md_merged.snap index 480ebd722d..95eafbd5eb 100644 --- a/tests/core/snapshots/inline-many.md_merged.snap +++ b/tests/core/snapshots/inline-many.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 e49ac9d01a..9778ea5233 100644 --- a/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap +++ b/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(hostname: "0.0.0.0", port: 8000) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 100, headers: []}, httpCache: true) { +schema @server(hostname: "0.0.0.0", port: 8000) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 100}, httpCache: true) { query: Query } diff --git a/tests/core/snapshots/modified-field.md_merged.snap b/tests/core/snapshots/modified-field.md_merged.snap index 8983ed6a45..9f45956c08 100644 --- a/tests/core/snapshots/modified-field.md_merged.snap +++ b/tests/core/snapshots/modified-field.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/mutation-put.md_merged.snap b/tests/core/snapshots/mutation-put.md_merged.snap index 065cde9ea8..9029c609e1 100644 --- a/tests/core/snapshots/mutation-put.md_merged.snap +++ b/tests/core/snapshots/mutation-put.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { query: Query mutation: Mutation } diff --git a/tests/core/snapshots/mutation.md_merged.snap b/tests/core/snapshots/mutation.md_merged.snap index 3e58b3f436..8d8c492715 100644 --- a/tests/core/snapshots/mutation.md_merged.snap +++ b/tests/core/snapshots/mutation.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { 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 53889d91c3..3b2fb035ca 100644 --- a/tests/core/snapshots/n-plus-one-list.md_merged.snap +++ b/tests/core/snapshots/n-plus-one-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) { +schema @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { 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 53889d91c3..3b2fb035ca 100644 --- a/tests/core/snapshots/n-plus-one.md_merged.snap +++ b/tests/core/snapshots/n-plus-one.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) { +schema @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/core/snapshots/nested-objects.md_merged.snap b/tests/core/snapshots/nested-objects.md_merged.snap index f2617d9e54..3b14331434 100644 --- a/tests/core/snapshots/nested-objects.md_merged.snap +++ b/tests/core/snapshots/nested-objects.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/nesting-level3.md_merged.snap b/tests/core/snapshots/nesting-level3.md_merged.snap index 4dc614c158..6d54f5dac7 100644 --- a/tests/core/snapshots/nesting-level3.md_merged.snap +++ b/tests/core/snapshots/nesting-level3.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { 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 1ca244272c..a64dd1bad4 100644 --- a/tests/core/snapshots/nullable-arg-query.md_merged.snap +++ b/tests/core/snapshots/nullable-arg-query.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 75482b2360..589548eb2d 100644 --- a/tests/core/snapshots/omit-index-list.md_merged.snap +++ b/tests/core/snapshots/omit-index-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/omit-many.md_merged.snap b/tests/core/snapshots/omit-many.md_merged.snap index 8a9c853868..4110fa89f0 100644 --- a/tests/core/snapshots/omit-many.md_merged.snap +++ b/tests/core/snapshots/omit-many.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 54c1285f98..a59a292e94 100644 --- a/tests/core/snapshots/omit-resolved-by-parent.md_merged.snap +++ b/tests/core/snapshots/omit-resolved-by-parent.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/recursive-type-json.md_merged.snap b/tests/core/snapshots/recursive-type-json.md_merged.snap index 1920b7efbb..443d27a672 100644 --- a/tests/core/snapshots/recursive-type-json.md_merged.snap +++ b/tests/core/snapshots/recursive-type-json.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "https://jsonplaceholder.typicode.com", httpCache: true) { +schema @upstream(baseURL: "https://jsonplaceholder.typicode.com", httpCache: true) { query: Query } diff --git a/tests/core/snapshots/recursive-types.md_merged.snap b/tests/core/snapshots/recursive-types.md_merged.snap index 87b42e1376..70e36e55cb 100644 --- a/tests/core/snapshots/recursive-types.md_merged.snap +++ b/tests/core/snapshots/recursive-types.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "https://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "https://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/ref-other-nested.md_merged.snap b/tests/core/snapshots/ref-other-nested.md_merged.snap index 173f670347..6679e6152e 100644 --- a/tests/core/snapshots/ref-other-nested.md_merged.snap +++ b/tests/core/snapshots/ref-other-nested.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "https://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "https://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/ref-other.md_merged.snap b/tests/core/snapshots/ref-other.md_merged.snap index 90053056f7..562c957ca8 100644 --- a/tests/core/snapshots/ref-other.md_merged.snap +++ b/tests/core/snapshots/ref-other.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "https://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "https://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/rename-field.md_merged.snap b/tests/core/snapshots/rename-field.md_merged.snap index 919ae1a4a1..1335ad2f1d 100644 --- a/tests/core/snapshots/rename-field.md_merged.snap +++ b/tests/core/snapshots/rename-field.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 b72e0d430f..ee2cedfbe5 100644 --- a/tests/core/snapshots/request-to-upstream-batching.md_merged.snap +++ b/tests/core/snapshots/request-to-upstream-batching.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(batchRequests: true) @upstream(batch: {delay: 1, headers: [], maxSize: 100}) { +schema @server(batchRequests: true) @upstream(batch: {delay: 1, maxSize: 100}) { 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 2ef60df846..cbb17c4667 100644 --- a/tests/core/snapshots/resolve-with-headers.md_merged.snap +++ b/tests/core/snapshots/resolve-with-headers.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(allowedHeaders: ["authorization"]) { +schema @upstream(allowedHeaders: ["authorization"]) { 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 a3cc637dd8..33e6876635 100644 --- a/tests/core/snapshots/resolve-with-vars.md_merged.snap +++ b/tests/core/snapshots/resolve-with-vars.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(vars: [{key: "id", value: "1"}]) @upstream { +schema @server(vars: [{key: "id", value: "1"}]) { 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 54c1285f98..a59a292e94 100644 --- a/tests/core/snapshots/resolved-by-parent.md_merged.snap +++ b/tests/core/snapshots/resolved-by-parent.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 7ef5777788..8558526584 100644 --- a/tests/core/snapshots/rest-api-error.md_merged.snap +++ b/tests/core/snapshots/rest-api-error.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") @link(src: "operation-user.graphql", type: Operation) { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") @link(src: "operation-user.graphql", type: Operation) { 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 7ef5777788..8558526584 100644 --- a/tests/core/snapshots/rest-api-post.md_merged.snap +++ b/tests/core/snapshots/rest-api-post.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") @link(src: "operation-user.graphql", type: Operation) { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") @link(src: "operation-user.graphql", type: Operation) { query: Query } diff --git a/tests/core/snapshots/rest-api.md_merged.snap b/tests/core/snapshots/rest-api.md_merged.snap index 7ef5777788..8558526584 100644 --- a/tests/core/snapshots/rest-api.md_merged.snap +++ b/tests/core/snapshots/rest-api.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") @link(src: "operation-user.graphql", type: Operation) { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") @link(src: "operation-user.graphql", type: Operation) { query: Query } diff --git a/tests/core/snapshots/showcase.md_merged.snap b/tests/core/snapshots/showcase.md_merged.snap index dcc936a453..042779d3fb 100644 --- a/tests/core/snapshots/showcase.md_merged.snap +++ b/tests/core/snapshots/showcase.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(showcase: true) @upstream { +schema @server(showcase: true) { query: Query } diff --git a/tests/core/snapshots/simple-graphql.md_merged.snap b/tests/core/snapshots/simple-graphql.md_merged.snap index fb720f6f46..9d5a02f154 100644 --- a/tests/core/snapshots/simple-graphql.md_merged.snap +++ b/tests/core/snapshots/simple-graphql.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/simple-query.md_merged.snap b/tests/core/snapshots/simple-query.md_merged.snap index 4582691ba7..abce0c7795 100644 --- a/tests/core/snapshots/simple-query.md_merged.snap +++ b/tests/core/snapshots/simple-query.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { 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 10f3b9ca79..2115e5c8ec 100644 --- a/tests/core/snapshots/test-add-field-list.md_merged.snap +++ b/tests/core/snapshots/test-add-field-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 095fa8a918..c70cedbdb3 100644 --- a/tests/core/snapshots/test-add-field.md_merged.snap +++ b/tests/core/snapshots/test-add-field.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 724d3e15ed..e27a52d3a3 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 @@ -2,6 +2,6 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream @link(src: "link-expr.graphql", type: Config) @link(src: "link-enum.graphql", type: Config) { +schema @link(src: "link-expr.graphql", type: Config) @link(src: "link-enum.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 10cc028bb6..6b29acfa01 100644 --- a/tests/core/snapshots/test-batching-group-by.md_merged.snap +++ b/tests/core/snapshots/test-batching-group-by.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 4000) @upstream(baseURL: "http://abc.com", batch: {delay: 1, headers: [], maxSize: 1000}) { +schema @server(port: 4000) @upstream(baseURL: "http://abc.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/core/snapshots/test-cache.md_merged.snap b/tests/core/snapshots/test-cache.md_merged.snap index 2bf0365875..b0c2ec418a 100644 --- a/tests/core/snapshots/test-cache.md_merged.snap +++ b/tests/core/snapshots/test-cache.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-conflict-allowed-headers.md_merged.snap b/tests/core/snapshots/test-conflict-allowed-headers.md_merged.snap index 2fb2f3849c..a72f64e7e4 100644 --- a/tests/core/snapshots/test-conflict-allowed-headers.md_merged.snap +++ b/tests/core/snapshots/test-conflict-allowed-headers.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(allowedHeaders: ["a", "b", "c", "d"]) { +schema @upstream(allowedHeaders: ["a", "b", "c", "d"]) { query: Query } diff --git a/tests/core/snapshots/test-conflict-vars.md_merged.snap b/tests/core/snapshots/test-conflict-vars.md_merged.snap index eda8f9a1d5..cda079f9c7 100644 --- a/tests/core/snapshots/test-conflict-vars.md_merged.snap +++ b/tests/core/snapshots/test-conflict-vars.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(vars: [{key: "a", value: "b"}, {key: "c", value: "d"}, {key: "p", value: "q"}]) @upstream { +schema @server(vars: [{key: "a", value: "b"}, {key: "c", value: "d"}, {key: "p", value: "q"}]) { 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 01e731dc0a..783f19a089 100644 --- a/tests/core/snapshots/test-custom-scalar.md_merged.snap +++ b/tests/core/snapshots/test-custom-scalar.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 4c4cbc5a39..ce841e7253 100644 --- a/tests/core/snapshots/test-custom-types.md_merged.snap +++ b/tests/core/snapshots/test-custom-types.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { query: Que mutation: Mut } diff --git a/tests/core/snapshots/test-description-many.md_merged.snap b/tests/core/snapshots/test-description-many.md_merged.snap index a8e2022521..7d6a97397f 100644 --- a/tests/core/snapshots/test-description-many.md_merged.snap +++ b/tests/core/snapshots/test-description-many.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 f5750f210c..d1606fbaf8 100644 --- a/tests/core/snapshots/test-enum-default.md_merged.snap +++ b/tests/core/snapshots/test-enum-default.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8080) @upstream(baseURL: "http://localhost:50051", batch: {delay: 10, headers: []}, httpCache: true) @link(id: "news", src: "./service.proto", type: Protobuf) { +schema @server(port: 8080) @upstream(baseURL: "http://localhost:50051", batch: {delay: 10}, httpCache: true) @link(id: "news", src: "./service.proto", type: Protobuf) { 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 f204828260..e261912a50 100644 --- a/tests/core/snapshots/test-enum-merge.md_merged.snap +++ b/tests/core/snapshots/test-enum-merge.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-enum.md_merged.snap b/tests/core/snapshots/test-enum.md_merged.snap index eca36df1c1..54ce95e37d 100644 --- a/tests/core/snapshots/test-enum.md_merged.snap +++ b/tests/core/snapshots/test-enum.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://localhost:8080") { +schema @upstream(baseURL: "http://localhost:8080") { 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 6f192d0dee..b623c2b288 100644 --- a/tests/core/snapshots/test-expr-with-mustache.md_merged.snap +++ b/tests/core/snapshots/test-expr-with-mustache.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/test-expr.md_merged.snap b/tests/core/snapshots/test-expr.md_merged.snap index de0ae43f5d..c2258a523b 100644 --- a/tests/core/snapshots/test-expr.md_merged.snap +++ b/tests/core/snapshots/test-expr.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/test-graphqlsource.md_merged.snap b/tests/core/snapshots/test-graphqlsource.md_merged.snap index c4d9375595..2f35e390c5 100644 --- a/tests/core/snapshots/test-graphqlsource.md_merged.snap +++ b/tests/core/snapshots/test-graphqlsource.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://localhost:8000/graphql") { +schema @upstream(baseURL: "http://localhost:8000/graphql") { query: Query } diff --git a/tests/core/snapshots/test-grpc.md_merged.snap b/tests/core/snapshots/test-grpc.md_merged.snap index 425c09a8d3..b53729b0f1 100644 --- a/tests/core/snapshots/test-grpc.md_merged.snap +++ b/tests/core/snapshots/test-grpc.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(port: 8000) @upstream(baseURL: "http://localhost:50051", batch: {delay: 10, headers: [], maxSize: 1000}) @link(id: "news", src: "news.proto", type: Protobuf) { +schema @server(port: 8000) @upstream(baseURL: "http://localhost:50051", batch: {delay: 10, maxSize: 1000}) @link(id: "news", src: "news.proto", type: Protobuf) { 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 342c76e8a3..fb51913bd5 100644 --- a/tests/core/snapshots/test-http-baseurl.md_merged.snap +++ b/tests/core/snapshots/test-http-baseurl.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://abc.com") { +schema @upstream(baseURL: "http://abc.com") { 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 b94cdc26fb..afb86a835c 100644 --- a/tests/core/snapshots/test-http-headers.md_merged.snap +++ b/tests/core/snapshots/test-http-headers.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://localhost:4000") { +schema @upstream(baseURL: "http://localhost:4000") { 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 0ad2f3d3be..c4675c6564 100644 --- a/tests/core/snapshots/test-http-tmpl.md_merged.snap +++ b/tests/core/snapshots/test-http-tmpl.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 c94d63a06f..2c36c4cf2f 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 @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/test-http.md_merged.snap b/tests/core/snapshots/test-http.md_merged.snap index 3cc961ecb4..c84344a755 100644 --- a/tests/core/snapshots/test-http.md_merged.snap +++ b/tests/core/snapshots/test-http.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 ec95563c26..7fe2f48fa4 100644 --- a/tests/core/snapshots/test-inline-list.md_merged.snap +++ b/tests/core/snapshots/test-inline-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-inline.md_merged.snap b/tests/core/snapshots/test-inline.md_merged.snap index cdb38002a2..7e82137f12 100644 --- a/tests/core/snapshots/test-inline.md_merged.snap +++ b/tests/core/snapshots/test-inline.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 f8322407d6..cd48290a4b 100644 --- a/tests/core/snapshots/test-interface-result.md_merged.snap +++ b/tests/core/snapshots/test-interface-result.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-interface.md_merged.snap b/tests/core/snapshots/test-interface.md_merged.snap index a01ce94e07..a151c558a6 100644 --- a/tests/core/snapshots/test-interface.md_merged.snap +++ b/tests/core/snapshots/test-interface.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-js-request-reponse.md_merged.snap b/tests/core/snapshots/test-js-request-reponse.md_merged.snap index 74acf0b4ff..4b14bdc125 100644 --- a/tests/core/snapshots/test-js-request-reponse.md_merged.snap +++ b/tests/core/snapshots/test-js-request-reponse.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream @link(src: "test.js", type: Script) { +schema @link(src: "test.js", type: Script) { query: Query } diff --git a/tests/core/snapshots/test-merge-batch.md_merged.snap b/tests/core/snapshots/test-merge-batch.md_merged.snap index c5fc6e4c4a..ab936d603a 100644 --- a/tests/core/snapshots/test-merge-batch.md_merged.snap +++ b/tests/core/snapshots/test-merge-batch.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(batch: {delay: 5, headers: ["a", "b", "c"], maxSize: 100}) { +schema @upstream(batch: {delay: 5, headers: ["a", "b", "c"], maxSize: 100}) { 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 55c1e360a9..964ddbd298 100644 --- a/tests/core/snapshots/test-merge-nested.md_merged.snap +++ b/tests/core/snapshots/test-merge-nested.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://abc.com") { +schema @upstream(baseURL: "http://abc.com") { query: Query } 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 752503e827..49c0e94e4d 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 @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(allowedHeaders: ["Authorization"]) @link(src: "stripe-types.graphql", type: Config) { +schema @upstream(allowedHeaders: ["Authorization"]) @link(src: "stripe-types.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 3cc961ecb4..c84344a755 100644 --- a/tests/core/snapshots/test-merge-server-sdl.md_merged.snap +++ b/tests/core/snapshots/test-merge-server-sdl.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 05a24d2691..157748a686 100644 --- a/tests/core/snapshots/test-merge-union.md_merged.snap +++ b/tests/core/snapshots/test-merge-union.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-modify.md_merged.snap b/tests/core/snapshots/test-modify.md_merged.snap index 88436fcb55..f0778a9272 100644 --- a/tests/core/snapshots/test-modify.md_merged.snap +++ b/tests/core/snapshots/test-modify.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 f7edbcebf6..da3187d0f8 100644 --- a/tests/core/snapshots/test-multi-interface.md_merged.snap +++ b/tests/core/snapshots/test-multi-interface.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 13f30f666d..51cdcfac24 100644 --- a/tests/core/snapshots/test-nested-input.md_merged.snap +++ b/tests/core/snapshots/test-nested-input.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/test-nested-link.md_merged.snap b/tests/core/snapshots/test-nested-link.md_merged.snap index 7c13bd430b..983abd55a9 100644 --- a/tests/core/snapshots/test-nested-link.md_merged.snap +++ b/tests/core/snapshots/test-nested-link.md_merged.snap @@ -2,6 +2,6 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream @link(src: "graphql-with-link.graphql", type: Config) { +schema @link(src: "graphql-with-link.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 954ba8405b..09b0bd7075 100644 --- a/tests/core/snapshots/test-nested-value.md_merged.snap +++ b/tests/core/snapshots/test-nested-value.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 d11138e7df..c1d6a8e0f5 100644 --- a/tests/core/snapshots/test-null-in-array.md_merged.snap +++ b/tests/core/snapshots/test-null-in-array.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 e5a749bb3e..06faef18a5 100644 --- a/tests/core/snapshots/test-null-in-object.md_merged.snap +++ b/tests/core/snapshots/test-null-in-object.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 672f7a5282..6c8ac922b6 100644 --- a/tests/core/snapshots/test-omit-list.md_merged.snap +++ b/tests/core/snapshots/test-omit-list.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-omit.md_merged.snap b/tests/core/snapshots/test-omit.md_merged.snap index bb6a6a4f07..ce66f0a11f 100644 --- a/tests/core/snapshots/test-omit.md_merged.snap +++ b/tests/core/snapshots/test-omit.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 10a23ea587..b93a9c2d67 100644 --- a/tests/core/snapshots/test-query-documentation.md_merged.snap +++ b/tests/core/snapshots/test-query-documentation.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-query.md_merged.snap b/tests/core/snapshots/test-query.md_merged.snap index a1301a03b5..14d331e1a1 100644 --- a/tests/core/snapshots/test-query.md_merged.snap +++ b/tests/core/snapshots/test-query.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-response-header-merge.md_merged.snap b/tests/core/snapshots/test-response-header-merge.md_merged.snap index d8808602d5..e2bedaecf8 100644 --- a/tests/core/snapshots/test-response-header-merge.md_merged.snap +++ b/tests/core/snapshots/test-response-header-merge.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(headers: {custom: [{key: "a", value: "a"}, {key: "a", value: "b"}]}) @upstream { +schema @server(headers: {custom: [{key: "a", value: "a"}, {key: "a", value: "b"}]}) { query: Query } diff --git a/tests/core/snapshots/test-scalars.md_merged.snap b/tests/core/snapshots/test-scalars.md_merged.snap index 716063f91c..cc7c7178eb 100644 --- a/tests/core/snapshots/test-scalars.md_merged.snap +++ b/tests/core/snapshots/test-scalars.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server(hostname: "localhost", port: 8000) @upstream { +schema @server(hostname: "localhost", port: 8000) { query: Query } diff --git a/tests/core/snapshots/test-static-value.md_merged.snap b/tests/core/snapshots/test-static-value.md_merged.snap index d4fb7c0f4c..3f9cbaa207 100644 --- a/tests/core/snapshots/test-static-value.md_merged.snap +++ b/tests/core/snapshots/test-static-value.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/test-tag.md_merged.snap b/tests/core/snapshots/test-tag.md_merged.snap index f08a7d791d..aedd4fbcaa 100644 --- a/tests/core/snapshots/test-tag.md_merged.snap +++ b/tests/core/snapshots/test-tag.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-union.md_merged.snap b/tests/core/snapshots/test-union.md_merged.snap index ac9b0682f9..c074bba560 100644 --- a/tests/core/snapshots/test-union.md_merged.snap +++ b/tests/core/snapshots/test-union.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplacheholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplacheholder.typicode.com") { 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 eca1e38232..de0a516b1a 100644 --- a/tests/core/snapshots/test-upstream-headers.md_merged.snap +++ b/tests/core/snapshots/test-upstream-headers.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(allowedHeaders: ["X-bar", "x-foo"], baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(allowedHeaders: ["X-bar", "x-foo"], baseURL: "http://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/test-upstream.md_merged.snap b/tests/core/snapshots/test-upstream.md_merged.snap index 1bf8df4afc..e41748d496 100644 --- a/tests/core/snapshots/test-upstream.md_merged.snap +++ b/tests/core/snapshots/test-upstream.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(proxy: {url: "http://localhost:8085"}) { +schema @upstream(proxy: {url: "http://localhost:8085"}) { query: Query } diff --git a/tests/core/snapshots/upstream-batching.md_merged.snap b/tests/core/snapshots/upstream-batching.md_merged.snap index 96bc34ca2a..a04e87d548 100644 --- a/tests/core/snapshots/upstream-batching.md_merged.snap +++ b/tests/core/snapshots/upstream-batching.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 100}) { +schema @upstream(batch: {delay: 1, maxSize: 100}) { 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 fb720f6f46..9d5a02f154 100644 --- a/tests/core/snapshots/upstream-fail-request.md_merged.snap +++ b/tests/core/snapshots/upstream-fail-request.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { 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 90a785cd57..8773b87fe5 100644 --- a/tests/core/snapshots/with-args-url.md_merged.snap +++ b/tests/core/snapshots/with-args-url.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/core/snapshots/with-args.md_merged.snap b/tests/core/snapshots/with-args.md_merged.snap index 8d4d6edafd..082d9c3dbc 100644 --- a/tests/core/snapshots/with-args.md_merged.snap +++ b/tests/core/snapshots/with-args.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream { +schema { query: Query } diff --git a/tests/core/snapshots/with-nesting.md_merged.snap b/tests/core/snapshots/with-nesting.md_merged.snap index 5a3a7c2cb0..69b9c2a657 100644 --- a/tests/core/snapshots/with-nesting.md_merged.snap +++ b/tests/core/snapshots/with-nesting.md_merged.snap @@ -2,7 +2,7 @@ source: tests/core/spec.rs expression: merged --- -schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/core/spec.rs b/tests/core/spec.rs index e93aeb28dd..e40e2fe320 100644 --- a/tests/core/spec.rs +++ b/tests/core/spec.rs @@ -113,45 +113,29 @@ async fn check_server_config(spec: ExecutionSpec) -> Vec { }); let config = Config::default().merge_right(config); + if matches!(source, Source::GraphQL) { + let identity = config.to_sdl(); - // TODO: we should probably figure out a way to do this for every test - // but GraphQL identity checking is very hard, since a lot depends on the code - // style the re-serializing check gives us some of the advantages of the - // identity check too, but we are missing out on some by having it only - // 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 { - if matches!(source, Source::GraphQL) { - 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 - .context(context.clone()) - .unwrap(); - - let expected = tailcall_prettier::format(content, &tailcall_prettier::Parser::Gql) - .await - .context(context) - .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 - ); - } + // \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 parser = tailcall_prettier::Parser::detect(path_str.as_str()).unwrap(); + + let identity = tailcall_prettier::format(identity, &parser).await.unwrap(); + + let content = tailcall_prettier::format(content, &parser).await.unwrap(); + pretty_assertions::assert_eq!( + identity, + content, + "Identity check failed for {:#?}", + spec.path, + ); + } else { + tracing::warn!( + "Spec {:#?} has \"check identity\" enabled, but its config isn't in GraphQL.", + spec.path + ); } server.push(config); diff --git a/tests/execution/add-field-many-list.md b/tests/execution/add-field-many-list.md index 19bb15e782..3962f9451b 100644 --- a/tests/execution/add-field-many-list.md +++ b/tests/execution/add-field-many-list.md @@ -15,7 +15,10 @@ type Query { u: U @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/us/1") } -type U @addField(name: "b", path: ["a", "b"]) @addField(name: "c", path: ["a", "c"]) @addField(name: "d", path: ["a", "d"]) { +type U + @addField(name: "b", path: ["a", "b"]) + @addField(name: "c", path: ["a", "c"]) + @addField(name: "d", path: ["a", "d"]) { a: A e: String } diff --git a/tests/execution/add-field-many.md b/tests/execution/add-field-many.md index ba82dfe099..93328b901b 100644 --- a/tests/execution/add-field-many.md +++ b/tests/execution/add-field-many.md @@ -5,7 +5,10 @@ schema { query: Query } -type Foo @addField(name: "a", path: ["x", "a"]) @addField(name: "b", path: ["x", "b"]) @addField(name: "c", path: ["x", "c"]) { +type Foo + @addField(name: "a", path: ["x", "a"]) + @addField(name: "b", path: ["x", "b"]) + @addField(name: "c", path: ["x", "c"]) { name: String x: X } diff --git a/tests/execution/add-field-modify.md b/tests/execution/add-field-modify.md index 1507c89b86..303b5ee12e 100644 --- a/tests/execution/add-field-modify.md +++ b/tests/execution/add-field-modify.md @@ -15,7 +15,10 @@ type Query { user: User @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users/1") } -type User @addField(name: "street", path: ["address", "street"]) @addField(name: "city", path: ["address", "city"]) @addField(name: "zipcode", path: ["address", "zipcode"]) { +type User + @addField(name: "street", path: ["address", "street"]) + @addField(name: "city", path: ["address", "city"]) + @addField(name: "zipcode", path: ["address", "zipcode"]) { address: Address name: String } diff --git a/tests/execution/add-field-with-composition.md b/tests/execution/add-field-with-composition.md index 15edae74ff..596d06b54a 100644 --- a/tests/execution/add-field-with-composition.md +++ b/tests/execution/add-field-with-composition.md @@ -15,7 +15,9 @@ type Geo { lng: String } -type Query @addField(name: "lat", path: ["user", "address", "geo", "lat"]) @addField(name: "lng", path: ["user", "address", "geo", "lng"]) { +type Query + @addField(name: "lat", path: ["user", "address", "geo", "lat"]) + @addField(name: "lng", path: ["user", "address", "geo", "lng"]) { user: User @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users/1") } diff --git a/tests/execution/async-cache-enable-multiple-resolvers.md b/tests/execution/async-cache-enable-multiple-resolvers.md index 2a31bd4d3a..7d0721df77 100644 --- a/tests/execution/async-cache-enable-multiple-resolvers.md +++ b/tests/execution/async-cache-enable-multiple-resolvers.md @@ -1,7 +1,9 @@ # Async Cache Enabled ```graphql @server -schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", dedupe: true) { +schema + @server(port: 8000, queryValidation: false) + @upstream(baseURL: "http://jsonplaceholder.typicode.com", dedupe: true) { query: Query } diff --git a/tests/execution/async-cache-enabled.md b/tests/execution/async-cache-enabled.md index 519dbcef83..639028e609 100644 --- a/tests/execution/async-cache-enabled.md +++ b/tests/execution/async-cache-enabled.md @@ -1,7 +1,9 @@ # Async Cache Enabled ```graphql @server -schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", dedupe: true) { +schema + @server(port: 8000, queryValidation: false) + @upstream(baseURL: "http://jsonplaceholder.typicode.com", dedupe: true) { query: Query } diff --git a/tests/execution/batching-default.md b/tests/execution/batching-default.md index 970a60471d..ce5cbb5890 100644 --- a/tests/execution/batching-default.md +++ b/tests/execution/batching-default.md @@ -9,7 +9,12 @@ type Post { body: String id: Int title: String - user: User @http(batchKey: ["id"], path: "/users", query: [{key: "id", value: "{{.value.userId}}"}, {key: "foo", value: "bar"}]) + user: User + @http( + batchKey: ["id"] + path: "/users" + query: [{key: "id", value: "{{.value.userId}}"}, {key: "foo", value: "bar"}] + ) userId: Int! } diff --git a/tests/execution/batching-group-by-default.md b/tests/execution/batching-group-by-default.md index 040966e3f2..f564531350 100644 --- a/tests/execution/batching-group-by-default.md +++ b/tests/execution/batching-group-by-default.md @@ -9,7 +9,12 @@ type Post { body: String id: Int title: String - user: User @http(batchKey: ["id"], path: "/users", query: [{key: "id", value: "{{.value.userId}}"}, {key: "foo", value: "bar"}]) + user: User + @http( + batchKey: ["id"] + path: "/users" + query: [{key: "id", value: "{{.value.userId}}"}, {key: "foo", value: "bar"}] + ) userId: Int! } diff --git a/tests/execution/batching-group-by.md b/tests/execution/batching-group-by.md index b5e29690b2..627d036b39 100644 --- a/tests/execution/batching-group-by.md +++ b/tests/execution/batching-group-by.md @@ -1,7 +1,9 @@ # Batching group by ```graphql @server -schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) { +schema + @server(port: 8000, queryValidation: false) + @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) { query: Query } @@ -9,7 +11,12 @@ type Post { body: String id: Int title: String - user: User @http(batchKey: ["id"], path: "/users", query: [{key: "id", value: "{{.value.userId}}"}, {key: "foo", value: "bar"}]) + user: User + @http( + batchKey: ["id"] + path: "/users" + query: [{key: "id", value: "{{.value.userId}}"}, {key: "foo", value: "bar"}] + ) userId: Int! } diff --git a/tests/execution/batching-post.md b/tests/execution/batching-post.md index 1649a572f7..3597e67857 100644 --- a/tests/execution/batching-post.md +++ b/tests/execution/batching-post.md @@ -1,7 +1,9 @@ # Batching post ```graphql @server -schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) { +schema + @server(port: 8000, queryValidation: false) + @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) { query: Query } diff --git a/tests/execution/call-graphql-datasource.md b/tests/execution/call-graphql-datasource.md index f73ccd6881..b1e7972f85 100644 --- a/tests/execution/call-graphql-datasource.md +++ b/tests/execution/call-graphql-datasource.md @@ -1,7 +1,9 @@ # Call operator with graphQL datasource ```graphql @server -schema @server(hostname: "0.0.0.0", port: 8000) @upstream(baseURL: "http://jsonplaceholder.typicode.com", httpCache: true) { +schema + @server(hostname: "0.0.0.0", port: 8000) + @upstream(baseURL: "http://jsonplaceholder.typicode.com", httpCache: true) { query: Query } @@ -15,7 +17,8 @@ type Post { type Query { posts: [Post] @http(path: "/posts") - user(id: Int!): User @graphQL(args: [{key: "id", value: "{{.args.id}}"}], baseURL: "http://upstream/graphql", name: "user") + user(id: Int!): User + @graphQL(args: [{key: "id", value: "{{.args.id}}"}], baseURL: "http://upstream/graphql", name: "user") } type User { diff --git a/tests/execution/call-multiple-steps-piping.md b/tests/execution/call-multiple-steps-piping.md index bfea9b8ff1..fb44b69270 100644 --- a/tests/execution/call-multiple-steps-piping.md +++ b/tests/execution/call-multiple-steps-piping.md @@ -8,8 +8,27 @@ schema { type Query { a(input: JSON): JSON @expr(body: "{{.args.input.a}}") a_input(input: JSON): JSON @expr(body: {input: "{{.args.input.a}}"}) - abc(input: JSON): JSON @call(steps: [{query: "a", args: {input: "{{.args.input}}"}}, {query: "wrap_args"}, {query: "b"}, {query: "wrap_args"}, {query: "c"}]) - abc_input(input: JSON): JSON @call(steps: [{query: "wrap_input", args: {input: "{{.args.input}}"}}, {query: "a_input"}, {query: "wrap_input"}, {query: "b_input"}, {query: "wrap_input"}, {query: "c"}]) + abc(input: JSON): JSON + @call( + steps: [ + {query: "a", args: {input: "{{.args.input}}"}} + {query: "wrap_args"} + {query: "b"} + {query: "wrap_args"} + {query: "c"} + ] + ) + abc_input(input: JSON): JSON + @call( + steps: [ + {query: "wrap_input", args: {input: "{{.args.input}}"}} + {query: "a_input"} + {query: "wrap_input"} + {query: "b_input"} + {query: "wrap_input"} + {query: "c"} + ] + ) b(input: JSON): JSON @expr(body: "{{.args.input.b}}") b_input(input: JSON): JSON @expr(body: {input: "{{.args.input.b}}"}) c(input: JSON): JSON @expr(body: "{{.args.input.c}}") diff --git a/tests/execution/call-mutation.md b/tests/execution/call-mutation.md index bbd618df72..eef29c86fe 100644 --- a/tests/execution/call-mutation.md +++ b/tests/execution/call-mutation.md @@ -19,12 +19,17 @@ input PostInputWithoutUserId { } type Mutation { - attachPostToFirstUser(postId: Int!): User @call(steps: [{mutation: "attachPostToUser", args: {postId: "{{.args.postId}}", userId: 1}}]) - attachPostToUser(postId: Int!, userId: Int!): User @http(body: "{\"postId\":{{.args.postId}}}", method: "PATCH", path: "/users/{{.args.userId}}") - insertMockedPost: Post @call(steps: [{mutation: "insertPost", args: {input: {body: "post-body", title: "post-title", userId: 1}}}]) + attachPostToFirstUser(postId: Int!): User + @call(steps: [{mutation: "attachPostToUser", args: {postId: "{{.args.postId}}", userId: 1}}]) + attachPostToUser(postId: Int!, userId: Int!): User + @http(body: "{\"postId\":{{.args.postId}}}", method: "PATCH", path: "/users/{{.args.userId}}") + insertMockedPost: Post + @call(steps: [{mutation: "insertPost", args: {input: {body: "post-body", title: "post-title", userId: 1}}}]) insertPost(input: PostInput): Post @http(body: "{{.args.input}}", method: "POST", path: "/posts") - insertPostToFirstUser(input: PostInputWithoutUserId): Post @call(steps: [{mutation: "insertPostToUser", args: {input: "{{.args.input}}", userId: 1}}]) - insertPostToUser(input: PostInputWithoutUserId!, userId: Int!): Post @http(body: "{{.args.input}}", method: "POST", path: "/users/{{.args.userId}}/posts") + insertPostToFirstUser(input: PostInputWithoutUserId): Post + @call(steps: [{mutation: "insertPostToUser", args: {input: "{{.args.input}}", userId: 1}}]) + insertPostToUser(input: PostInputWithoutUserId!, userId: Int!): Post + @http(body: "{{.args.input}}", method: "POST", path: "/users/{{.args.userId}}/posts") } type Post { diff --git a/tests/execution/cors-allow-cred-false.md b/tests/execution/cors-allow-cred-false.md index 347f5697a9..800911e729 100644 --- a/tests/execution/cors-allow-cred-false.md +++ b/tests/execution/cors-allow-cred-false.md @@ -1,7 +1,20 @@ # Cors allow cred false ```graphql @server -schema @server(headers: {cors: {allowHeaders: ["Authorization"], allowMethods: ["POST", "OPTIONS"], allowOrigins: ["abc.com", "xyz.com"], allowPrivateNetwork: true, maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { +schema + @server( + headers: { + cors: { + allowHeaders: ["Authorization"] + allowMethods: ["POST", "OPTIONS"] + allowOrigins: ["abc.com", "xyz.com"] + allowPrivateNetwork: true + maxAge: 23 + vary: ["origin", "access-control-request-method", "access-control-request-headers"] + } + } + ) + @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/execution/cors-allow-cred-true.md b/tests/execution/cors-allow-cred-true.md index 1ae270f206..e9f5524628 100644 --- a/tests/execution/cors-allow-cred-true.md +++ b/tests/execution/cors-allow-cred-true.md @@ -1,7 +1,20 @@ # Cors allow cred true ```graphql @server -schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { +schema + @server( + headers: { + cors: { + allowCredentials: true + allowMethods: ["OPTIONS", "POST", "GET"] + allowOrigins: ["abc.com", "xyz.com"] + exposeHeaders: [""] + maxAge: 23 + vary: ["origin", "access-control-request-method", "access-control-request-headers"] + } + } + ) + @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/execution/cors-allow-cred-vary.md b/tests/execution/cors-allow-cred-vary.md index 7395997368..b5c48fe795 100644 --- a/tests/execution/cors-allow-cred-vary.md +++ b/tests/execution/cors-allow-cred-vary.md @@ -1,7 +1,20 @@ # Cors allow cred vary ```graphql @server -schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { +schema + @server( + headers: { + cors: { + allowCredentials: true + allowMethods: ["OPTIONS", "POST", "GET"] + allowOrigins: ["abc.com", "xyz.com"] + exposeHeaders: [""] + maxAge: 23 + vary: ["origin", "access-control-request-method", "access-control-request-headers"] + } + } + ) + @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/execution/cors-invalid-expose-headers.md b/tests/execution/cors-invalid-expose-headers.md index f56d959afe..71b9371e21 100644 --- a/tests/execution/cors-invalid-expose-headers.md +++ b/tests/execution/cors-invalid-expose-headers.md @@ -5,7 +5,18 @@ expect_validation_error: true # Cors invalid exposeHeaders ```graphql @server -schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["POST", "OPTIONS"], exposeHeaders: ["*"], vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { +schema + @server( + headers: { + cors: { + allowCredentials: true + allowMethods: ["POST", "OPTIONS"] + exposeHeaders: ["*"] + vary: ["origin", "access-control-request-method", "access-control-request-headers"] + } + } + ) + @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/execution/cors-invalid-headers.md b/tests/execution/cors-invalid-headers.md index e4d2c98fd4..d5faff51c3 100644 --- a/tests/execution/cors-invalid-headers.md +++ b/tests/execution/cors-invalid-headers.md @@ -5,7 +5,18 @@ expect_validation_error: true # Cors invalid allowHeaders ```graphql @server -schema @server(headers: {cors: {allowCredentials: true, allowHeaders: ["*"], allowMethods: ["POST", "OPTIONS"], vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { +schema + @server( + headers: { + cors: { + allowCredentials: true + allowHeaders: ["*"] + allowMethods: ["POST", "OPTIONS"] + vary: ["origin", "access-control-request-method", "access-control-request-headers"] + } + } + ) + @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/execution/cors-invalid-methods.md b/tests/execution/cors-invalid-methods.md index 16cfb2cca6..98766dd535 100644 --- a/tests/execution/cors-invalid-methods.md +++ b/tests/execution/cors-invalid-methods.md @@ -5,7 +5,16 @@ expect_validation_error: true # Cors invalid allowMethods ```graphql @server -schema @server(headers: {cors: {allowCredentials: true, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { +schema + @server( + headers: { + cors: { + allowCredentials: true + vary: ["origin", "access-control-request-method", "access-control-request-headers"] + } + } + ) + @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/execution/cors-invalid-origins.md b/tests/execution/cors-invalid-origins.md index dcdb1e80a4..37be7e197e 100644 --- a/tests/execution/cors-invalid-origins.md +++ b/tests/execution/cors-invalid-origins.md @@ -5,7 +5,18 @@ expect_validation_error: true # Cors invalid allowOrigins ```graphql @server -schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["POST", "OPTIONS"], allowOrigins: ["*"], vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { +schema + @server( + headers: { + cors: { + allowCredentials: true + allowMethods: ["POST", "OPTIONS"] + allowOrigins: ["*"] + vary: ["origin", "access-control-request-method", "access-control-request-headers"] + } + } + ) + @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) { query: Query } diff --git a/tests/execution/graphql-dataloader-batch-keys.md b/tests/execution/graphql-dataloader-batch-keys.md index 9c1f4fbc53..2c89879d05 100644 --- a/tests/execution/graphql-dataloader-batch-keys.md +++ b/tests/execution/graphql-dataloader-batch-keys.md @@ -6,7 +6,9 @@ [//]: # "This test had an assertion with a fail annotation that testconv cannot convert losslessly. If you need the original responses, you can find it in git history. For example, at commit https://github.com/tailcallhq/tailcall/tree/1c32ca9e8080ae3b17e9cf41078d028d3e0289da" ```graphql @server -schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(baseURL: "http://upstream/graphql", batch: {delay: 1}, httpCache: true) { +schema + @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) + @upstream(baseURL: "http://upstream/graphql", batch: {delay: 1}, httpCache: true) { query: Query } diff --git a/tests/execution/graphql-dataloader-batch-request.md b/tests/execution/graphql-dataloader-batch-request.md index 2dcf071e20..cf11c4f3b4 100644 --- a/tests/execution/graphql-dataloader-batch-request.md +++ b/tests/execution/graphql-dataloader-batch-request.md @@ -8,7 +8,13 @@ schema @upstream(batch: {delay: 1}) { type Post { id: Int title: String - user: User @graphQL(args: [{key: "id", value: "{{.value.userId}}"}], baseURL: "http://upstream/graphql", batch: true, name: "user") + user: User + @graphQL( + args: [{key: "id", value: "{{.value.userId}}"}] + baseURL: "http://upstream/graphql" + batch: true + name: "user" + ) userId: Int } diff --git a/tests/execution/graphql-datasource-errors.md b/tests/execution/graphql-datasource-errors.md index 3e583d4c57..4894f3749d 100644 --- a/tests/execution/graphql-datasource-errors.md +++ b/tests/execution/graphql-datasource-errors.md @@ -6,7 +6,8 @@ schema { } type Query { - user(id: Int): User @graphQL(args: [{key: "id", value: "{{.args.id}}"}], baseURL: "http://upstream/graphql", name: "user") + user(id: Int): User + @graphQL(args: [{key: "id", value: "{{.args.id}}"}], baseURL: "http://upstream/graphql", name: "user") } type User { diff --git a/tests/execution/graphql-datasource-mutation.md b/tests/execution/graphql-datasource-mutation.md index 3f3313379f..d4db3c6574 100644 --- a/tests/execution/graphql-datasource-mutation.md +++ b/tests/execution/graphql-datasource-mutation.md @@ -13,7 +13,8 @@ input UserInput { } type Mutation { - createUser(user: UserInput!): User @graphQL(args: [{key: "user", value: "{{.args.user}}"}], baseURL: "http://upstream/graphql", name: "createUser") + createUser(user: UserInput!): User + @graphQL(args: [{key: "user", value: "{{.args.user}}"}], baseURL: "http://upstream/graphql", name: "createUser") } type Query { diff --git a/tests/execution/graphql-datasource-with-args.md b/tests/execution/graphql-datasource-with-args.md index 57919e8588..f4e49640c1 100644 --- a/tests/execution/graphql-datasource-with-args.md +++ b/tests/execution/graphql-datasource-with-args.md @@ -11,8 +11,10 @@ type Post { } type Query { - post(id: Int): Post @graphQL(args: [{key: "id", value: "{{.args.id}}"}], baseURL: "http://upstream/graphql", name: "post") - user(id: Int): User @graphQL(args: [{key: "id", value: "{{.args.id}}"}], baseURL: "http://upstream/graphql", name: "user") + post(id: Int): Post + @graphQL(args: [{key: "id", value: "{{.args.id}}"}], baseURL: "http://upstream/graphql", name: "post") + user(id: Int): User + @graphQL(args: [{key: "id", value: "{{.args.id}}"}], baseURL: "http://upstream/graphql", name: "user") } type User { diff --git a/tests/execution/grpc-reflection.md b/tests/execution/grpc-reflection.md index 66fdfcdc94..219432f345 100644 --- a/tests/execution/grpc-reflection.md +++ b/tests/execution/grpc-reflection.md @@ -1,7 +1,27 @@ # Grpc datasource ```graphql @server -ERROR error=Request error: error sending request for url (http://localhost:50051/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo): error trying to connect: tcp connect error: Connection refused (os error 61) +schema + @server(port: 8000) + @upstream(httpCache: true, baseURL: "http://localhost:50051") + @link(src: "http://localhost:50051", type: Grpc) { + query: Query +} + +type Query { + news: NewsData! @grpc(method: "news.NewsService.GetAllNews") +} + +type NewsData { + news: [News]! +} + +type News { + id: Int + title: String + body: String + postImage: String +} ``` ```yml @mock diff --git a/tests/execution/inline-many-list.md b/tests/execution/inline-many-list.md index 0cd9542bc9..e48fd88543 100644 --- a/tests/execution/inline-many-list.md +++ b/tests/execution/inline-many-list.md @@ -15,7 +15,10 @@ type Query { u: U @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/us/1") } -type U @addField(name: "b", path: ["a", "b"]) @addField(name: "c", path: ["a", "c"]) @addField(name: "d", path: ["a", "d"]) { +type U + @addField(name: "b", path: ["a", "b"]) + @addField(name: "c", path: ["a", "c"]) + @addField(name: "d", path: ["a", "d"]) { a: A @modify(omit: true) e: String } diff --git a/tests/execution/inline-many.md b/tests/execution/inline-many.md index 541ad258c1..a25fcc9d99 100644 --- a/tests/execution/inline-many.md +++ b/tests/execution/inline-many.md @@ -15,7 +15,10 @@ type Query { user: User @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users/1") } -type User @addField(name: "city", path: ["address", "city"]) @addField(name: "street", path: ["address", "street"]) @addField(name: "zipcode", path: ["address", "zipcode"]) { +type User + @addField(name: "city", path: ["address", "city"]) + @addField(name: "street", path: ["address", "street"]) + @addField(name: "zipcode", path: ["address", "zipcode"]) { address: Address @modify(omit: true) name: String } diff --git a/tests/execution/input-type-protected-error.md b/tests/execution/input-type-protected-error.md index d038162e05..440ebe2ae2 100644 --- a/tests/execution/input-type-protected-error.md +++ b/tests/execution/input-type-protected-error.md @@ -15,7 +15,7 @@ input Input @protected { } input NewPost { - content: String@protected + content: String @protected } type Mutation { diff --git a/tests/execution/io-cache.md b/tests/execution/io-cache.md index de97cc3e70..f9c133685e 100644 --- a/tests/execution/io-cache.md +++ b/tests/execution/io-cache.md @@ -1,7 +1,9 @@ # Call operator with GraphQL data source ```graphql @server -schema @server(hostname: "0.0.0.0", port: 8000) @upstream(baseURL: "http://jsonplaceholder.typicode.com", httpCache: true) { +schema + @server(hostname: "0.0.0.0", port: 8000) + @upstream(baseURL: "http://jsonplaceholder.typicode.com", httpCache: true) { query: Query } diff --git a/tests/execution/jsonplaceholder-call-post.md b/tests/execution/jsonplaceholder-call-post.md index 94aa9696d6..98ad2e98df 100644 --- a/tests/execution/jsonplaceholder-call-post.md +++ b/tests/execution/jsonplaceholder-call-post.md @@ -1,7 +1,9 @@ # jsonplaceholder-call-post ```graphql @server -schema @server(hostname: "0.0.0.0", port: 8000) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 100}, httpCache: true) { +schema + @server(hostname: "0.0.0.0", port: 8000) + @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 100}, httpCache: true) { query: Query } diff --git a/tests/execution/nullable-arg-query.md b/tests/execution/nullable-arg-query.md index 665bd3e9e7..01e5ac56da 100644 --- a/tests/execution/nullable-arg-query.md +++ b/tests/execution/nullable-arg-query.md @@ -6,7 +6,8 @@ schema { } type Query { - users(id: ID): [User] @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users", query: [{key: "id", value: "{{.args.id}}"}]) + users(id: ID): [User] + @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users", query: [{key: "id", value: "{{.args.id}}"}]) } type User { diff --git a/tests/execution/omit-many.md b/tests/execution/omit-many.md index ad576528e0..85b92d9dfb 100644 --- a/tests/execution/omit-many.md +++ b/tests/execution/omit-many.md @@ -16,7 +16,9 @@ type Query { user: User @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users/1") } -type User @addField(name: "zipcode", path: ["address", "zipcode"]) @addField(name: "complements", path: ["address", "complements"]) { +type User + @addField(name: "zipcode", path: ["address", "zipcode"]) + @addField(name: "complements", path: ["address", "complements"]) { address: Address @omit name: String } diff --git a/tests/execution/resolve-with-vars.md b/tests/execution/resolve-with-vars.md index b0e57a9d36..9b682807ad 100644 --- a/tests/execution/resolve-with-vars.md +++ b/tests/execution/resolve-with-vars.md @@ -6,7 +6,8 @@ schema @server(vars: [{key: "id", value: "1"}]) { } type Query { - user: [User] @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users", query: [{key: "id", value: "{{.vars.id}}"}]) + user: [User] + @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users", query: [{key: "id", value: "{{.vars.id}}"}]) } type User { diff --git a/tests/execution/test-directives-undef-null-fields.md b/tests/execution/test-directives-undef-null-fields.md index 7ba1e18929..fb949a9153 100644 --- a/tests/execution/test-directives-undef-null-fields.md +++ b/tests/execution/test-directives-undef-null-fields.md @@ -15,10 +15,14 @@ type NestedUser { type Post { id: Int! - nestedNonScalar: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser.nonNullableNestedUser}}") - nestedNullable: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser.nonNullableNestedUser.id}}") - nestedUndefinedValue: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser.nonNullableNestedUser.userId}}") - nestedUserNullable: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser.nestedUser.id}}") + nestedNonScalar: User + @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser.nonNullableNestedUser}}") + nestedNullable: User + @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser.nonNullableNestedUser.id}}") + nestedUndefinedValue: User + @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser.nonNullableNestedUser.userId}}") + nestedUserNullable: User + @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser.nestedUser.id}}") nonNullableUser: User! @http(baseURL: "http://localhost:8080", path: "/users/{{.value.id}}") user: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.id}}") userArg: User @http(baseURL: "http://localhost:8080", path: "/users/{{.args.id}}") @@ -26,15 +30,18 @@ type Post { userInvalidDirective: User @http(baseURL: "http://localhost:8080", path: "/users/{{.Vale.userId}}") userNonScalar: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.nonNullableUser}}") userNullValue: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.userId}}") - userNullValueQuery: User @http(baseURL: "http://localhost:8080", path: "/users", query: [{key: "id", value: "{{.value.id}}"}]) + userNullValueQuery: User + @http(baseURL: "http://localhost:8080", path: "/users", query: [{key: "id", value: "{{.value.id}}"}]) userNullable: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.user.id}}") userUndefinedValue: User @http(baseURL: "http://localhost:8080", path: "/users/{{.value.userid}}") - userUndefinedValueQuery: User @http(baseURL: "http://localhost:8080", path: "/users", query: [{key: "id", value: "{{.value.userid}}"}]) + userUndefinedValueQuery: User + @http(baseURL: "http://localhost:8080", path: "/users", query: [{key: "id", value: "{{.value.userid}}"}]) userVars: User @http(baseURL: "http://localhost:8080", path: "/users/{{.vars.a}}") } type Query { - userAccessHeadersVars(id: ID!): User @http(baseURL: "http://localhost:8080", path: "/user/{{.args.id}}/{{.headers.garbage}}/{{.vars.garbage}}") + userAccessHeadersVars(id: ID!): User + @http(baseURL: "http://localhost:8080", path: "/user/{{.args.id}}/{{.headers.garbage}}/{{.vars.garbage}}") userListArg(id: [ID]): User @http(baseURL: "http://localhost:8080", path: "/user/{{.args.id}}") userNullableArg(id: ID): User @http(baseURL: "http://localhost:8080", path: "/user/{{.args.id}}") userUndefinedArg(id: ID): User @http(baseURL: "http://localhost:8080", path: "/user/{{.args.uid}}") diff --git a/tests/execution/test-set-cookie-headers.md b/tests/execution/test-set-cookie-headers.md index 150f6d6fcf..c2fd553c88 100644 --- a/tests/execution/test-set-cookie-headers.md +++ b/tests/execution/test-set-cookie-headers.md @@ -1,7 +1,9 @@ # Set Cookie Header ```graphql @server -schema @server(headers: {setCookies: true}, hostname: "0.0.0.0", port: 8080) @upstream(baseURL: "http://jsonplaceholder.typicode.com") { +schema + @server(headers: {setCookies: true}, hostname: "0.0.0.0", port: 8080) + @upstream(baseURL: "http://jsonplaceholder.typicode.com") { query: Query } diff --git a/tests/execution/with-args.md b/tests/execution/with-args.md index 0c37ed57f1..74b4ab9331 100644 --- a/tests/execution/with-args.md +++ b/tests/execution/with-args.md @@ -6,7 +6,8 @@ schema { } type Query { - user(id: Int!): [User] @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users", query: [{key: "id", value: "{{.args.id}}"}]) + user(id: Int!): [User] + @http(baseURL: "http://jsonplaceholder.typicode.com", path: "/users", query: [{key: "id", value: "{{.args.id}}"}]) } type User {