diff --git a/.github/workflows/benchmark_comment.yml b/.github/workflows/benchmark_comment.yml index 8fc3d567d1..e04229e8b0 100644 --- a/.github/workflows/benchmark_comment.yml +++ b/.github/workflows/benchmark_comment.yml @@ -9,7 +9,7 @@ on: jobs: macro_benchmarks_comment: name: Benchmark comment on commit - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest if: > github.event.workflow_run.conclusion == 'success' steps: diff --git a/.github/workflows/benchmark_pr_track.yml b/.github/workflows/benchmark_pr_track.yml index ff55501085..1f460a26ba 100644 --- a/.github/workflows/benchmark_pr_track.yml +++ b/.github/workflows/benchmark_pr_track.yml @@ -12,7 +12,7 @@ concurrency: jobs: micro_benchmarks_pr_track: if: github.event.workflow_run.conclusion == 'success' - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest env: BENCHMARK_RESULTS: benchmark_results.txt PR_EVENT: event.json diff --git a/.github/workflows/build-website.yml b/.github/workflows/build-website.yml index 7f2121a14b..72a1f36f03 100644 --- a/.github/workflows/build-website.yml +++ b/.github/workflows/build-website.yml @@ -7,7 +7,7 @@ on: jobs: build_website: - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - name: Build website env: diff --git a/.github/workflows/build_matrix.yml b/.github/workflows/build_matrix.yml index 555bc8239e..3e09d85b9a 100644 --- a/.github/workflows/build_matrix.yml +++ b/.github/workflows/build_matrix.yml @@ -10,7 +10,7 @@ jobs: # IMPORTANT: in case of changing the structure of this file make sure to test # the changes against `npm/gen-root.ts` file setup-matrix: - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest outputs: matrix: ${{ steps.setup-matrix.outputs.matrix }} steps: @@ -33,34 +33,34 @@ jobs: ] include: - build: linux-x64-gnu - os: blacksmith-4vcpu-ubuntu-2204 + os: ubuntu-latest rust: stable target: x86_64-unknown-linux-gnu libc: glibc - build: linux-x64-musl - os: blacksmith-4vcpu-ubuntu-2204 + os: ubuntu-latest rust: stable target: x86_64-unknown-linux-musl libc: musl cross: true - build: linux-arm64-gnu - os: blacksmith-4vcpu-ubuntu-2204 + os: ubuntu-latest rust: stable target: aarch64-unknown-linux-gnu libc: glibc cross: true - build: linux-arm64-musl - os: blacksmith-4vcpu-ubuntu-2204 + os: ubuntu-latest rust: stable target: aarch64-unknown-linux-musl libc: musl cross: true - build: linux-ia32-gnu - os: blacksmith-4vcpu-ubuntu-2204 + os: ubuntu-latest rust: stable target: i686-unknown-linux-gnu libc: glibc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dde4e8b632..52b302ba23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: check_if_build: name: Check if Build - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -40,7 +40,7 @@ jobs: test_aws_build: name: Test AWS Lambda Build if: github.event_name == 'pull_request' - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest defaults: run: working-directory: ./tailcall-aws-lambda @@ -52,7 +52,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Install Python - uses: useblacksmith/setup-python@v6 + uses: actions/setup-python@v5 with: python-version: "3.12" @@ -64,7 +64,7 @@ jobs: test_wasm: name: Run Tests (WASM) - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest defaults: run: working-directory: ./tailcall-wasm @@ -76,7 +76,7 @@ jobs: target: wasm32-unknown-unknown - name: Install Node.js - uses: useblacksmith/setup-node@v5 + uses: actions/setup-node@v4 with: node-version: "20.11.0" @@ -90,7 +90,7 @@ jobs: test_cf: name: Run Tests (Cloudflare) - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest defaults: run: working-directory: ./tailcall-cloudflare @@ -104,7 +104,7 @@ jobs: target: wasm32-unknown-unknown - name: Install Node.js - uses: useblacksmith/setup-node@v5 + uses: actions/setup-node@v4 with: node-version: "20.11.0" @@ -116,17 +116,20 @@ jobs: test: name: Run Tests on ${{ matrix.build }} - runs-on: ${{ matrix.os || 'blacksmith-4vcpu-ubuntu-2204' }} + runs-on: ${{ matrix.os || 'ubuntu-latest' }} needs: setup_build_matrix strategy: fail-fast: false matrix: ${{ fromJson(needs.setup_build_matrix.outputs.matrix) }} + env: + WITH_COVERAGE: ${{ matrix.build == 'darwin-arm64' }} + steps: - uses: actions/checkout@v4 - name: Install Node.js - uses: useblacksmith/setup-node@v5 + uses: actions/setup-node@v4 with: node-version: "20.11.0" - name: Install Prettier @@ -142,7 +145,7 @@ jobs: - name: Cache NASM if: runner.os == 'Windows' - uses: useblacksmith/cache@v5 + uses: actions/cache@v4 with: path: | nasm-2.16.02 @@ -164,15 +167,28 @@ jobs: } echo "$(Resolve-Path nasm-2.16.02)" >> $env:GITHUB_PATH - - uses: taiki-e/install-action@cargo-llvm-cov + - name: Install insta test runner + if: ${{ env.WITH_COVERAGE == 'false' && matrix.test != 'false' }} + uses: taiki-e/install-action@v2 + with: + tool: cargo-insta + + - name: Run cargo insta test + if: ${{ env.WITH_COVERAGE == 'false' && matrix.test != 'false' }} + run: cargo insta test --unreferenced reject --workspace --target ${{ matrix.target }} + + - name: Install llvm-cov test runner + if: ${{ env.WITH_COVERAGE == 'true' && matrix.test != 'false' }} + uses: taiki-e/install-action@v2 + with: + tool: cargo-llvm-cov - - name: Run Cargo Test - if: matrix.test != 'false' - # TODO: run llvm-cov only for single build since other builds are not sent to codecov anyway + - name: Run cargo llvm-cov test + if: ${{ env.WITH_COVERAGE == 'true' && matrix.test != 'false' }} run: cargo llvm-cov --workspace ${{ matrix.features }} --lcov --target ${{ matrix.target }} --output-path lcov.info - name: Upload Coverage to Codecov - if: matrix.build == 'darwin-arm64' + if: ${{ env.WITH_COVERAGE == 'true' && matrix.test != 'false' }} uses: Wandalen/wretry.action@v3 with: action: codecov/codecov-action@v4 @@ -185,7 +201,7 @@ jobs: check-examples: name: Check Examples - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Rust @@ -207,7 +223,7 @@ jobs: draft_release: name: Draft Release if: github.event_name == 'push' && github.ref == 'refs/heads/main' - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest permissions: contents: write pull-requests: write @@ -237,7 +253,7 @@ jobs: needs: [setup_build_matrix, test, draft_release, check_if_build, test_cf, test_wasm] # TODO: put a condition to separate job that other will depend on to remove duplication? if: github.event_name == 'push' && github.ref == 'refs/heads/main' && (needs.check_if_build.outputs.check_if_build == 'true') - runs-on: ${{ matrix.os || 'blacksmith-4vcpu-ubuntu-2204' }} + runs-on: ${{ matrix.os || 'ubuntu-latest' }} strategy: fail-fast: false matrix: ${{ fromJson(needs.setup_build_matrix.outputs.matrix) }} @@ -272,7 +288,7 @@ jobs: - name: Install Node.js if: (startsWith(github.event.head_commit.message, 'feat') || startsWith(github.event.head_commit.message, 'fix')) && (github.event_name == 'push' && github.ref == 'refs/heads/main') - uses: useblacksmith/setup-node@v5 + uses: actions/setup-node@v4 with: node-version: 20.11.0 registry-url: https://registry.npmjs.org @@ -316,7 +332,7 @@ jobs: name: Release (AWS Lambda) needs: [test, draft_release, check_if_build, test_cf] if: github.event_name == 'push' && github.ref == 'refs/heads/main' && (needs.check_if_build.outputs.check_if_build == 'true') - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest permissions: contents: write pull-requests: write @@ -332,7 +348,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Install Python - uses: useblacksmith/setup-python@v6 + uses: actions/setup-python@v5 with: python-version: "3.12" @@ -360,7 +376,7 @@ jobs: name: Semantic Release if: (startsWith(github.event.head_commit.message, 'feat') || startsWith(github.event.head_commit.message, 'fix')) && (github.event_name == 'push' && github.ref == 'refs/heads/main') needs: [draft_release, release, release_lambda] - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest permissions: contents: write pull-requests: write @@ -380,12 +396,12 @@ jobs: name: Publish NPM main package needs: [draft_release, release] if: (startsWith(github.event.head_commit.message, 'feat') || startsWith(github.event.head_commit.message, 'fix')) && (github.event_name == 'push' && github.ref == 'refs/heads/main') - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - name: Checkout Current Branch (Fast) uses: actions/checkout@v4 - name: Install Node - uses: useblacksmith/setup-node@v5 + uses: actions/setup-node@v4 with: node-version: 20.11.0 registry-url: https://registry.npmjs.org @@ -425,7 +441,7 @@ jobs: APP_VERSION: ${{ needs.draft_release.outputs.create_release_name }} # Ensure APP_VERSION is set correctly needs: [draft_release, release] if: (startsWith(github.event.head_commit.message, 'feat') || startsWith(github.event.head_commit.message, 'fix')) && (github.event_name == 'push' && github.ref == 'refs/heads/main') - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. permissions: contents: read @@ -468,7 +484,7 @@ jobs: permissions: contents: write pull-requests: write - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index fa3663656a..016cb790f8 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -9,7 +9,7 @@ on: jobs: label-sync: - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 46778afd5f..c386752723 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ concurrency: jobs: lint: name: Run Formatter and Lint Check - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest permissions: pull-requests: write contents: write @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Node.js - uses: useblacksmith/setup-node@v5 + uses: actions/setup-node@v4 with: node-version: "20.11.0" - name: Install Prettier diff --git a/.github/workflows/pr-convention.yml b/.github/workflows/pr-convention.yml index d319a0e8ed..7492cd48cc 100644 --- a/.github/workflows/pr-convention.yml +++ b/.github/workflows/pr-convention.yml @@ -12,7 +12,7 @@ permissions: jobs: title-check: name: Check PR Title - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - name: All PRs uses: amannn/action-semantic-pull-request@v5 diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index f48360b4c0..59a7cfa8c8 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -18,7 +18,7 @@ jobs: permissions: contents: write pull-requests: write - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - uses: release-drafter/release-drafter@v6 env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62e967add7..bd3654e7e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: deploy: name: Deploy App - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest concurrency: group: deploy-job cancel-in-progress: true diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index dc34929602..7e5708b558 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -19,7 +19,7 @@ on: jobs: check_spelling: name: Check spelling - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 07545a170c..22ea7987b7 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -14,7 +14,7 @@ env: jobs: stale: - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: ubuntu-latest steps: - uses: actions/stale@v9 with: diff --git a/.github/workflows/test-jit.yml b/.github/workflows/test-jit.yml deleted file mode 100644 index 0f6ff6807c..0000000000 --- a/.github/workflows/test-jit.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Test JIT - -on: - push: - branches: - - main - pull_request: - types: [opened, reopened, synchronize, labeled] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - setup_build_matrix: - name: Outputs matrix used for cross compilation - uses: ./.github/workflows/build_matrix.yml - - test: - name: Run JIT tests on ${{ matrix.build }} - runs-on: ${{ matrix.os || '-latest' }} - needs: setup_build_matrix - if: "${{ contains(github.event.pull_request.labels.*.name, 'ci: test-jit') || github.event_name == 'push' }}" - strategy: - fail-fast: false - matrix: - build: - - darwin-arm64 - include: - - build: darwin-arm64 - os: macos-latest - rust: stable - target: aarch64-apple-darwin - - steps: - - uses: actions/checkout@v4 - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: "20.11.0" - - name: Install Prettier - run: npm i -g prettier - - - name: Install Rust Toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install Cross compilation toolchain - uses: taiki-e/setup-cross-toolchain-action@v1 - with: - target: ${{ matrix.target }} - - - name: Run Cargo Test - run: cargo test --test execution_spec --features force_jit -- --logfile execution_spec_output.txt - env: - RUST_BACKTRACE: 0 - - - name: Show Test Output - if: ${{ always() }} - run: cat execution_spec_output.txt - - - name: Create Commit Comment - if: ${{ failure() }} - uses: peter-evans/commit-comment@v3 - with: - body-path: execution_spec_output.txt diff --git a/Cargo.lock b/Cargo.lock index 0899584676..a810f8e361 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4372,7 +4372,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.90", @@ -5427,8 +5427,9 @@ dependencies = [ [[package]] name = "serde_json_borrow" -version = "0.7.0" -source = "git+https://github.com/PSeitz/serde_json_borrow?rev=6ad7127e0fb9c31f6fd927e934a21112e9ac0fdb#6ad7127e0fb9c31f6fd927e934a21112e9ac0fdb" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "724685c39b301aa2cf7de617fed340d6529694a72fc0f5cc3b1846423e71c630" dependencies = [ "serde", "serde_json", @@ -7202,7 +7203,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 87d90b6684..90e6114793 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -164,8 +164,7 @@ tailcall-typedefs-common = { path = "./tailcall-typedefs-common" } tonic-types = "0.12.1" base64 = "0.22.1" tailcall-hasher = { path = "tailcall-hasher" } -# TODO: drop git ref when new version is released -serde_json_borrow = { version = "0.7.0", default-features = false, git = "https://github.com/PSeitz/serde_json_borrow", rev = "6ad7127e0fb9c31f6fd927e934a21112e9ac0fdb" } +serde_json_borrow = { version = "0.7.1", default-features = false } pluralizer = "0.4.0" path-clean = "=1.0.1" pathdiff = "0.2.1" diff --git a/benches/handle_request_bench.rs b/benches/handle_request_bench.rs index f33c52a895..88035b056e 100644 --- a/benches/handle_request_bench.rs +++ b/benches/handle_request_bench.rs @@ -16,13 +16,11 @@ pub fn benchmark_handle_request(c: &mut Criterion) { let sdl = std::fs::read_to_string("./ci-benchmark/benchmark.graphql").unwrap(); let config_module: ConfigModule = Config::from_sdl(sdl.as_str()).to_result().unwrap().into(); - let mut blueprint = Blueprint::try_from(&config_module).unwrap(); - let mut blueprint_clone = blueprint.clone(); + let blueprint = Blueprint::try_from(&config_module).unwrap(); let endpoints = config_module.extensions().endpoint_set.clone(); let endpoints_clone = endpoints.clone(); - blueprint.server.enable_jit = false; let server_config = tokio_runtime .block_on(ServerConfig::new(blueprint.clone(), endpoints.clone())) .unwrap(); @@ -47,9 +45,8 @@ pub fn benchmark_handle_request(c: &mut Criterion) { }) }); - blueprint_clone.server.enable_jit = true; let server_config = tokio_runtime - .block_on(ServerConfig::new(blueprint_clone, endpoints_clone)) + .block_on(ServerConfig::new(blueprint, endpoints_clone)) .unwrap(); let server_config = Arc::new(server_config); diff --git a/examples/jsonplaceholder.yaml b/examples/jsonplaceholder.yaml new file mode 100644 index 0000000000..f1edf73537 --- /dev/null +++ b/examples/jsonplaceholder.yaml @@ -0,0 +1,12 @@ +# yaml-language-server: $schema=../generated/.tailcallrc.schema.json + +server: + port: 8000 + +upstream: + batch: + delay: 100 + httpCache: 42 + +links: + - src: ./jsonplaceholder.graphql diff --git a/generated/.tailcallrc.graphql b/generated/.tailcallrc.graphql index 587bcd53c7..ddc1563d6b 100644 --- a/generated/.tailcallrc.graphql +++ b/generated/.tailcallrc.graphql @@ -247,35 +247,6 @@ directive @js( name: String! ) repeatable on FIELD_DEFINITION | OBJECT -""" -The @link directive allows you to import external resources, such as configuration -– which will be merged into the config importing it –, or a .proto file – which - will be later used by `@grpc` directive –. -""" -directive @link( - """ - Custom headers for gRPC reflection server. - """ - headers: [KeyValue] - """ - The id of the link. It is used to reference the link in the schema. - """ - id: String - """ - Additional metadata pertaining to the linked resource. - """ - meta: JSON - """ - The source of the link. It can be a URL or a path to a file. If a path is provided, - it is relative to the file that imports the link. - """ - src: String - """ - The type of the link. It can be `Config`, or `Protobuf`. - """ - type: LinkType -) repeatable on SCHEMA - directive @modify( name: String omit: Boolean @@ -303,200 +274,6 @@ directive @protected( id: [String!] ) on OBJECT | FIELD_DEFINITION -""" -The `@server` directive, when applied at the schema level, offers a comprehensive -set of server configurations. It dictates how the server behaves and helps tune tailcall -for various use-cases. -""" -directive @server( - """ - `apolloTracing` exposes GraphQL query performance data, including execution time - of queries and individual resolvers. - """ - apolloTracing: Boolean - """ - `batchRequests` combines multiple requests into one, improving performance but potentially - introducing latency and complicating debugging. Use judiciously. @default `false`. - """ - batchRequests: Boolean - """ - `enableFederation` enables functionality to Tailcall server to act as a federation - subgraph. - """ - enableFederation: Boolean - enableJIT: Boolean - """ - `globalResponseTimeout` sets the maximum query duration before termination, acting - as a safeguard against long-running queries. - """ - globalResponseTimeout: Int - """ - `headers` contains key-value pairs that are included as default headers in server - responses, allowing for consistent header management across all responses. - """ - headers: Headers - """ - `hostname` sets the server hostname. - """ - hostname: String - """ - `introspection` allows clients to fetch schema information directly, aiding tools - and applications in understanding available types, fields, and operations. @default - `true`. - """ - introspection: Boolean - """ - `pipelineFlush` allows to control flushing behavior of the server pipeline. - """ - pipelineFlush: Boolean - """ - `port` sets the Tailcall running port. @default `8000`. - """ - port: Int - """ - `queryValidation` checks incoming GraphQL queries against the schema, preventing - errors from invalid queries. Can be disabled for performance. @default `false`. - """ - queryValidation: Boolean - """ - `responseValidation` Tailcall automatically validates responses from upstream services - using inferred schema. @default `false`. - """ - responseValidation: Boolean - """ - `routes` allows customization of server endpoint paths. It provides options to change - the default paths for status and GraphQL endpoints. Default values are: - status: - "/status" - graphQL: "/graphql" If not specified, these default values will be used. - """ - routes: Routes - """ - A link to an external JS file that listens on every HTTP request response event. - """ - script: ScriptOptions - """ - `showcase` enables the /showcase/graphql endpoint. - """ - showcase: Boolean - """ - This configuration defines local variables for server operations. Useful for storing - constant configurations, secrets, or shared information. - """ - vars: [KeyValue] - """ - `version` sets the HTTP version for the server. Options are `HTTP1` and `HTTP2`. - @default `HTTP1`. - """ - version: HttpVersion - """ - `workers` sets the number of worker threads. @default the number of system cores. - """ - workers: Int -) on SCHEMA - -""" -The @telemetry directive facilitates seamless integration with OpenTelemetry, enhancing -the observability of your GraphQL services powered by Tailcall. By leveraging this -directive, developers gain access to valuable insights into the performance and behavior -of their applications. -""" -directive @telemetry( - export: TelemetryExporter - """ - The list of headers that will be sent as additional attributes to telemetry exporters - Be careful about **leaking sensitive information** from requests when enabling the - headers that may contain sensitive data - """ - requestHeaders: [String!] -) on SCHEMA - -""" -The `upstream` directive allows you to control various aspects of the upstream server -connection. This includes settings like connection timeouts, keep-alive intervals, -and more. If not specified, default values are used. -""" -directive @upstream( - """ - `allowedHeaders` defines the HTTP headers allowed to be forwarded to upstream services. - If not set, no headers are forwarded, enhancing security but possibly limiting data - flow. - """ - allowedHeaders: [String!] - """ - An object that specifies the batch settings, including `maxSize` (the maximum size - of the batch), `delay` (the delay in milliseconds between each batch), and `headers` - (an array of HTTP headers to be included in the batch). - """ - batch: Batch - """ - The time in seconds that the connection will wait for a response before timing out. - """ - connectTimeout: Int - """ - The `http2Only` setting allows you to specify whether the client should always issue - HTTP2 requests, without checking if the server supports it or not. By default it - is set to `false` for all HTTP requests made by the server, but is automatically - set to true for GRPC. - """ - http2Only: Boolean - """ - Providing httpCache size enables Tailcall's HTTP caching, adhering to the [HTTP Caching - RFC](https://tools.ietf.org/html/rfc7234), to enhance performance by minimizing redundant - data fetches. Defaults to `0` if unspecified. - """ - httpCache: Int - """ - The time in seconds between each keep-alive message sent to maintain the connection. - """ - keepAliveInterval: Int - """ - The time in seconds that the connection will wait for a keep-alive message before - closing. - """ - keepAliveTimeout: Int - """ - A boolean value that determines whether keep-alive messages should be sent while - the connection is idle. - """ - keepAliveWhileIdle: Boolean - """ - onRequest field gives the ability to specify the global request interception handler. - """ - onRequest: String - """ - The time in seconds that the connection pool will wait before closing idle connections. - """ - poolIdleTimeout: Int - """ - The maximum number of idle connections that will be maintained per host. - """ - poolMaxIdlePerHost: Int - """ - The `proxy` setting defines an intermediary server through which the upstream requests - will be routed before reaching their intended endpoint. By specifying a proxy URL, - you introduce an additional layer, enabling custom routing and security policies. - """ - proxy: Proxy - """ - The time in seconds between each TCP keep-alive message sent to maintain the connection. - """ - tcpKeepAlive: Int - """ - The maximum time in seconds that the connection will wait for a response. - """ - timeout: Int - """ - The User-Agent header value to be used in HTTP requests. @default `Tailcall/1.0` - """ - userAgent: String - """ - A boolean value that determines whether to verify certificates. Setting this as `false` - will make tailcall accept self-signed certificates. NOTE: use this *only* during - development or testing. It is highly recommended to keep this enabled (`true`) in - production. - """ - verifySSL: Boolean -) on SCHEMA - """ The `@discriminate` directive is used to drive Tailcall discriminator to use a field of an object to resolve the type. For example with the directive applied on a field @@ -652,156 +429,6 @@ input Schema { Enum: [String!] } -""" -Type to configure Cross-Origin Resource Sharing (CORS) for a server. -""" -input Cors { - """ - Indicates whether the server allows credentials (e.g., cookies, authorization headers) - to be sent in cross-origin requests. - """ - allowCredentials: Boolean - """ - A list of allowed headers in cross-origin requests. This can be used to specify custom - headers that are allowed to be included in cross-origin requests. - """ - allowHeaders: [String!] - """ - A list of allowed HTTP methods in cross-origin requests. These methods specify the - actions that are permitted in cross-origin requests. - """ - allowMethods: [Method] - """ - A list of origins that are allowed to access the server's resources in cross-origin - requests. An origin can be a domain, a subdomain, or even 'null' for local file schemes. - """ - allowOrigins: [String!] - """ - Indicates whether requests from private network addresses are allowed in cross-origin - requests. Private network addresses typically include IP addresses reserved for internal - networks. - """ - allowPrivateNetwork: Boolean - """ - A list of headers that the server exposes to the browser in cross-origin responses. - Exposing certain headers allows the client-side code to access them in the response. - """ - exposeHeaders: [String!] - """ - The maximum time (in seconds) that the client should cache preflight OPTIONS requests - in order to avoid sending excessive requests to the server. - """ - maxAge: Int - """ - A list of header names that indicate the values of which might cause the server's - response to vary, potentially affecting caching. - """ - vary: [String!] -} - -input Headers { - """ - `cacheControl` sends `Cache-Control` headers in responses when activated. The `max-age` - value is the least of the values received from upstream services. @default `false`. - """ - cacheControl: Boolean - """ - `cors` allows Cross-Origin Resource Sharing (CORS) for a server. - """ - cors: Cors - """ - `headers` are key-value pairs included in every server response. Useful for setting - headers like `Access-Control-Allow-Origin` for cross-origin requests or additional - headers for downstream services. - """ - custom: [KeyValue] - """ - `experimental` allows the use of `X-*` experimental headers in the response. @default - `[]`. - """ - experimental: [String!] - """ - `setCookies` when enabled stores `set-cookie` headers and all the response will be - sent with the headers. - """ - setCookies: Boolean -} - -input Routes { - graphQL: String - status: String -} - -input ScriptOptions { - timeout: Int -} - -input Apollo { - """ - Setting `apiKey` for Apollo. - """ - apiKey: String! - """ - Setting `graphRef` for Apollo in the format @. - """ - graphRef: String! - """ - Setting `platform` for Apollo. - """ - platform: String - """ - Setting `userVersion` for Apollo. - """ - userVersion: String - """ - Setting `version` for Apollo. - """ - version: String -} - -""" -Output the opentelemetry data to otlp collector -""" -input OtlpExporter { - headers: [KeyValue] - url: String! -} - -""" -Output the telemetry metrics data to prometheus server -""" -input PrometheusExporter { - format: PrometheusFormat - path: String -} - -""" -Output the opentelemetry data to the stdout. Mostly used for debug purposes -""" -input StdoutExporter { - """ - Output to stdout in pretty human-readable format - """ - pretty: Boolean -} - -input TelemetryExporter { - stdout: StdoutExporter - otlp: OtlpExporter - prometheus: PrometheusExporter - apollo: Apollo -} - -input Batch { - delay: Int - headers: [String!] - maxSize: Int -} - -input Proxy { - url: String! -} - """ The @graphQL operator allows to specify GraphQL API server request to fetch data from. @@ -1016,22 +643,6 @@ input Cache { maxAge: Int! } -""" -The @telemetry directive facilitates seamless integration with OpenTelemetry, enhancing -the observability of your GraphQL services powered by Tailcall. By leveraging this -directive, developers gain access to valuable insights into the performance and behavior -of their applications. -""" -input Telemetry { - export: TelemetryExporter - """ - The list of headers that will be sent as additional attributes to telemetry exporters - Be careful about **leaking sensitive information** from requests when enabling the - headers that may contain sensitive data - """ - requestHeaders: [String!] -} - enum Encoding { ApplicationJson ApplicationXWwwFormUrlencoded @@ -1047,56 +658,4 @@ enum Method { OPTIONS CONNECT TRACE -} - -enum LinkType { - """ - Points to another Tailcall Configuration file. The imported configuration will be merged into the importing configuration. - """ - Config - """ - Points to a Protobuf file. The imported Protobuf file will be used by the `@grpc` directive. If your API exposes a reflection endpoint, you should set the type to `Grpc` instead. - """ - Protobuf - """ - Points to a JS file. The imported JS file will be used by the `@js` directive. - """ - Script - """ - Points to a Cert file. The imported Cert file will be used by the server to serve over HTTPS. - """ - Cert - """ - Points to a Key file. The imported Key file will be used by the server to serve over HTTPS. - """ - Key - """ - A trusted document that contains GraphQL operations (queries, mutations) that can be exposed a REST API using the `@rest` directive. - """ - Operation - """ - Points to a Htpasswd file. The imported Htpasswd file will be used by the server to authenticate users. - """ - Htpasswd - """ - Points to a Jwks file. The imported Jwks file will be used by the server to authenticate users. - """ - Jwks - """ - Points to a reflection endpoint. The imported reflection endpoint will be used by the `@grpc` directive to resolve data from gRPC services. - """ - Grpc -} - -enum HttpVersion { - HTTP1 - HTTP2 -} - -""" -Output format for prometheus data -""" -enum PrometheusFormat { - text - protobuf } \ No newline at end of file diff --git a/generated/.tailcallrc.schema.json b/generated/.tailcallrc.schema.json index e76f874e55..70ca3e9258 100644 --- a/generated/.tailcallrc.schema.json +++ b/generated/.tailcallrc.schema.json @@ -1,8 +1,18 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Config", + "title": "RuntimeConfig", "type": "object", + "required": [ + "links" + ], "properties": { + "links": { + "description": "A list of all links in the schema.", + "type": "array", + "items": { + "$ref": "#/definitions/Link" + } + }, "server": { "description": "Dictates how the server behaves and helps tune tailcall for all ingress requests. Features such as request batching, SSL, HTTP2 etc. can be configured here.", "default": {}, @@ -96,10 +106,6 @@ } } }, - "Bytes": { - "title": "Bytes", - "description": "Field whose value is a sequence of bytes." - }, "Cors": { "description": "Type to configure Cross-Origin Resource Sharing (CORS) for a server.", "type": "object", @@ -169,22 +175,6 @@ } } }, - "Date": { - "title": "Date", - "description": "Field whose value conforms to the standard date format as specified in RFC 3339 (https://datatracker.ietf.org/doc/html/rfc3339)." - }, - "DateTime": { - "title": "DateTime", - "description": "Field whose value conforms to the standard datetime format as specified in RFC 3339 (https://datatracker.ietf.org/doc/html/rfc3339\")." - }, - "Email": { - "title": "Email", - "description": "Field whose value conforms to the standard internet email address format as specified in HTML Spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address." - }, - "Empty": { - "title": "Empty", - "description": "Empty scalar type represents an empty value." - }, "Headers": { "type": "object", "properties": { @@ -240,30 +230,6 @@ "HTTP2" ] }, - "Int128": { - "title": "Int128", - "description": "Field whose value is a 128-bit signed integer." - }, - "Int16": { - "title": "Int16", - "description": "Field whose value is a 16-bit signed integer." - }, - "Int32": { - "title": "Int32", - "description": "Field whose value is a 32-bit signed integer." - }, - "Int64": { - "title": "Int64", - "description": "Field whose value is a 64-bit signed integer." - }, - "Int8": { - "title": "Int8", - "description": "Field whose value is an 8-bit signed integer." - }, - "JSON": { - "title": "JSON", - "description": "Field whose value conforms to the standard JSON format as specified in RFC 8259 (https://datatracker.ietf.org/doc/html/rfc8259)." - }, "KeyValue": { "type": "object", "required": [ @@ -279,6 +245,122 @@ } } }, + "Link": { + "description": "The @link directive allows you to import external resources, such as configuration – which will be merged into the config importing it –, or a .proto file – which will be later used by `@grpc` directive –.", + "type": "object", + "properties": { + "headers": { + "description": "Custom headers for gRPC reflection server.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/KeyValue" + } + }, + "id": { + "description": "The id of the link. It is used to reference the link in the schema.", + "type": [ + "string", + "null" + ] + }, + "meta": { + "description": "Additional metadata pertaining to the linked resource." + }, + "proto_paths": { + "description": "The proto paths to be used when resolving dependencies. Only valid when [`Link::type_of`] is [`LinkType::Protobuf`]", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "src": { + "description": "The source of the link. It can be a URL or a path to a file. If a path is provided, it is relative to the file that imports the link.", + "type": "string" + }, + "type": { + "description": "The type of the link. It can be `Config`, or `Protobuf`.", + "allOf": [ + { + "$ref": "#/definitions/LinkType" + } + ] + } + }, + "additionalProperties": false + }, + "LinkType": { + "oneOf": [ + { + "description": "Points to another Tailcall Configuration file. The imported configuration will be merged into the importing configuration.", + "type": "string", + "enum": [ + "Config" + ] + }, + { + "description": "Points to a Protobuf file. The imported Protobuf file will be used by the `@grpc` directive. If your API exposes a reflection endpoint, you should set the type to `Grpc` instead.", + "type": "string", + "enum": [ + "Protobuf" + ] + }, + { + "description": "Points to a JS file. The imported JS file will be used by the `@js` directive.", + "type": "string", + "enum": [ + "Script" + ] + }, + { + "description": "Points to a Cert file. The imported Cert file will be used by the server to serve over HTTPS.", + "type": "string", + "enum": [ + "Cert" + ] + }, + { + "description": "Points to a Key file. The imported Key file will be used by the server to serve over HTTPS.", + "type": "string", + "enum": [ + "Key" + ] + }, + { + "description": "A trusted document that contains GraphQL operations (queries, mutations) that can be exposed a REST API using the `@rest` directive.", + "type": "string", + "enum": [ + "Operation" + ] + }, + { + "description": "Points to a Htpasswd file. The imported Htpasswd file will be used by the server to authenticate users.", + "type": "string", + "enum": [ + "Htpasswd" + ] + }, + { + "description": "Points to a Jwks file. The imported Jwks file will be used by the server to authenticate users.", + "type": "string", + "enum": [ + "Jwks" + ] + }, + { + "description": "Points to a reflection endpoint. The imported reflection endpoint will be used by the `@grpc` directive to resolve data from gRPC services.", + "type": "string", + "enum": [ + "Grpc" + ] + } + ] + }, "Method": { "type": "string", "enum": [ @@ -311,10 +393,6 @@ } } }, - "PhoneNumber": { - "title": "PhoneNumber", - "description": "Field whose value conforms to the standard E.164 format as specified in E.164 specification (https://en.wikipedia.org/wiki/E.164)." - }, "PrometheusExporter": { "description": "Output the telemetry metrics data to prometheus server", "type": "object", @@ -398,12 +476,6 @@ "null" ] }, - "enableJIT": { - "type": [ - "boolean", - "null" - ] - }, "globalResponseTimeout": { "description": "`globalResponseTimeout` sets the maximum query duration before termination, acting as a safeguard against long-running queries.", "type": [ @@ -612,26 +684,6 @@ } ] }, - "UInt128": { - "title": "UInt128", - "description": "Field whose value is a 128-bit unsigned integer." - }, - "UInt16": { - "title": "UInt16", - "description": "Field whose value is a 16-bit unsigned integer." - }, - "UInt32": { - "title": "UInt32", - "description": "Field whose value is a 32-bit unsigned integer." - }, - "UInt64": { - "title": "UInt64", - "description": "Field whose value is a 64-bit unsigned integer." - }, - "UInt8": { - "title": "UInt8", - "description": "Field whose value is an 8-bit unsigned integer." - }, "Upstream": { "description": "The `upstream` directive allows you to control various aspects of the upstream server connection. This includes settings like connection timeouts, keep-alive intervals, and more. If not specified, default values are used.", "type": "object", @@ -778,10 +830,6 @@ } }, "additionalProperties": false - }, - "Url": { - "title": "Url", - "description": "Field whose value conforms to the standard URL format as specified in RFC 3986 (https://datatracker.ietf.org/doc/html/rfc3986)." } } } \ No newline at end of file diff --git a/src/cli/generator/snapshots/tailcall__cli__generator__config__tests__config_codec.snap b/src/cli/generator/snapshots/tailcall__cli__generator__config__tests__config_codec.snap index 4655a9035b..6f2d414ada 100644 --- a/src/cli/generator/snapshots/tailcall__cli__generator__config__tests__config_codec.snap +++ b/src/cli/generator/snapshots/tailcall__cli__generator__config__tests__config_codec.snap @@ -1,6 +1,7 @@ --- source: src/cli/generator/config.rs expression: actual +snapshot_kind: text --- { "inputs": [ diff --git a/src/cli/generator/source.rs b/src/cli/generator/source.rs index 1050dc4d34..caa87eb14a 100644 --- a/src/cli/generator/source.rs +++ b/src/cli/generator/source.rs @@ -1,4 +1,5 @@ -use thiserror::Error; +use crate::core::config; +use crate::core::config::SourceError; #[derive(Clone, Copy, PartialEq, Debug)] pub enum ConfigSource { @@ -6,29 +7,25 @@ pub enum ConfigSource { Yml, } -impl ConfigSource { - fn ext(&self) -> &str { - match self { - Self::Json => "json", - Self::Yml => "yml", - } - } +impl TryFrom for ConfigSource { + type Error = SourceError; - fn ends_with(&self, file: &str) -> bool { - file.ends_with(&format!(".{}", self.ext())) + fn try_from(value: config::Source) -> Result { + match value { + config::Source::Json => Ok(Self::Json), + config::Source::Yml => Ok(Self::Yml), + config::Source::GraphQL => { + Err(SourceError::UnsupportedFileFormat(value.ext().to_string())) + } + } } +} +impl ConfigSource { /// Detect the config format from the file name - pub fn detect(name: &str) -> Result { - const ALL: &[ConfigSource] = &[ConfigSource::Json, ConfigSource::Yml]; + pub fn detect(name: &str) -> Result { + let source = config::Source::detect(name)?; - ALL.iter() - .find(|format| format.ends_with(name)) - .copied() - .ok_or(UnsupportedFileFormat(name.to_string())) + ConfigSource::try_from(source) } } - -#[derive(Debug, Error, PartialEq)] -#[error("Unsupported config extension: {0}")] -pub struct UnsupportedFileFormat(String); diff --git a/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__chat_response_parse.snap b/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__chat_response_parse.snap index b8f2c25958..5b1922c9bb 100644 --- a/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__chat_response_parse.snap +++ b/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__chat_response_parse.snap @@ -1,6 +1,7 @@ --- source: src/cli/llm/infer_type_name.rs expression: answer +snapshot_kind: text --- Answer { suggestions: [ diff --git a/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__to_chat_request_conversion.snap b/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__to_chat_request_conversion.snap index d50032444d..545200c8ae 100644 --- a/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__to_chat_request_conversion.snap +++ b/src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__to_chat_request_conversion.snap @@ -1,6 +1,7 @@ --- source: src/cli/llm/infer_type_name.rs expression: request +snapshot_kind: text --- ChatRequest { system: None, diff --git a/src/cli/tc/init.rs b/src/cli/tc/init.rs index abbacf9e03..b7ef91a606 100644 --- a/src/cli/tc/init.rs +++ b/src/cli/tc/init.rs @@ -1,21 +1,25 @@ use std::collections::BTreeMap; use std::path::Path; -use anyhow::Result; +use anyhow::{anyhow, Result}; use super::helpers::{GRAPHQL_RC, TAILCALL_RC, TAILCALL_RC_SCHEMA}; use crate::cli::runtime::{confirm_and_write, create_directory, select_prompt}; -use crate::core::config::{Config, Expr, Field, Resolver, RootSchema, Source}; +use crate::core::config::{ + Config, Expr, Field, Link, LinkType, Resolver, RootSchema, RuntimeConfig, Source, +}; use crate::core::merge_right::MergeRight; use crate::core::runtime::TargetRuntime; use crate::core::{config, Type}; +const SCHEMA_FILENAME: &str = "main.graphql"; + pub(super) async fn init_command(runtime: TargetRuntime, folder_path: &str) -> Result<()> { create_directory(folder_path).await?; let selection = select_prompt( "Please select the format in which you want to generate the config.", - vec![Source::GraphQL, Source::Json, Source::Yml], + vec![Source::Json, Source::Yml], )?; let tailcallrc = include_str!("../../../generated/.tailcallrc.graphql"); @@ -25,30 +29,24 @@ pub(super) async fn init_command(runtime: TargetRuntime, folder_path: &str) -> R let tailcall_rc_schema = Path::new(folder_path).join(TAILCALL_RC_SCHEMA); let graphql_rc = Path::new(folder_path).join(GRAPHQL_RC); - match selection { - Source::GraphQL => { - // .tailcallrc.graphql - confirm_and_write( - runtime.clone(), - &tailcall_rc.display().to_string(), - tailcallrc.as_bytes(), - ) - .await?; - - // .graphqlrc.yml - confirm_and_write_yml(runtime.clone(), &graphql_rc).await?; - } - - Source::Json | Source::Yml => { - // .tailcallrc.schema.json - confirm_and_write( - runtime.clone(), - &tailcall_rc_schema.display().to_string(), - tailcallrc_json.as_bytes(), - ) - .await?; - } - } + // .tailcallrc.graphql + confirm_and_write( + runtime.clone(), + &tailcall_rc.display().to_string(), + tailcallrc.as_bytes(), + ) + .await?; + + // .graphqlrc.yml + confirm_and_write_yml(runtime.clone(), &graphql_rc).await?; + + // .tailcallrc.schema.json + confirm_and_write( + runtime.clone(), + &tailcall_rc_schema.display().to_string(), + tailcallrc_json.as_bytes(), + ) + .await?; create_main(runtime.clone(), folder_path, selection).await?; @@ -97,33 +95,60 @@ fn main_config() -> Config { }; Config { - server: Default::default(), - upstream: Default::default(), schema: RootSchema { query: Some("Query".to_string()), ..Default::default() }, types: BTreeMap::from([("Query".into(), query_type)]), ..Default::default() } } +fn runtime_config() -> RuntimeConfig { + let config = RuntimeConfig::default(); + + config.links(vec![Link { + id: Some("main".to_string()), + src: SCHEMA_FILENAME.to_string(), + type_of: LinkType::Config, + ..Default::default() + }]) +} + async fn create_main( runtime: TargetRuntime, folder_path: impl AsRef, source: Source, ) -> Result<()> { let config = main_config(); - - let content = match source { - Source::GraphQL => config.to_sdl(), - Source::Json => config.to_json(true)?, - Source::Yml => config.to_yaml()?, + let runtime_config = runtime_config(); + + let runtime_config = match source { + Source::Json => runtime_config.to_json(true)?, + Source::Yml => runtime_config.to_yaml()?, + _ => { + return Err(anyhow!( + "Only json/yaml formats are supported for json configs" + )) + } }; - let path = folder_path + let schema = config.to_sdl(); + + let runtime_config_path = folder_path .as_ref() .join(format!("main.{}", source.ext())) .display() .to_string(); + let schema_path = folder_path + .as_ref() + .join(SCHEMA_FILENAME) + .display() + .to_string(); - confirm_and_write(runtime.clone(), &path, content.as_bytes()).await?; + confirm_and_write( + runtime.clone(), + &runtime_config_path, + runtime_config.as_bytes(), + ) + .await?; + confirm_and_write(runtime.clone(), &schema_path, schema.as_bytes()).await?; Ok(()) } diff --git a/src/core/blueprint/server.rs b/src/core/blueprint/server.rs index 75d5b3e186..e856154dbc 100644 --- a/src/core/blueprint/server.rs +++ b/src/core/blueprint/server.rs @@ -14,7 +14,6 @@ use crate::core::config::{self, ConfigModule, HttpVersion, PrivateKey, Routes}; #[derive(Clone, Debug, Setters)] pub struct Server { - pub enable_jit: bool, pub enable_apollo_tracing: bool, pub enable_cache_control_header: bool, pub enable_set_cookie_header: bool, @@ -124,7 +123,6 @@ impl TryFrom for Server { )) .map( |(hostname, http, response_headers, script, experimental_headers, cors)| Server { - enable_jit: (config_server).enable_jit(), enable_apollo_tracing: (config_server).enable_apollo_tracing(), enable_cache_control_header: (config_server).enable_cache_control(), enable_set_cookie_header: (config_server).enable_set_cookies(), diff --git a/src/core/blueprint/snapshots/tailcall__core__blueprint__index__test__from_blueprint.snap b/src/core/blueprint/snapshots/tailcall__core__blueprint__index__test__from_blueprint.snap index 7336ccd0cf..4736a29c54 100644 --- a/src/core/blueprint/snapshots/tailcall__core__blueprint__index__test__from_blueprint.snap +++ b/src/core/blueprint/snapshots/tailcall__core__blueprint__index__test__from_blueprint.snap @@ -1,6 +1,7 @@ --- source: src/core/blueprint/index.rs expression: index +snapshot_kind: text --- Index { map: { diff --git a/src/core/config/config.rs b/src/core/config/config.rs index a58715bec1..759ee0a9aa 100644 --- a/src/core/config/config.rs +++ b/src/core/config/config.rs @@ -38,8 +38,7 @@ use crate::core::scalar::Scalar; schemars::JsonSchema, MergeRight, )] -#[serde(rename_all = "camelCase")] -pub struct Config { +pub struct RuntimeConfig { /// /// Dictates how the server behaves and helps tune tailcall for all ingress /// requests. Features such as request batching, SSL, HTTP2 etc. can be @@ -53,35 +52,51 @@ pub struct Config { #[serde(default)] pub upstream: Upstream, + /// + /// A list of all links in the schema. + pub links: Vec, + + /// Enable [opentelemetry](https://opentelemetry.io) support + #[serde(default, skip_serializing_if = "is_default")] + pub telemetry: Telemetry, +} + +#[derive(Clone, Debug, Default, Setters, PartialEq, Eq, MergeRight)] +pub struct Config { + /// + /// Dictates how the server behaves and helps tune tailcall for all ingress + /// requests. Features such as request batching, SSL, HTTP2 etc. can be + /// configured here. + pub server: Server, + + /// + /// Dictates how tailcall should handle upstream requests/responses. + /// Tuning upstream can improve performance and reliability for connections. + pub upstream: Upstream, + /// /// Specifies the entry points for query and mutation in the generated /// GraphQL schema. - #[serde(skip)] pub schema: RootSchema, /// /// A map of all the types in the schema. - #[serde(skip)] #[setters(skip)] pub types: BTreeMap, /// /// A map of all the union types in the schema. - #[serde(skip)] pub unions: BTreeMap, /// /// A map of all the enum types in the schema - #[serde(skip)] pub enums: BTreeMap, /// /// A list of all links in the schema. - #[serde(skip)] pub links: Vec, /// Enable [opentelemetry](https://opentelemetry.io) support - #[serde(default, skip_serializing_if = "is_default")] pub telemetry: Telemetry, } @@ -305,7 +320,47 @@ impl Display for GraphQLOperationType { } } +impl RuntimeConfig { + pub fn from_json(json: &str) -> Result { + Ok(serde_json::from_str(json)?) + } + + pub fn from_yaml(yaml: &str) -> Result { + Ok(serde_yaml_ng::from_str(yaml)?) + } + + pub fn from_source(source: Source, config: &str) -> Result { + match source { + Source::Json => RuntimeConfig::from_json(config), + Source::Yml => RuntimeConfig::from_yaml(config), + _ => Err(anyhow!("Only the json/yaml runtime configs are supported")), + } + } + + pub fn to_yaml(&self) -> Result { + Ok(serde_yaml_ng::to_string(self)?) + } + + pub fn to_json(&self, pretty: bool) -> Result { + if pretty { + Ok(serde_json::to_string_pretty(self)?) + } else { + Ok(serde_json::to_string(self)?) + } + } +} + impl Config { + pub fn with_runtime_config(self, runtime_config: RuntimeConfig) -> Self { + Self { + server: runtime_config.server, + upstream: runtime_config.upstream, + links: runtime_config.links, + telemetry: runtime_config.telemetry, + ..self + } + } + pub fn is_root_operation_type(&self, type_name: &str) -> bool { let type_name = type_name.to_lowercase(); @@ -335,18 +390,6 @@ impl Config { self.enums.get(name) } - pub fn to_yaml(&self) -> Result { - Ok(serde_yaml_ng::to_string(self)?) - } - - pub fn to_json(&self, pretty: bool) -> Result { - if pretty { - Ok(serde_json::to_string_pretty(self)?) - } else { - Ok(serde_json::to_string(self)?) - } - } - /// Renders current config to graphQL string pub fn to_sdl(&self) -> String { crate::core::document::print(self.into()) @@ -372,14 +415,6 @@ impl Config { || self.enums.contains_key(name) } - pub fn from_json(json: &str) -> Result { - Ok(serde_json::from_str(json)?) - } - - pub fn from_yaml(yaml: &str) -> Result { - Ok(serde_yaml_ng::from_str(yaml)?) - } - pub fn from_sdl(sdl: &str) -> Valid { let doc = async_graphql::parser::parse_schema(sdl); match doc { @@ -388,10 +423,10 @@ impl Config { } } - pub fn from_source(source: Source, schema: &str) -> Result { + pub fn from_source(source: Source, content: &str) -> Result { match source { - Source::GraphQL => Ok(Config::from_sdl(schema).to_result()?), - _ => Err(anyhow!("Only the graphql config is currently supported")), + Source::GraphQL => Ok(Config::from_sdl(content).to_result()?), + source => Ok(Config::from(RuntimeConfig::from_source(source, content)?)), } } @@ -607,13 +642,9 @@ impl Config { .add_directive(Grpc::directive_definition(generated_types)) .add_directive(Http::directive_definition(generated_types)) .add_directive(JS::directive_definition(generated_types)) - .add_directive(Link::directive_definition(generated_types)) .add_directive(Modify::directive_definition(generated_types)) .add_directive(Omit::directive_definition(generated_types)) .add_directive(Protected::directive_definition(generated_types)) - .add_directive(Server::directive_definition(generated_types)) - .add_directive(Telemetry::directive_definition(generated_types)) - .add_directive(Upstream::directive_definition(generated_types)) .add_directive(Discriminate::directive_definition(generated_types)) .add_input(GraphQL::input_definition()) .add_input(Grpc::input_definition()) @@ -621,8 +652,7 @@ impl Config { .add_input(Expr::input_definition()) .add_input(JS::input_definition()) .add_input(Modify::input_definition()) - .add_input(Cache::input_definition()) - .add_input(Telemetry::input_definition()); + .add_input(Cache::input_definition()); for scalar in Scalar::iter() { builder = builder.add_scalar(scalar.scalar_definition()); @@ -632,6 +662,18 @@ impl Config { } } +impl From for Config { + fn from(config: RuntimeConfig) -> Self { + Self { + server: config.server, + upstream: config.upstream, + links: config.links, + telemetry: config.telemetry, + ..Default::default() + } + } +} + #[derive( Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash, Default, schemars::JsonSchema, )] diff --git a/src/core/config/config_module/fixtures/router.graphql b/src/core/config/config_module/fixtures/router.graphql index 5288226c3d..39ac02e37a 100644 --- a/src/core/config/config_module/fixtures/router.graphql +++ b/src/core/config/config_module/fixtures/router.graphql @@ -1,4 +1,4 @@ -schema { +schema @server(port: 8000) @upstream(httpCache: 42, batch: {delay: 100}) { # @link(src: "http://localhost:4000", type: SubGraph, meta: {name: "Users"}) # @link(src: "http://localhost:5000", type: SubGraph, meta: {name: "Posts"}) query: Query diff --git a/src/core/config/config_module/fixtures/subgraph-posts.graphql b/src/core/config/config_module/fixtures/subgraph-posts.graphql index ab6ff45aaf..615da04552 100644 --- a/src/core/config/config_module/fixtures/subgraph-posts.graphql +++ b/src/core/config/config_module/fixtures/subgraph-posts.graphql @@ -1,4 +1,4 @@ -schema @server(port: 8000) @upstream(httpCache: 42, batch: {delay: 100}) { +schema { query: Query } diff --git a/src/core/config/config_module/fixtures/subgraph-users.graphql b/src/core/config/config_module/fixtures/subgraph-users.graphql index 22f0e6b63a..a1ff68280a 100644 --- a/src/core/config/config_module/fixtures/subgraph-users.graphql +++ b/src/core/config/config_module/fixtures/subgraph-users.graphql @@ -1,4 +1,4 @@ -schema @server(port: 8000) @upstream(httpCache: 42, batch: {delay: 100}) { +schema { query: Query } diff --git a/src/core/config/config_module/merge.rs b/src/core/config/config_module/merge.rs index 5fc7fff0d7..6d0e3e1a12 100644 --- a/src/core/config/config_module/merge.rs +++ b/src/core/config/config_module/merge.rs @@ -4,10 +4,10 @@ use indexmap::IndexMap; use tailcall_valid::{Valid, Validator}; use super::{Cache, ConfigModule}; -use crate::core; -use crate::core::config::{Arg, Config, Enum, Field, Type}; +use crate::core::config::{Arg, Config, Enum, Field, RootSchema, Type}; use crate::core::merge_right::MergeRight; use crate::core::variance::{Contravariant, Covariant, Invariant}; +use crate::core::{self}; impl core::Type { fn merge(self, other: Self, non_null_merge: fn(bool, bool) -> bool) -> Valid { @@ -183,6 +183,24 @@ impl Covariant for Enum { } } +impl Invariant for RootSchema { + fn unify(self, other: Self) -> Valid { + fn unify_option(left: Option, right: Option) -> Option { + match (left, right) { + (None, None) => None, + (None, Some(that)) => Some(that), + (Some(this), _) => Some(this), + } + } + + Valid::succeed(Self { + query: unify_option(self.query, other.query), + mutation: unify_option(self.mutation, other.mutation), + subscription: unify_option(self.subscription, other.subscription), + }) + } +} + impl Invariant for Cache { fn unify(self, other: Self) -> Valid { let mut types = self.config.types; @@ -270,12 +288,18 @@ impl Invariant for Cache { .map(|en| (name, en)) .trace(&trace_name) })) - .map( |(merged_types, merged_enums)| { + .fuse(self.config.schema.unify(other.config.schema)) + .map( |(merged_types, merged_enums, schema)| { types.extend(merged_types); enums.extend(merged_enums); let config = Config { - types, enums, unions: self.config.unions.merge_right(other.config.unions), server: self.config.server.merge_right(other.config.server), upstream: self.config.upstream.merge_right(other.config.upstream), schema: self.config.schema.merge_right(other.config.schema), links: self.config.links.merge_right(other.config.links), telemetry: self.config.telemetry.merge_right(other.config.telemetry) }; + types, + enums, + unions: self.config.unions.merge_right(other.config.unions), + schema, + ..self.config + }; Cache { config, diff --git a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_invalid.snap b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_invalid.snap index 8ecb8fa6c5..9a5d313ab4 100644 --- a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_invalid.snap +++ b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_invalid.snap @@ -1,6 +1,7 @@ --- source: src/core/config/config_module/merge.rs expression: merged.unwrap_err() +snapshot_kind: text --- Validation Error • Enum is used as input type in one subgraph and output type in another [enumOutput] diff --git a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_valid.snap b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_valid.snap index 956dea8fed..2af8874363 100644 --- a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_valid.snap +++ b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_valid.snap @@ -1,6 +1,7 @@ --- source: src/core/config/config_module/merge.rs expression: merged.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_invalid.snap b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_invalid.snap index 565380877c..bd68f45bd6 100644 --- a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_invalid.snap +++ b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_invalid.snap @@ -1,6 +1,7 @@ --- source: src/core/config/config_module/merge.rs expression: merged.unwrap_err() +snapshot_kind: text --- Validation Error • Type mismatch: expected `String`, got `Int` [A, a] diff --git a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_valid.snap b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_valid.snap index 68cc9dfe6f..407c2c5a87 100644 --- a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_valid.snap +++ b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_valid.snap @@ -1,6 +1,7 @@ --- source: src/core/config/config_module/merge.rs expression: merged.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__unions_valid.snap b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__unions_valid.snap index 78906a4f64..d23cb5cf39 100644 --- a/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__unions_valid.snap +++ b/src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__unions_valid.snap @@ -1,6 +1,7 @@ --- source: src/core/config/config_module/merge.rs expression: merged.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/directives/link.rs b/src/core/config/directives/link.rs index 5063812a2f..e045caf98c 100644 --- a/src/core/config/directives/link.rs +++ b/src/core/config/directives/link.rs @@ -93,4 +93,9 @@ pub struct Link { /// Additional metadata pertaining to the linked resource. #[serde(default, skip_serializing_if = "is_default")] pub meta: Option, + /// + /// The proto paths to be used when resolving dependencies. + /// Only valid when [`Link::type_of`] is [`LinkType::Protobuf`] + #[serde(default, skip_serializing_if = "is_default")] + pub proto_paths: Option>, } diff --git a/src/core/config/directives/server.rs b/src/core/config/directives/server.rs index ec006e2023..b9e1897769 100644 --- a/src/core/config/directives/server.rs +++ b/src/core/config/directives/server.rs @@ -29,10 +29,9 @@ use crate::core::macros::MergeRight; /// comprehensive set of server configurations. It dictates how the server /// behaves and helps tune tailcall for various use-cases. pub struct Server { - // The `enableJIT` option activates Just-In-Time (JIT) compilation. When set to true, it - // optimizes execution of each incoming request independently, resulting in significantly - // better performance in most cases, it's enabled by default. - #[serde(default, skip_serializing_if = "is_default", rename = "enableJIT")] + #[deprecated(note = "No longer used, TODO: drop it")] + #[serde(default, skip_serializing, rename = "enableJIT")] + #[schemars(skip)] pub enable_jit: Option, #[serde(default, skip_serializing_if = "is_default")] @@ -262,10 +261,6 @@ impl Server { self.pipeline_flush.unwrap_or(true) } - pub fn enable_jit(&self) -> bool { - self.enable_jit.unwrap_or(true) - } - pub fn get_routes(&self) -> Routes { self.routes.clone().unwrap_or_default() } diff --git a/src/core/config/from_document.rs b/src/core/config/from_document.rs index b05757900f..20096936a4 100644 --- a/src/core/config/from_document.rs +++ b/src/core/config/from_document.rs @@ -12,7 +12,7 @@ use indexmap::IndexMap; use tailcall_valid::{Valid, ValidationError, Validator}; use super::directive::{to_directive, Directive}; -use super::{Alias, Discriminate, Resolver, Telemetry, FEDERATION_DIRECTIVES}; +use super::{Alias, Discriminate, Resolver, RuntimeConfig, Telemetry, FEDERATION_DIRECTIVES}; use crate::core::config::{ self, Cache, Config, Enum, Link, Modify, Omit, Protected, RootSchema, Server, Union, Upstream, Variant, @@ -51,15 +51,11 @@ pub fn from_document(doc: ServiceDocument) -> Valid { .fuse(links(sd)) .fuse(telemetry(sd)) .map( - |(server, upstream, types, unions, enums, schema, links, telemetry)| Config { - server, - upstream, - types, - unions, - enums, - schema, - links, - telemetry, + |(server, upstream, types, unions, enums, schema, links, telemetry)| { + let runtime_config = RuntimeConfig { server, upstream, links, telemetry }; + let config = Config { types, unions, enums, schema, ..Default::default() }; + + config.with_runtime_config(runtime_config) }, ) }) diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__batched_resolvers.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__batched_resolvers.snap index c096c4fb6c..2ad91b5fa9 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__batched_resolvers.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__batched_resolvers.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles.snap index c096c4fb6c..2ad91b5fa9 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles_with_resolver.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles_with_resolver.snap index 48be08ce76..b5c166ace6 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles_with_resolver.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles_with_resolver.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- query { f1 { f1 { f2 } } } diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles_with_resolvers.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles_with_resolvers.snap index 9829be427a..5bb9b02825 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles_with_resolvers.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__cycles_with_resolvers.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- query { f1 { f2 } } diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__multiple_type_usage.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__multiple_type_usage.snap index 8cbff01fc8..018abba7ae 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__multiple_type_usage.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__multiple_type_usage.snap @@ -1,6 +1,7 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- query { t2 { t2 { n } } } query { t2_ls { t2 } } diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_config.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_config.snap index 0722c0f3ee..6c607171f5 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_config.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_config.snap @@ -1,6 +1,7 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- query { bar { spam } } query { buzz { spam } } diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_non_list.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_non_list.snap index c096c4fb6c..2ad91b5fa9 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_non_list.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_non_list.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers.snap index 86da63d7f4..14183ebe86 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- query { f1 { f2 { f3 { f4 } } } } diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers_non_list_resolvers.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers_non_list_resolvers.snap index 86da63d7f4..14183ebe86 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers_non_list_resolvers.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers_non_list_resolvers.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- query { f1 { f2 { f3 { f4 } } } } diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers_without_resolvers.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers_without_resolvers.snap index c096c4fb6c..2ad91b5fa9 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers_without_resolvers.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__nested_resolvers_without_resolvers.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- diff --git a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__resolvers.snap b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__resolvers.snap index 9829be427a..5bb9b02825 100644 --- a/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__resolvers.snap +++ b/src/core/config/npo/snapshots/tailcall__core__config__npo__tracker__tests__resolvers.snap @@ -1,5 +1,6 @@ --- source: src/core/config/npo/tracker.rs expression: actual +snapshot_kind: text --- query { f1 { f2 } } diff --git a/src/core/config/reader.rs b/src/core/config/reader.rs index 175291e865..5240e658e8 100644 --- a/src/core/config/reader.rs +++ b/src/core/config/reader.rs @@ -1,10 +1,11 @@ use std::path::Path; +use futures_util::future::join_all; use rustls_pemfile; use rustls_pki_types::{ CertificateDer, PrivateKeyDer, PrivatePkcs1KeyDer, PrivatePkcs8KeyDer, PrivateSec1KeyDer, }; -use tailcall_valid::{Valid, Validator}; +use tailcall_valid::{Valid, ValidationError, Validator}; use url::Url; use super::{ConfigModule, Content, Link, LinkType, PrivateKey}; @@ -34,11 +35,10 @@ impl ConfigReader { } /// Reads the links in a Config and fill the content - #[async_recursion::async_recursion] async fn ext_links( &self, config_module: ConfigModule, - parent_dir: Option<&'async_recursion Path>, + parent_dir: Option<&Path>, ) -> anyhow::Result { let reader_ctx = ConfigReaderContext::new(&self.runtime); @@ -77,17 +77,15 @@ impl ConfigReader { config_module = config_module.and_then(|config_module| { config_module.unify(ConfigModule::from(config.clone())) }); - - if !config.links.is_empty() { - let cfg_module = self - .ext_links(ConfigModule::from(config), Path::new(&link.src).parent()) - .await?; - config_module = - config_module.and_then(|config_module| config_module.unify(cfg_module)); - } } LinkType::Protobuf => { - let meta = self.proto_reader.read(path, None).await?; + let proto_paths = link.proto_paths.as_ref().map(|paths| { + paths + .iter() + .map(|p| Self::resolve_path(p, parent_dir)) + .collect::>() + }); + let meta = self.proto_reader.read(path, proto_paths.as_deref()).await?; extensions.add_proto(meta); } LinkType::Script => { @@ -200,24 +198,32 @@ impl ConfigReader { .map(|file| file.render(&reader_ctx)) .collect::>(); - let mut config_module = Valid::succeed(ConfigModule::default()); - - for file in files.iter() { + let mut config_modules = join_all(files.iter().map(|file| async { let source = Source::detect(&file.path)?; let schema = &file.content; // Create initial config module - let new_config_module = self - .resolve( - Config::from_source(source, schema)?, - Path::new(&file.path).parent(), - ) - .await?; - - // Merge it with the original config set - config_module = - config_module.and_then(|config_module| config_module.unify(new_config_module)); - } + self.resolve( + Config::from_source(source, schema)?, + Path::new(&file.path).parent(), + ) + .await + })) + .await + .into_iter(); + + let config_module = Valid::from( + config_modules + .next() + .ok_or(anyhow::anyhow!("At least one config should be defined"))? + .map_err(to_validation_error), + ); + + let config_module = config_modules.fold(config_module, |acc, other| { + acc.and_then(|cfg| { + Valid::from(other.map_err(to_validation_error)).and_then(|other| cfg.unify(other)) + }) + }); Ok(config_module.to_result()?) } @@ -256,6 +262,13 @@ impl ConfigReader { } } +fn to_validation_error(error: anyhow::Error) -> ValidationError { + match error.downcast::>() { + Ok(err) => err, + Err(err) => ValidationError::new(err.to_string()), + } +} + #[cfg(test)] mod reader_tests { use std::path::{Path, PathBuf}; diff --git a/src/core/config/source.rs b/src/core/config/source.rs index 24e6adc110..010673fdb0 100644 --- a/src/core/config/source.rs +++ b/src/core/config/source.rs @@ -1,10 +1,10 @@ +use std::path::Path; +use std::str::FromStr; + use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use tailcall_valid::{ValidationError, Validator}; use thiserror::Error; -use super::Config; - #[derive(Clone, Default, Debug, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "camelCase")] pub enum Source { @@ -27,21 +27,24 @@ impl std::fmt::Display for Source { const JSON_EXT: &str = "json"; const YML_EXT: &str = "yml"; const GRAPHQL_EXT: &str = "graphql"; -const ALL: [Source; 3] = [Source::Json, Source::Yml, Source::GraphQL]; #[derive(Debug, Error, PartialEq)] -#[error("Unsupported config extension: {0}")] -pub struct UnsupportedConfigFormat(pub String); +pub enum SourceError { + #[error("Unsupported config extension: {0}")] + UnsupportedFileFormat(String), + #[error("Cannot parse")] + InvalidPath(String), +} impl std::str::FromStr for Source { - type Err = UnsupportedConfigFormat; + type Err = SourceError; fn from_str(s: &str) -> Result { match s.to_lowercase().as_str() { "json" => Ok(Source::Json), "yml" | "yaml" => Ok(Source::Yml), "graphql" | "gql" => Ok(Source::GraphQL), - _ => Err(UnsupportedConfigFormat(s.to_string())), + _ => Err(SourceError::UnsupportedFileFormat(s.to_string())), } } } @@ -56,34 +59,12 @@ impl Source { } } - fn ends_with(&self, file: &str) -> bool { - file.ends_with(&format!(".{}", self.ext())) - } - /// Detect the config format from the file name - pub fn detect(name: &str) -> Result { - ALL.into_iter() - .find(|format| format.ends_with(name)) - .ok_or(UnsupportedConfigFormat(name.to_string())) - } - - /// Encode the config to the given format - pub fn encode(&self, config: &Config) -> Result { - match self { - Source::Yml => Ok(config.to_yaml()?), - Source::GraphQL => Ok(config.to_sdl()), - Source::Json => Ok(config.to_json(true)?), - } - } - - /// Decode the config from the given data - pub fn decode(&self, data: &str) -> Result> { - match self { - Source::Yml => Config::from_yaml(data).map_err(|e| ValidationError::new(e.to_string())), - Source::GraphQL => Config::from_sdl(data).to_result(), - Source::Json => { - Config::from_json(data).map_err(|e| ValidationError::new(e.to_string())) - } - } + pub fn detect(name: &str) -> Result { + Path::new(name) + .extension() + .and_then(|ext| ext.to_str()) + .map(Source::from_str) + .ok_or(SourceError::InvalidPath(name.to_string()))? } } diff --git a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__cyclic_merge_case.snap b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__cyclic_merge_case.snap index 1d258d9b10..1f3bdb3e93 100644 --- a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__cyclic_merge_case.snap +++ b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__cyclic_merge_case.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/merge_types/type_merger.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__fail_when_scalar_field_not_match.snap b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__fail_when_scalar_field_not_match.snap index 44381963fe..0b27bb35d1 100644 --- a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__fail_when_scalar_field_not_match.snap +++ b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__fail_when_scalar_field_not_match.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/merge_types/type_merger.rs expression: config.to_sdl() +snapshot_kind: text --- type T1 { a: Int diff --git a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__input_types.snap b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__input_types.snap index 725071fd48..e0b8edb843 100644 --- a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__input_types.snap +++ b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__input_types.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/merge_types/type_merger.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__interface_types.snap b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__interface_types.snap index ffdd47a32d..b08852eded 100644 --- a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__interface_types.snap +++ b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__interface_types.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/merge_types/type_merger.rs expression: config.to_sdl() +snapshot_kind: text --- interface GEN__M1 { a: Int diff --git a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__list_field_types.snap b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__list_field_types.snap index 618f632dc9..3219cd4757 100644 --- a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__list_field_types.snap +++ b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__list_field_types.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/merge_types/type_merger.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) { query: Query diff --git a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__merge_to_supertype.snap b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__merge_to_supertype.snap index 06ffb453c8..df0fc23d8e 100644 --- a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__merge_to_supertype.snap +++ b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__merge_to_supertype.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/merge_types/type_merger.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__type_merger.snap b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__type_merger.snap index e6c6bdddce..16095876bf 100644 --- a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__type_merger.snap +++ b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__type_merger.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/merge_types/type_merger.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__union_types.snap b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__union_types.snap index c463a6d54d..ae98e9bedd 100644 --- a/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__union_types.snap +++ b/src/core/config/transformer/merge_types/snapshots/tailcall__core__config__transformer__merge_types__type_merger__test__union_types.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/merge_types/type_merger.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_news_types.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_news_types.snap index 438ff66017..00caa7facf 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_news_types.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_news_types.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/ambiguous_type.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_types.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_types.snap index 7e9c3e302f..c9c8e1eb9a 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_types.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__ambiguous_type__tests__resolve_ambiguous_types.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/ambiguous_type.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__flatten_single_field__test__type_name_generator_transform.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__flatten_single_field__test__type_name_generator_transform.snap index 04995872b1..a456b4d8ed 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__flatten_single_field__test__type_name_generator_transform.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__flatten_single_field__test__type_name_generator_transform.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/flatten_single_field.rs expression: transformed_config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator.snap index 09d179abcb..a783067965 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/improve_type_names.rs expression: transformed_config.to_sdl() +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator_transform.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator_transform.snap index 529931e56e..04daa95563 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator_transform.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator_transform.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/improve_type_names.rs expression: transformed_config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator_with_cyclic_types.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator_with_cyclic_types.snap index 8dfc11f868..94bb987f5f 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator_with_cyclic_types.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__improve_type_names__test__type_name_generator_with_cyclic_types.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/improve_type_names.rs expression: transformed_config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__nested_unions__tests__nested_unions.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__nested_unions__tests__nested_unions.snap index 61d3ccbecf..ee0c26fbc5 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__nested_unions__tests__nested_unions.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__nested_unions__tests__nested_unions.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/nested_unions.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__nested_unions__tests__nested_unions_recursive.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__nested_unions__tests__nested_unions_recursive.snap index d5e7acd9e4..46c76c969a 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__nested_unions__tests__nested_unions_recursive.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__nested_unions__tests__nested_unions_recursive.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/nested_unions.rs expression: error +snapshot_kind: text --- Validation Error • Recursive type U1 [U] diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__rename_types__test__inferface_rename.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__rename_types__test__inferface_rename.snap index 00d4511bf6..8fafd26450 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__rename_types__test__inferface_rename.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__rename_types__test__inferface_rename.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/rename_types.rs expression: result.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__rename_types__test__rename_type.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__rename_types__test__rename_type.snap index 853b670043..07630ffd61 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__rename_types__test__rename_type.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__rename_types__test__rename_type.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/rename_types.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: PostQuery diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_call.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_call.snap index 056418f3e3..8416e28582 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_call.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_call.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/subgraph.rs expression: keys +snapshot_kind: text --- Valid( Ok( diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_expr.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_expr.snap index 29c06be101..c84b688a06 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_expr.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_expr.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/subgraph.rs expression: keys +snapshot_kind: text --- Valid( Ok( diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_graphql.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_graphql.snap index ae0c75e46a..2e5c80cccf 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_graphql.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_graphql.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/subgraph.rs expression: keys +snapshot_kind: text --- Valid( Ok( diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_grpc.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_grpc.snap index a58bbbb93b..7396014f92 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_grpc.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_grpc.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/subgraph.rs expression: keys +snapshot_kind: text --- Valid( Ok( diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_http.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_http.snap index bd776f6c9d..f3d7e62a18 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_http.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__extract_http.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/subgraph.rs expression: keys +snapshot_kind: text --- Valid( Ok( diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__non_value_template.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__non_value_template.snap index e01033b5f2..ac9c2be85a 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__non_value_template.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__extractor__non_value_template.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/subgraph.rs expression: keys +snapshot_kind: text --- Valid( Err( diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__keys__keys_merge.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__keys__keys_merge.snap index a1a1125ffd..b6d3d6b1e4 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__keys__keys_merge.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__keys__keys_merge.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/subgraph.rs expression: keys_a.merge_right(keys_b) +snapshot_kind: text --- Keys( { diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__keys__keys_set.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__keys__keys_set.snap index 0ca1900d8e..0ed08e9c59 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__keys__keys_set.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__subgraph__tests__keys__keys_set.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/subgraph.rs expression: keys +snapshot_kind: text --- Keys( { diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__nested_unions.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__nested_unions.snap index 86249a9b06..18998212fd 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__nested_unions.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__nested_unions.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/union_input_type.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__recursive_input.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__recursive_input.snap index 24fe5b9359..7f3f5cf94b 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__recursive_input.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__recursive_input.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/union_input_type.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server(port: 8000) @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__union.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__union.snap index a50dc27104..7442ac7fcd 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__union.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__union.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/union_input_type.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__union_in_type.snap b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__union_in_type.snap index b27bbc7d60..bd9cf3d888 100644 --- a/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__union_in_type.snap +++ b/src/core/config/transformer/snapshots/tailcall__core__config__transformer__union_input_type__tests__union_in_type.snap @@ -1,6 +1,7 @@ --- source: src/core/config/transformer/union_input_type.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/document.rs b/src/core/document.rs index baaf7b9ca8..a65b307f7c 100644 --- a/src/core/document.rs +++ b/src/core/document.rs @@ -1,10 +1,12 @@ +use std::borrow::Cow; +use std::fmt::Display; + use async_graphql::parser::types::*; -use async_graphql::{Pos, Positioned}; -use async_graphql_value::{ConstValue, Name}; +use async_graphql::Positioned; +use async_graphql_value::ConstValue; -fn pos(a: A) -> Positioned { - Positioned::new(a, Pos::default()) -} +use super::jit::Directive as JitDirective; +use super::json::JsonLikeOwned; struct LineBreaker<'a> { string: &'a str, @@ -61,9 +63,12 @@ fn get_formatted_docs(docs: Option, indent: usize) -> String { formatted_docs } -pub fn print_directives<'a>(directives: impl Iterator) -> String { +pub fn print_directives<'a, T>(directives: impl Iterator) -> String +where + &'a T: Into> + 'a, +{ directives - .map(|d| print_directive(&const_directive_to_sdl(d))) + .map(|d| print_directive(d)) .collect::>() .join(" ") } @@ -102,37 +107,6 @@ fn print_schema(schema: &SchemaDefinition) -> String { ) } -fn const_directive_to_sdl(directive: &ConstDirective) -> DirectiveDefinition { - DirectiveDefinition { - description: None, - name: pos(Name::new(directive.name.node.as_str())), - arguments: directive - .arguments - .iter() - .filter_map(|(k, v)| { - if v.node != ConstValue::Null { - Some(pos(InputValueDefinition { - description: None, - name: pos(Name::new(k.node.clone())), - ty: pos(Type { - nullable: true, - base: async_graphql::parser::types::BaseType::Named(Name::new( - v.to_string(), - )), - }), - default_value: Some(pos(ConstValue::String(v.to_string()))), - directives: Vec::new(), - })) - } else { - None - } - }) - .collect(), - is_repeatable: true, - locations: vec![], - } -} - fn print_type_def(type_def: &TypeDefinition) -> String { match &type_def.kind { TypeKind::Scalar => { @@ -320,18 +294,23 @@ fn print_input_value(field: &async_graphql::parser::types::InputValueDefinition) print_default_value(field.default_value.as_ref()) ) } -fn print_directive(directive: &DirectiveDefinition) -> String { + +pub fn print_directive<'a, T>(directive: &'a T) -> String +where + &'a T: Into>, +{ + let directive: Directive<'a> = directive.into(); let args = directive - .arguments + .args .iter() - .map(|arg| format!("{}: {}", arg.node.name.node, arg.node.ty.node)) + .map(|arg| format!("{}: {}", arg.name, arg.value)) .collect::>() .join(", "); if args.is_empty() { - format!("@{}", directive.name.node) + format!("@{}", directive.name) } else { - format!("@{}({})", directive.name.node, args) + format!("@{}({})", directive.name, args) } } @@ -420,3 +399,60 @@ pub fn print(sd: ServiceDocument) -> String { sdl_string.trim_end_matches('\n').to_string() } + +pub struct Directive<'a> { + pub name: Cow<'a, str>, + pub args: Vec>, +} + +pub struct Arg<'a> { + pub name: Cow<'a, str>, + pub value: Cow<'a, str>, +} + +impl<'a> From<&'a ConstDirective> for Directive<'a> { + fn from(value: &'a ConstDirective) -> Self { + Self { + name: Cow::Borrowed(value.name.node.as_str()), + args: value + .arguments + .iter() + .filter_map(|(k, v)| { + if v.node != async_graphql_value::ConstValue::Null { + Some(Arg { + name: Cow::Borrowed(k.node.as_str()), + value: Cow::Owned(v.to_string()), + }) + } else { + None + } + }) + .collect(), + } + } +} + +impl<'a, Input: JsonLikeOwned + Display> From<&'a JitDirective> for Directive<'a> { + fn from(value: &'a JitDirective) -> Self { + let to_mustache = |s: &str| -> String { + s.strip_prefix('$') + .map(|v| format!("{{{{{}}}}}", v)) + .unwrap_or_else(|| s.to_string()) + }; + Self { + name: Cow::Borrowed(value.name.as_str()), + args: value + .arguments + .iter() + .filter_map(|(k, v)| { + if !v.is_null() { + let v_str = to_mustache(&v.to_string()); + Some(Arg { name: Cow::Borrowed(k), value: Cow::Owned(v_str) }) + } else { + None + } + }) + .collect(), + } + } +} diff --git a/src/core/generator/generator.rs b/src/core/generator/generator.rs index 98cb81515e..5bcee1f556 100644 --- a/src/core/generator/generator.rs +++ b/src/core/generator/generator.rs @@ -99,6 +99,7 @@ impl Generator { type_of: LinkType::Protobuf, headers: None, meta: None, + proto_paths: None, }); Ok(config) } diff --git a/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__append_field_if_operation_type_exists.snap b/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__append_field_if_operation_type_exists.snap index cb169612c6..6f5e577bdb 100644 --- a/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__append_field_if_operation_type_exists.snap +++ b/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__append_field_if_operation_type_exists.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/json/operation_generator.rs expression: config.to_sdl() +snapshot_kind: text --- type Query { post: Int diff --git a/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__mutation.snap b/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__mutation.snap index 68701229b8..0f5998c965 100644 --- a/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__mutation.snap +++ b/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__mutation.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/json/operation_generator.rs expression: config.to_sdl() +snapshot_kind: text --- input Input1 { body: String diff --git a/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__query.snap b/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__query.snap index 4cf288d906..b64367deb0 100644 --- a/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__query.snap +++ b/src/core/generator/json/snapshots/tailcall__core__generator__json__operation_generator__test__query.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/json/operation_generator.rs expression: config.to_sdl() +snapshot_kind: text --- type Query { postComments(postId: Int): T44 @http(url: "https://jsonplaceholder.typicode.com/comments", query: [{key: "postId", value: "{{.args.postId}}"}]) diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_json__tests__generate_config_from_json.snap b/src/core/generator/snapshots/tailcall__core__generator__from_json__tests__generate_config_from_json.snap index 06b130ea6d..bc75c9bcac 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_json__tests__generate_config_from_json.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_json__tests__generate_config_from_json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_json.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream(allowedHeaders: ["authorization"]) { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto.snap index e06e1948ea..19db0c9c07 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_pkg_file.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_pkg_file.snap index f78ccc36d7..703f167d26 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_pkg_file.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_pkg_file.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_service_file.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_service_file.snap index 61327c9de6..c5e16625bd 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_service_file.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__from_proto_no_service_file.snap @@ -1,5 +1,6 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__greetings_proto_file.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__greetings_proto_file.snap index 8297302bf4..3326ca9904 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__greetings_proto_file.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__greetings_proto_file.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__map_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__map_types.snap index bad9a66493..d18fef56a9 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__map_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__map_types.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__movies.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__movies.snap index 1d23d60529..6902281cd0 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__movies.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__movies.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__nested_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__nested_types.snap index 6572244989..0371532223 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__nested_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__nested_types.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__oneof_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__oneof_types.snap index 395a63806f..30d734cef0 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__oneof_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__oneof_types.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__optional_fields.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__optional_fields.snap index 3fe01495f0..992573ee85 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__optional_fields.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__optional_fields.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__required_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__required_types.snap index bbc9e751a0..f464ef1652 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__required_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__required_types.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__scalar_types.snap b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__scalar_types.snap index 025b8b84c6..fd9fa87cb6 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__scalar_types.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__from_proto__test__scalar_types.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/from_proto.rs expression: result +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__generator__test__generate_from_config_from_multiple_jsons.snap b/src/core/generator/snapshots/tailcall__core__generator__generator__test__generate_from_config_from_multiple_jsons.snap index 820697c0fd..800f239813 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__generator__test__generate_from_config_from_multiple_jsons.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__generator__test__generate_from_config_from_multiple_jsons.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/generator.rs expression: cfg_module.config().to_sdl() +snapshot_kind: text --- schema @server @upstream(allowedHeaders: ["authorization"]) { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_combined_config.snap b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_combined_config.snap index 62d027c923..aec607ba25 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_combined_config.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_combined_config.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/generator.rs expression: cfg_module.config().to_sdl() +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream(allowedHeaders: ["authorization"], httpCache: 42) @link(src: "../../../tailcall-fixtures/fixtures/protobuf/news.proto", type: Protobuf) { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_configs.snap b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_configs.snap index 8d34015c98..9344a7758c 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_configs.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_configs.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/generator.rs expression: cfg_module.config().to_sdl() +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_json.snap b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_json.snap index bea2fb784c..80630b0c6f 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_json.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/generator.rs expression: cfg_module.config().to_sdl() +snapshot_kind: text --- schema @server @upstream(allowedHeaders: ["authorization"]) { query: Query diff --git a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_proto.snap b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_proto.snap index e4221c54d1..68c4560810 100644 --- a/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_proto.snap +++ b/src/core/generator/snapshots/tailcall__core__generator__generator__test__should_generate_config_from_proto.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/generator.rs expression: cfg_module.config().to_sdl() +snapshot_kind: text --- schema @server @upstream @link(src: "../../../tailcall-fixtures/fixtures/protobuf/news.proto", type: Protobuf) { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__add_cart.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__add_cart.json.snap index b9232784f8..c1abb2e4f0 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__add_cart.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__add_cart.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { mutation: Mutation diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__boolean.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__boolean.json.snap index c4ed346cad..3dda9a3375 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__boolean.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__boolean.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__create_post.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__create_post.json.snap index d1b65c95d2..5839562e6d 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__create_post.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__create_post.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { mutation: Mutation diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__create_product.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__create_product.json.snap index 0e363ab41f..d26de4a753 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__create_product.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__create_product.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { mutation: Mutation diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__create_user.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__create_user.json.snap index b80810870e..bd34fc682e 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__create_user.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__create_user.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { mutation: Mutation diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__empty_list.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__empty_list.json.snap index 9f26881c1c..fa92125727 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__empty_list.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__empty_list.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__generate_auth_token.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__generate_auth_token.json.snap index 072cbae6aa..8bdc0e7f3a 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__generate_auth_token.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__generate_auth_token.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { mutation: Mutation diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__incompatible_properties.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__incompatible_properties.json.snap index ec24b14514..1ed4e1ee63 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__incompatible_properties.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__incompatible_properties.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream(allowedHeaders: ["authorization"]) { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__incompatible_root_object.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__incompatible_root_object.json.snap index efa94d5427..22e7b9b19b 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__incompatible_root_object.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__incompatible_root_object.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__list.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__list.json.snap index b84ac60e5e..d0863cf876 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__list.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__list.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__list_incompatible_object.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__list_incompatible_object.json.snap index 9b613c3e85..3210b6a15a 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__list_incompatible_object.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__list_incompatible_object.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__list_primitive_type.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__list_primitive_type.json.snap index 98d3e57a5c..7323efa93a 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__list_primitive_type.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__list_primitive_type.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__nested_list.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__nested_list.json.snap index 42dff08b2b..fba255d73a 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__nested_list.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__nested_list.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__nested_same_properties.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__nested_same_properties.json.snap index 01a562d70c..85243b122a 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__nested_same_properties.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__nested_same_properties.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__null.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__null.json.snap index b7f5063085..b1f2519807 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__null.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__null.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__number.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__number.json.snap index 303184bfcb..2df13ae08f 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__number.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__number.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/generator/tests/snapshots/json_to_config_spec__string.json.snap b/src/core/generator/tests/snapshots/json_to_config_spec__string.json.snap index 53f2406c26..2b68c0342e 100644 --- a/src/core/generator/tests/snapshots/json_to_config_spec__string.json.snap +++ b/src/core/generator/tests/snapshots/json_to_config_spec__string.json.snap @@ -1,6 +1,7 @@ --- source: src/core/generator/tests/json_to_config_spec.rs expression: cfg.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/src/core/graphql/request_template.rs b/src/core/graphql/request_template.rs index 1eb87f1cc8..9e849d3033 100644 --- a/src/core/graphql/request_template.rs +++ b/src/core/graphql/request_template.rs @@ -6,6 +6,7 @@ use std::hash::{Hash, Hasher}; use derive_setters::Setters; use http::header::{HeaderMap, HeaderValue}; use tailcall_hasher::TailcallHasher; +use tracing::info; use crate::core::config::{GraphQLOperationType, KeyValue}; use crate::core::has_headers::HasHeaders; @@ -14,7 +15,35 @@ use crate::core::http::Method::POST; use crate::core::ir::model::{CacheKey, IoId}; use crate::core::ir::{GraphQLOperationContext, RelatedFields}; use crate::core::mustache::Mustache; -use crate::core::path::PathGraphql; +use crate::core::path::{PathGraphql, PathString}; + +/// Represents a GraphQL selection that can either be resolved or unresolved. +#[derive(Debug, Clone)] +pub enum Selection { + /// A selection with a resolved string value. + Resolved(String), + /// A selection that contains a Mustache template to be resolved later. + UnResolved(Mustache), +} + +impl Selection { + /// Resolves the `Unresolved` variant using the provided `PathString`. + pub fn resolve(self, p: &impl PathString) -> Selection { + match self { + Selection::UnResolved(template) => Selection::Resolved(template.render(p)), + resolved => resolved, + } + } +} + +impl From for Selection { + fn from(value: Mustache) -> Self { + match value.is_const() { + true => Selection::Resolved(value.to_string()), + false => Selection::UnResolved(value), + } + } +} /// RequestTemplate for GraphQL requests (See RequestTemplate documentation) #[derive(Setters, Debug, Clone)] @@ -26,6 +55,7 @@ pub struct RequestTemplate { pub operation_arguments: Option>, pub headers: MustacheHeaders, pub related_fields: RelatedFields, + pub selection: Option, } impl RequestTemplate { @@ -85,7 +115,12 @@ impl RequestTemplate { ctx: &C, ) -> String { let operation_type = &self.operation_type; - let selection_set = ctx.selection_set(&self.related_fields).unwrap_or_default(); + + let selection_set = match &self.selection { + Some(Selection::Resolved(s)) => Cow::Borrowed(s), + Some(Selection::UnResolved(u)) => Cow::Owned(u.to_string()), + None => Cow::Owned(ctx.selection_set(&self.related_fields).unwrap_or_default()), + }; let mut operation = Cow::Borrowed(&self.operation_name); @@ -121,7 +156,10 @@ impl RequestTemplate { } } - format!(r#"{{ "query": "{operation_type} {{ {operation} {selection_set} }}" }}"#) + let query = + format!(r#"{{ "query": "{operation_type} {{ {operation} {selection_set} }}" }}"#); + info!("Query {} ", query); + query } pub fn new( @@ -149,6 +187,7 @@ impl RequestTemplate { operation_arguments, headers, related_fields, + selection: None, }) } } diff --git a/src/core/grpc/data_loader_request.rs b/src/core/grpc/data_loader_request.rs index 1f49188d6f..7ee4bba124 100644 --- a/src/core/grpc/data_loader_request.rs +++ b/src/core/grpc/data_loader_request.rs @@ -74,6 +74,7 @@ mod tests { type_of: LinkType::Protobuf, headers: None, meta: None, + proto_paths: None, }]); let method = GrpcMethod { package: "greetings".to_string(), diff --git a/src/core/grpc/protobuf.rs b/src/core/grpc/protobuf.rs index 979b7afb2f..36ebdffebd 100644 --- a/src/core/grpc/protobuf.rs +++ b/src/core/grpc/protobuf.rs @@ -254,6 +254,18 @@ pub mod tests { use crate::core::config::{Config, Field, Grpc, Link, LinkType, Resolver, Type}; pub async fn get_proto_file(path: &str) -> Result { + get_proto_file_with_config(path, LinkConfig::default()).await + } + + #[derive(Default)] + pub struct LinkConfig { + proto_paths: Option>, + } + + pub async fn get_proto_file_with_config( + path: &str, + link_config: LinkConfig, + ) -> Result { let runtime = crate::core::runtime::test::init(None); let reader = ConfigReader::init(runtime); @@ -268,6 +280,7 @@ pub mod tests { type_of: LinkType::Protobuf, headers: None, meta: None, + proto_paths: link_config.proto_paths, }]); let method = GrpcMethod { package: id, service: "a".to_owned(), name: "b".to_owned() }; @@ -395,6 +408,41 @@ pub mod tests { Ok(()) } + #[tokio::test] + async fn news_proto_file_with_proto_paths() -> Result<()> { + let grpc_method = GrpcMethod::try_from("news.NewsService.GetNews").unwrap(); + + let path: &str = protobuf::NEWS_PROTO_PATHS; + let proto_paths = Some(vec![Path::new(path) + .ancestors() + .nth(2) + .unwrap() + .to_string_lossy() + .to_string()]); + let file = ProtobufSet::from_proto_file( + get_proto_file_with_config(path, LinkConfig { proto_paths }).await?, + )?; + let service = file.find_service(&grpc_method)?; + let operation = service.find_operation(&grpc_method)?; + + let input = operation.convert_input(r#"{ "id": 1 }"#)?; + + assert_eq!(input, b"\0\0\0\0\x02\x08\x01"); + + let output = b"\0\0\0\x005\x08\x01\x12\x06Note 1\x1a\tContent 1\"\x0cPost image 1"; + + let parsed = operation.convert_output::(output)?; + + assert_eq!( + serde_json::to_value(parsed)?, + json!({ + "id": 1, "title": "Note 1", "body": "Content 1", "postImage": "Post image 1", "status": "PUBLISHED" + }) + ); + + Ok(()) + } + #[tokio::test] async fn oneof_proto_file() -> Result<()> { let grpc_method = GrpcMethod::try_from("oneof.OneOfService.GetOneOf").unwrap(); diff --git a/src/core/grpc/request_template.rs b/src/core/grpc/request_template.rs index b1cb5653e4..4643c5965f 100644 --- a/src/core/grpc/request_template.rs +++ b/src/core/grpc/request_template.rs @@ -160,6 +160,7 @@ mod tests { type_of: LinkType::Protobuf, headers: None, meta: None, + proto_paths: None, }]); let method = GrpcMethod { package: id.to_string(), diff --git a/src/core/http/request_handler.rs b/src/core/http/request_handler.rs index 712929ee0d..e7ab5efae2 100644 --- a/src/core/http/request_handler.rs +++ b/src/core/http/request_handler.rs @@ -119,30 +119,17 @@ async fn execute_query( request: T, req: Parts, ) -> anyhow::Result> { - let mut response = if app_ctx.blueprint.server.enable_jit { - let operation_id = request.operation_id(&req.headers); - let exec = JITExecutor::new(app_ctx.clone(), req_ctx.clone(), operation_id); - request - .execute_with_jit(exec) - .await - .set_cache_control( - app_ctx.blueprint.server.enable_cache_control_header, - req_ctx.get_min_max_age().unwrap_or(0), - req_ctx.is_cache_public().unwrap_or(true), - ) - .into_response()? - } else { - request - .data(req_ctx.clone()) - .execute(&app_ctx.schema) - .await - .set_cache_control( - app_ctx.blueprint.server.enable_cache_control_header, - req_ctx.get_min_max_age().unwrap_or(0), - req_ctx.is_cache_public().unwrap_or(true), - ) - .into_response()? - }; + let operation_id = request.operation_id(&req.headers); + let exec = JITExecutor::new(app_ctx.clone(), req_ctx.clone(), operation_id); + let mut response = request + .execute_with_jit(exec) + .await + .set_cache_control( + app_ctx.blueprint.server.enable_cache_control_header, + req_ctx.get_min_max_age().unwrap_or(0), + req_ctx.is_cache_public().unwrap_or(true), + ) + .into_response()?; update_response_headers(&mut response, req_ctx, app_ctx); Ok(response) diff --git a/src/core/ir/model.rs b/src/core/ir/model.rs index 9a07742503..f4fbfdb563 100644 --- a/src/core/ir/model.rs +++ b/src/core/ir/model.rs @@ -131,6 +131,28 @@ impl Cache { } impl IR { + // allows to modify the IO node in the IR tree + pub fn modify_io(&mut self, io_modifier: &mut dyn FnMut(&mut IO)) { + match self { + IR::IO(io) => io_modifier(io), + IR::Cache(cache) => io_modifier(&mut cache.io), + IR::Discriminate(_, ir) | IR::Protect(_, ir) | IR::Path(ir, _) => { + ir.modify_io(io_modifier) + } + IR::Pipe(ir1, ir2) => { + ir1.modify_io(io_modifier); + ir2.modify_io(io_modifier); + } + IR::Entity(hash_map) => { + for ir in hash_map.values_mut() { + ir.modify_io(io_modifier); + } + } + IR::Map(map) => map.input.modify_io(io_modifier), + _ => {} + } + } + pub fn pipe(self, next: Self) -> Self { IR::Pipe(Box::new(self), Box::new(next)) } diff --git a/src/core/jit/builder.rs b/src/core/jit/builder.rs index 26ab6d1f66..04f99c45cb 100644 --- a/src/core/jit/builder.rs +++ b/src/core/jit/builder.rs @@ -64,16 +64,16 @@ impl Conditions { } } -pub struct Builder { +pub struct Builder<'a> { pub index: Arc, pub arg_id: Counter, pub field_id: Counter, - pub document: ExecutableDocument, + pub document: &'a ExecutableDocument, } // TODO: make generic over Value (Input) type -impl Builder { - pub fn new(blueprint: &Blueprint, document: ExecutableDocument) -> Self { +impl<'a> Builder<'a> { + pub fn new(blueprint: &Blueprint, document: &'a ExecutableDocument) -> Self { let index = Arc::new(blueprint.index()); Self { document, @@ -372,7 +372,7 @@ mod tests { let config = Config::from_sdl(CONFIG).to_result().unwrap(); let blueprint = Blueprint::try_from(&config.into()).unwrap(); let document = async_graphql::parser::parse_query(query).unwrap(); - Builder::new(&blueprint, document).build(None).unwrap() + Builder::new(&blueprint, &document).build(None).unwrap() } #[tokio::test] @@ -640,25 +640,23 @@ mod tests { let config = Config::from_sdl(CONFIG).to_result().unwrap(); let blueprint = Blueprint::try_from(&config.into()).unwrap(); let document = async_graphql::parser::parse_query(query).unwrap(); - let error = Builder::new(&blueprint, document.clone()) - .build(None) - .unwrap_err(); + let error = Builder::new(&blueprint, &document).build(None).unwrap_err(); assert_eq!(error, BuildError::OperationNameRequired); - let error = Builder::new(&blueprint, document.clone()) + let error = Builder::new(&blueprint, &document) .build(Some("unknown")) .unwrap_err(); assert_eq!(error, BuildError::OperationNotFound("unknown".to_string())); - let plan = Builder::new(&blueprint, document.clone()) + let plan = Builder::new(&blueprint, &document) .build(Some("GetPosts")) .unwrap(); assert!(plan.is_query()); insta::assert_debug_snapshot!(plan.selection); - let plan = Builder::new(&blueprint, document.clone()) + let plan = Builder::new(&blueprint, &document) .build(Some("CreateNewPost")) .unwrap(); assert!(!plan.is_query()); diff --git a/src/core/jit/fixtures/jp.rs b/src/core/jit/fixtures/jp.rs index 2d0c99b45c..f743fdc281 100644 --- a/src/core/jit/fixtures/jp.rs +++ b/src/core/jit/fixtures/jp.rs @@ -88,10 +88,8 @@ impl<'a, Value: Deserialize<'a> + Clone + 'a + JsonLike<'a> + std::fmt::Debug> J fn plan(query: &str, variables: &Variables) -> OperationPlan { let config = ConfigModule::from(Config::from_sdl(Self::CONFIG).to_result().unwrap()); - let builder = Builder::new( - &Blueprint::try_from(&config).unwrap(), - async_graphql::parser::parse_query(query).unwrap(), - ); + let doc = async_graphql::parser::parse_query(query).unwrap(); + let builder = Builder::new(&Blueprint::try_from(&config).unwrap(), &doc); let plan = builder.build(None).unwrap(); let plan = transform::Skip::new(variables) diff --git a/src/core/jit/graphql_executor.rs b/src/core/jit/graphql_executor.rs index 31afb8af0f..e1c131c374 100644 --- a/src/core/jit/graphql_executor.rs +++ b/src/core/jit/graphql_executor.rs @@ -75,6 +75,8 @@ impl JITExecutor { &self, request: async_graphql::Request, ) -> impl Future>> + Send + '_ { + // TODO: hash considering only the query itself ignoring specified operation and + // variables that could differ for the same query let hash = Self::req_hash(&request); async move { @@ -135,6 +137,7 @@ impl JITExecutor { } } +// TODO: used only for introspection, simplify somehow? impl From> for async_graphql::Request { fn from(value: jit::Request) -> Self { let mut request = async_graphql::Request::new(value.query); diff --git a/src/core/jit/model.rs b/src/core/jit/model.rs index 1b833b0ed0..9b2950a22a 100644 --- a/src/core/jit/model.rs +++ b/src/core/jit/model.rs @@ -1,6 +1,6 @@ use std::borrow::Cow; use std::collections::HashMap; -use std::fmt::{Debug, Formatter}; +use std::fmt::{Debug, Display, Formatter}; use std::num::NonZeroU64; use std::sync::Arc; @@ -13,12 +13,20 @@ use super::Error; use crate::core::blueprint::Index; use crate::core::ir::model::IR; use crate::core::ir::TypedValue; -use crate::core::json::JsonLike; +use crate::core::json::{JsonLike, JsonLikeOwned}; +use crate::core::path::PathString; use crate::core::scalar::Scalar; #[derive(Debug, Deserialize, Clone)] pub struct Variables(HashMap); +impl PathString for Variables { + fn path_string<'a, T: AsRef>(&'a self, path: &'a [T]) -> Option> { + self.get(path[0].as_ref()) + .map(|v| Cow::Owned(v.to_string())) + } +} + impl Default for Variables { fn default() -> Self { Self::new() @@ -96,6 +104,22 @@ pub struct Arg { pub default_value: Option, } +impl Display for Arg { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + let v = self + .value + .as_ref() + .map(|v| v.to_string()) + .unwrap_or_else(|| { + self.default_value + .as_ref() + .map(|v| v.to_string()) + .unwrap_or_default() + }); + write!(f, "{}: {}", self.name, v) + } +} + impl Arg { pub fn try_map( self, diff --git a/src/core/jit/request.rs b/src/core/jit/request.rs index dc08ee53d7..f37c4a721e 100644 --- a/src/core/jit/request.rs +++ b/src/core/jit/request.rs @@ -42,7 +42,7 @@ impl Request { blueprint: &Blueprint, ) -> Result> { let doc = async_graphql::parser::parse_query(&self.query)?; - let builder = Builder::new(blueprint, doc); + let builder = Builder::new(blueprint, &doc); let plan = builder.build(self.operation_name.as_deref())?; transform::CheckConst::new() @@ -50,6 +50,7 @@ impl Request { .pipe(transform::AuthPlanner::new()) .pipe(transform::CheckDedupe::new()) .pipe(transform::CheckCache::new()) + .pipe(transform::GraphQL::new()) .transform(plan) .to_result() // both transformers are infallible right now diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__alias_query.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__alias_query.snap index 55a962e53f..967079c79e 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__alias_query.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__alias_query.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__default_value.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__default_value.snap index 783937ff61..f3c536f21f 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__default_value.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__default_value.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__directives.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__directives.snap index 4ae3b7cc67..33e1e42728 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__directives.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__directives.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__fragments.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__fragments.snap index 43558fa415..f31d41f3c6 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__fragments.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__fragments.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__from_document.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__from_document.snap index dfe66ad529..897258d6b4 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__from_document.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__from_document.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__multiple_operations.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__multiple_operations.snap index efd0911f59..fb90b7c4bf 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__multiple_operations.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__multiple_operations.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__resolving_operation-2.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__resolving_operation-2.snap index 85bc18599b..d559ba0b57 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__resolving_operation-2.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__resolving_operation-2.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__resolving_operation.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__resolving_operation.snap index 5a27256443..e440336255 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__resolving_operation.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__resolving_operation.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__simple_mutation.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__simple_mutation.snap index 8899a472d8..be22bbd52f 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__simple_mutation.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__simple_mutation.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__simple_query.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__simple_query.snap index 3e08218120..a8bb8a66ff 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__simple_query.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__simple_query.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__unions.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__unions.snap index 6d3590237c..adeacbe030 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__unions.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__unions.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__variables.snap b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__variables.snap index c2d15d78bf..d7b2b13adc 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__builder__tests__variables.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__builder__tests__variables.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/builder.rs expression: plan.selection +snapshot_kind: text --- [ Field { diff --git a/src/core/jit/snapshots/tailcall__core__jit__context__test__field.snap b/src/core/jit/snapshots/tailcall__core__jit__context__test__field.snap index eb5b1e40b8..1e4d3b1154 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__context__test__field.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__context__test__field.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/context.rs -expression: " as ResolverContextLike>::field(&ctx).unwrap()" +expression: expected +snapshot_kind: text --- SelectionField { name: "posts", diff --git a/src/core/jit/snapshots/tailcall__core__jit__model__test__from_custom_directive.snap b/src/core/jit/snapshots/tailcall__core__jit__model__test__from_custom_directive.snap index 99ddb19923..0ef365a77f 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__model__test__from_custom_directive.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__model__test__from_custom_directive.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/model.rs expression: async_directive +snapshot_kind: text --- ConstDirective { name: Positioned { diff --git a/src/core/jit/snapshots/tailcall__core__jit__response__test__adding_errors.snap b/src/core/jit/snapshots/tailcall__core__jit__response__test__adding_errors.snap index 528b311ba8..f6c7df1dab 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__response__test__adding_errors.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__response__test__adding_errors.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/response.rs expression: response +snapshot_kind: text --- Response { data: String( diff --git a/src/core/jit/snapshots/tailcall__core__jit__response__test__conversion_to_async_graphql.snap b/src/core/jit/snapshots/tailcall__core__jit__response__test__conversion_to_async_graphql.snap index d1e3515129..73498cd505 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__response__test__conversion_to_async_graphql.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__response__test__conversion_to_async_graphql.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/response.rs expression: async_response +snapshot_kind: text --- Response { data: Null, diff --git a/src/core/jit/snapshots/tailcall__core__jit__response__test__merging_of_errors.snap b/src/core/jit/snapshots/tailcall__core__jit__response__test__merging_of_errors.snap index b523434aa5..a8c5974628 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__response__test__merging_of_errors.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__response__test__merging_of_errors.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/response.rs expression: merged_resp +snapshot_kind: text --- { "data": null, diff --git a/src/core/jit/snapshots/tailcall__core__jit__response__test__with_error.snap b/src/core/jit/snapshots/tailcall__core__jit__response__test__with_error.snap index 3b3df4d638..3646bb7bf6 100644 --- a/src/core/jit/snapshots/tailcall__core__jit__response__test__with_error.snap +++ b/src/core/jit/snapshots/tailcall__core__jit__response__test__with_error.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/response.rs expression: response +snapshot_kind: text --- Response { data: Null, diff --git a/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder.snap b/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder.snap index b5af39402a..3679db7d97 100644 --- a/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder.snap +++ b/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/synth/synth.rs expression: "serde_json::to_string_pretty(&val).unwrap()" +snapshot_kind: text --- { "posts": [ diff --git a/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_borrowed.snap b/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_borrowed.snap index b5af39402a..3679db7d97 100644 --- a/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_borrowed.snap +++ b/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_borrowed.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/synth/synth.rs expression: "serde_json::to_string_pretty(&val).unwrap()" +snapshot_kind: text --- { "posts": [ diff --git a/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_typename.snap b/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_typename.snap index c00b1c6293..7886b00081 100644 --- a/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_typename.snap +++ b/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_typename.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/synth/synth.rs expression: "serde_json::to_string_pretty(&val).unwrap()" +snapshot_kind: text --- { "posts": [ diff --git a/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_typename_root_level.snap b/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_typename_root_level.snap index a48b858ce3..4c06b77a9a 100644 --- a/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_typename_root_level.snap +++ b/src/core/jit/synth/snapshots/tailcall__core__jit__synth__synth__tests__json_placeholder_typename_root_level.snap @@ -1,6 +1,7 @@ --- source: src/core/jit/synth/synth.rs expression: "serde_json::to_string_pretty(&val).unwrap()" +snapshot_kind: text --- { "__typename": "Query", diff --git a/src/core/jit/synth/synth.rs b/src/core/jit/synth/synth.rs index e24b6c50a0..221fa95da2 100644 --- a/src/core/jit/synth/synth.rs +++ b/src/core/jit/synth/synth.rs @@ -345,7 +345,7 @@ mod tests { let config = Config::from_sdl(CONFIG).to_result().unwrap(); let config = ConfigModule::from(config); - let builder = Builder::new(&Blueprint::try_from(&config).unwrap(), doc); + let builder = Builder::new(&Blueprint::try_from(&config).unwrap(), &doc); let plan = builder.build(None).unwrap(); let plan = plan .try_map(|v| { diff --git a/src/core/jit/transform/graphql.rs b/src/core/jit/transform/graphql.rs new file mode 100644 index 0000000000..79139c9891 --- /dev/null +++ b/src/core/jit/transform/graphql.rs @@ -0,0 +1,109 @@ +use std::borrow::Cow; +use std::convert::Infallible; +use std::fmt::{Debug, Display}; +use std::marker::PhantomData; + +use tailcall_valid::Valid; + +use crate::core::document::print_directives; +use crate::core::ir::model::{IO, IR}; +use crate::core::jit::{Field, OperationPlan}; +use crate::core::json::JsonLikeOwned; +use crate::core::{Mustache, Transform}; + +#[derive(Default)] +pub struct GraphQL(PhantomData); + +impl GraphQL { + pub fn new() -> Self { + Self(PhantomData) + } +} + +fn compute_selection_set(base_field: &mut [Field]) { + for field in base_field.iter_mut() { + if let Some(ir) = field.ir.as_mut() { + ir.modify_io(&mut |io| { + if let IO::GraphQL { req_template, .. } = io { + if let Some(v) = format_selection_set(field.selection.iter()) { + req_template.selection = Some(Mustache::parse(&v).into()); + } + } + }); + } + compute_selection_set(field.selection.as_mut()); + } +} + +impl Transform for GraphQL { + type Value = OperationPlan; + type Error = Infallible; + + fn transform(&self, mut plan: Self::Value) -> Valid { + compute_selection_set(&mut plan.selection); + + Valid::succeed(plan) + } +} + +fn format_selection_set<'a, A: 'a + Display + JsonLikeOwned>( + selection_set: impl Iterator>, +) -> Option { + let set = selection_set + .filter(|field| !matches!(&field.ir, Some(IR::IO(_)) | Some(IR::Dynamic(_)))) + .map(|field| { + // handle @modify directive scenario. + let field_name = if let Some(IR::ContextPath(data)) = &field.ir { + data.first().cloned().unwrap_or(field.name.to_string()) + } else { + field.name.to_string() + }; + format_selection_field(field, &field_name) + }) + .collect::>(); + + if set.is_empty() { + return None; + } + + Some(format!("{{ {} }}", set.join(" "))) +} + +fn format_selection_field(field: &Field, name: &str) -> String { + let arguments = format_selection_field_arguments(field); + let selection_set = format_selection_set(field.selection.iter()); + + let mut output = format!("{}{}", name, arguments); + + if !field.directives.is_empty() { + let directives = print_directives(field.directives.iter()); + + if !directives.is_empty() { + output.push(' '); + output.push_str(&directives.escape_default().to_string()); + } + } + + if let Some(selection_set) = selection_set { + output.push(' '); + output.push_str(&selection_set); + } + + output +} + +fn format_selection_field_arguments(field: &Field) -> Cow<'static, str> { + let arguments = field + .args + .iter() + .filter(|a| a.value.is_some()) + .map(|arg| arg.to_string()) + .collect::>() + .join(","); + + if arguments.is_empty() { + Cow::Borrowed("") + } else { + Cow::Owned(format!("({})", arguments.escape_default())) + } +} diff --git a/src/core/jit/transform/input_resolver.rs b/src/core/jit/transform/input_resolver.rs index 920bcfdae1..86b5fe59ba 100644 --- a/src/core/jit/transform/input_resolver.rs +++ b/src/core/jit/transform/input_resolver.rs @@ -1,7 +1,10 @@ +use std::fmt::Display; + use async_graphql_value::{ConstValue, Value}; use super::super::{Arg, Field, OperationPlan, ResolveInputError, Variables}; use crate::core::blueprint::Index; +use crate::core::ir::model::IO; use crate::core::json::{JsonLikeOwned, JsonObjectLike}; use crate::core::Type; @@ -46,7 +49,7 @@ impl InputResolver { impl InputResolver where Input: Clone + std::fmt::Debug, - Output: Clone + JsonLikeOwned + TryFrom + std::fmt::Debug, + Output: Clone + JsonLikeOwned + TryFrom + std::fmt::Debug + Display, Input: InputResolvable, >::Error: std::fmt::Debug, { @@ -55,7 +58,7 @@ where variables: &Variables, ) -> Result, ResolveInputError> { let index = self.plan.index; - let selection = self + let mut selection = self .plan .selection .into_iter() @@ -68,6 +71,10 @@ where .map(|field| Self::resolve_field(&index, field?)) .collect::, _>>()?; + // adjust the pre-computed values in selection set like graphql query for + // @graphql directive. + Self::resolve_graphql_selection_set(&mut selection, variables); + Ok(OperationPlan { root_name: self.plan.root_name.to_string(), operation_type: self.plan.operation_type, @@ -82,6 +89,25 @@ where }) } + // resolves the variables in selection set mustache template for graphql query. + fn resolve_graphql_selection_set( + base_field: &mut [Field], + variables: &Variables, + ) { + for field in base_field.iter_mut() { + if let Some(ir) = field.ir.as_mut() { + ir.modify_io(&mut |io| { + if let IO::GraphQL { req_template, .. } = io { + if let Some(selection) = req_template.selection.take() { + req_template.selection = Some(selection.resolve(variables)); + } + } + }); + } + Self::resolve_graphql_selection_set(field.selection.as_mut(), variables); + } + } + fn resolve_field( index: &Index, field: Field, diff --git a/src/core/jit/transform/mod.rs b/src/core/jit/transform/mod.rs index 71928ddbfd..c3cd01c409 100644 --- a/src/core/jit/transform/mod.rs +++ b/src/core/jit/transform/mod.rs @@ -3,6 +3,7 @@ mod check_cache; mod check_const; mod check_dedupe; mod check_protected; +mod graphql; mod input_resolver; mod skip; @@ -11,5 +12,6 @@ pub use check_cache::*; pub use check_const::*; pub use check_dedupe::*; pub use check_protected::*; +pub use graphql::*; pub use input_resolver::*; pub use skip::*; diff --git a/src/core/json/graphql.rs b/src/core/json/graphql.rs index 5491625461..f9d4260f55 100644 --- a/src/core/json/graphql.rs +++ b/src/core/json/graphql.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; use std::collections::HashMap; use async_graphql::Name; -use async_graphql_value::ConstValue; +use async_graphql_value::{ConstValue, Value}; use indexmap::IndexMap; use super::*; @@ -196,3 +196,153 @@ impl<'json> JsonLike<'json> for ConstValue { ConstValue::String(s.to_string()) } } + +impl<'json> JsonLike<'json> for Value { + type JsonObject = IndexMap; + + fn from_primitive(x: JsonPrimitive<'json>) -> Self { + match x { + JsonPrimitive::Null => Value::Null, + JsonPrimitive::Bool(x) => Value::Boolean(x), + JsonPrimitive::Str(s) => Value::String(s.to_string()), + JsonPrimitive::Number(number) => Value::Number(number), + } + } + + fn as_primitive(&self) -> Option { + let val = match self { + Value::Null => JsonPrimitive::Null, + Value::Boolean(x) => JsonPrimitive::Bool(*x), + Value::Number(number) => JsonPrimitive::Number(number.clone()), + Value::String(s) => JsonPrimitive::Str(s.as_ref()), + Value::Enum(e) => JsonPrimitive::Str(e.as_str()), + _ => return None, + }; + + Some(val) + } + + fn as_array(&self) -> Option<&Vec> { + match self { + Value::List(seq) => Some(seq), + _ => None, + } + } + + fn as_array_mut(&mut self) -> Option<&mut Vec> { + match self { + Value::List(seq) => Some(seq), + _ => None, + } + } + + fn into_array(self) -> Option> { + match self { + Value::List(seq) => Some(seq), + _ => None, + } + } + + fn as_str(&self) -> Option<&str> { + match self { + Value::String(s) => Some(s), + _ => None, + } + } + + fn as_i64(&self) -> Option { + match self { + Value::Number(n) => n.as_i64(), + _ => None, + } + } + + fn as_u64(&self) -> Option { + match self { + Value::Number(n) => n.as_u64(), + _ => None, + } + } + + fn as_f64(&self) -> Option { + match self { + Value::Number(n) => n.as_f64(), + _ => None, + } + } + + fn as_bool(&self) -> Option { + match self { + Value::Boolean(b) => Some(*b), + _ => None, + } + } + + fn is_null(&self) -> bool { + matches!(self, Value::Null) + } + + fn get_path>(&self, path: &[T]) -> Option<&Self> { + let mut val = self; + for token in path { + val = match val { + Value::List(seq) => { + let index = token.as_ref().parse::().ok()?; + seq.get(index)? + } + Value::Object(map) => map.get(token.as_ref())?, + _ => return None, + }; + } + Some(val) + } + + fn get_key(&self, path: &str) -> Option<&Self> { + match self { + Value::Object(map) => map.get(&async_graphql::Name::new(path)), + _ => None, + } + } + + fn group_by(&self, path: &[String]) -> HashMap> { + let src = gather_path_matches(self, path, vec![]); + group_by_key(src) + } + + fn null() -> Self { + Default::default() + } + + fn as_object(&self) -> Option<&Self::JsonObject> { + match self { + Value::Object(map) => Some(map), + _ => None, + } + } + + fn as_object_mut(&mut self) -> Option<&mut Self::JsonObject> { + match self { + Value::Object(map) => Some(map), + _ => None, + } + } + + fn into_object(self) -> Option { + match self { + Value::Object(map) => Some(map), + _ => None, + } + } + + fn object(obj: Self::JsonObject) -> Self { + Value::Object(obj) + } + + fn array(arr: Vec) -> Self { + Value::List(arr) + } + + fn string(s: Cow<'json, str>) -> Self { + Value::String(s.to_string()) + } +} diff --git a/src/core/snapshots/tailcall__core__tests__include_config.snap b/src/core/snapshots/tailcall__core__tests__include_config.snap index 34c85b2e1e..2c4fd3baf6 100644 --- a/src/core/snapshots/tailcall__core__tests__include_config.snap +++ b/src/core/snapshots/tailcall__core__tests__include_config.snap @@ -1,6 +1,7 @@ --- source: src/core/mod.rs expression: cfg +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tailcall-typedefs/src/main.rs b/tailcall-typedefs/src/main.rs index aecf725b24..f147486ff8 100644 --- a/tailcall-typedefs/src/main.rs +++ b/tailcall-typedefs/src/main.rs @@ -7,14 +7,12 @@ use std::process::exit; use std::sync::Arc; use anyhow::{anyhow, Result}; -use schemars::schema::{RootSchema, Schema}; -use schemars::Map; +use schemars::schema::RootSchema; use serde_json::{json, Value}; -use strum::IntoEnumIterator; use tailcall::cli; -use tailcall::core::config::Config; +use tailcall::core::config::RuntimeConfig; use tailcall::core::tracing::default_tracing_for_name; -use tailcall::core::{scalar, FileIO}; +use tailcall::core::FileIO; static JSON_SCHEMA_FILE: &str = "generated/.tailcallrc.schema.json"; static GRAPHQL_SCHEMA_FILE: &str = "generated/.tailcallrc.graphql"; @@ -143,11 +141,7 @@ fn get_graphql_path() -> PathBuf { } fn get_updated_json() -> Result { - let mut schema: RootSchema = schemars::schema_for!(Config); - let scalar = scalar::Scalar::iter() - .map(|scalar| (scalar.name(), scalar.schema())) - .collect::>(); - schema.definitions.extend(scalar); + let schema: RootSchema = schemars::schema_for!(RuntimeConfig); let schema = json!(schema); Ok(schema) diff --git a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_deezer.md.snap b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_deezer.md.snap index a35abec942..d1a0f9d29f 100644 --- a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_deezer.md.snap +++ b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_deezer.md.snap @@ -1,6 +1,7 @@ --- source: tests/cli/gen.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_json_proto_mix_config.md.snap b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_json_proto_mix_config.md.snap index 3e176c6dfd..160f27d421 100644 --- a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_json_proto_mix_config.md.snap +++ b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_json_proto_mix_config.md.snap @@ -1,6 +1,7 @@ --- source: tests/cli/gen.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_jsonplaceholder.md.snap b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_jsonplaceholder.md.snap index ed5c4a6229..ddf6fa2e87 100644 --- a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_jsonplaceholder.md.snap +++ b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_jsonplaceholder.md.snap @@ -1,6 +1,7 @@ --- source: tests/cli/gen.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream(allowedHeaders: ["Accept", "Content-Type"]) { query: Query diff --git a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_proto_with_proto_paths_config.md.snap b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_proto_with_proto_paths_config.md.snap index 3e176c6dfd..160f27d421 100644 --- a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_proto_with_proto_paths_config.md.snap +++ b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__gen_proto_with_proto_paths_config.md.snap @@ -1,6 +1,7 @@ --- source: tests/cli/gen.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__proto-connect-rpc.md.snap b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__proto-connect-rpc.md.snap index b4581cc432..0a12fd5dc6 100644 --- a/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__proto-connect-rpc.md.snap +++ b/tests/cli/snapshots/cli_spec__test__generator_spec__tests__cli__fixtures__generator__proto-connect-rpc.md.snap @@ -1,6 +1,7 @@ --- source: tests/cli/gen.rs expression: config.to_sdl() +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/parse.rs b/tests/core/parse.rs index a438a31e89..6246c40008 100644 --- a/tests/core/parse.rs +++ b/tests/core/parse.rs @@ -273,11 +273,7 @@ impl ExecutionSpec { env: HashMap, http: Arc, ) -> Arc { - let mut blueprint = Blueprint::try_from(config).unwrap(); - - if cfg!(feature = "force_jit") { - blueprint.server.enable_jit = true; - } + let blueprint = Blueprint::try_from(config).unwrap(); let script = blueprint.server.script.clone(); diff --git a/tests/core/snapshots/add-field-index-list.md_0.snap b/tests/core/snapshots/add-field-index-list.md_0.snap index a5b7c188b6..5316822d92 100644 --- a/tests/core/snapshots/add-field-index-list.md_0.snap +++ b/tests/core/snapshots/add-field-index-list.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/add-field-index-list.md_client.snap b/tests/core/snapshots/add-field-index-list.md_client.snap index 0621209324..93420ff53f 100644 --- a/tests/core/snapshots/add-field-index-list.md_client.snap +++ b/tests/core/snapshots/add-field-index-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { username: String 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 2e2d9544a5..83b7126da0 100644 --- a/tests/core/snapshots/add-field-index-list.md_merged.snap +++ b/tests/core/snapshots/add-field-index-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/add-field-many-list.md_client.snap b/tests/core/snapshots/add-field-many-list.md_client.snap index 2de3b45764..459e0a5c84 100644 --- a/tests/core/snapshots/add-field-many-list.md_client.snap +++ b/tests/core/snapshots/add-field-many-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type A { b: [String] 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 cd3c909596..80606fd2c7 100644 --- a/tests/core/snapshots/add-field-many-list.md_merged.snap +++ b/tests/core/snapshots/add-field-many-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/add-field-many.md_client.snap b/tests/core/snapshots/add-field-many.md_client.snap index 9faf468474..a634b0702c 100644 --- a/tests/core/snapshots/add-field-many.md_client.snap +++ b/tests/core/snapshots/add-field-many.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Foo { a: String diff --git a/tests/core/snapshots/add-field-many.md_merged.snap b/tests/core/snapshots/add-field-many.md_merged.snap index 949429e670..1cd7979460 100644 --- a/tests/core/snapshots/add-field-many.md_merged.snap +++ b/tests/core/snapshots/add-field-many.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/add-field-modify.md_0.snap b/tests/core/snapshots/add-field-modify.md_0.snap index 0e5c653400..fc260d1e65 100644 --- a/tests/core/snapshots/add-field-modify.md_0.snap +++ b/tests/core/snapshots/add-field-modify.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/add-field-modify.md_client.snap b/tests/core/snapshots/add-field-modify.md_client.snap index 5415fb1a15..fda2fe027b 100644 --- a/tests/core/snapshots/add-field-modify.md_client.snap +++ b/tests/core/snapshots/add-field-modify.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Address { city: String diff --git a/tests/core/snapshots/add-field-modify.md_merged.snap b/tests/core/snapshots/add-field-modify.md_merged.snap index 983ec36527..d4d6474fcc 100644 --- a/tests/core/snapshots/add-field-modify.md_merged.snap +++ b/tests/core/snapshots/add-field-modify.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/add-field-with-composition.md_0.snap b/tests/core/snapshots/add-field-with-composition.md_0.snap index 68e1ab14ee..5dd800158d 100644 --- a/tests/core/snapshots/add-field-with-composition.md_0.snap +++ b/tests/core/snapshots/add-field-with-composition.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/add-field-with-composition.md_1.snap b/tests/core/snapshots/add-field-with-composition.md_1.snap index cbe3b96cf9..9d4df79f86 100644 --- a/tests/core/snapshots/add-field-with-composition.md_1.snap +++ b/tests/core/snapshots/add-field-with-composition.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/add-field-with-composition.md_client.snap b/tests/core/snapshots/add-field-with-composition.md_client.snap index b46761f427..dacc639c2a 100644 --- a/tests/core/snapshots/add-field-with-composition.md_client.snap +++ b/tests/core/snapshots/add-field-with-composition.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Address { geo: Geo 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 6c517c2f1c..e6879805cb 100644 --- a/tests/core/snapshots/add-field-with-composition.md_merged.snap +++ b/tests/core/snapshots/add-field-with-composition.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/add-field-with-modify.md_0.snap b/tests/core/snapshots/add-field-with-modify.md_0.snap index f6d155936f..7f39f78b41 100644 --- a/tests/core/snapshots/add-field-with-modify.md_0.snap +++ b/tests/core/snapshots/add-field-with-modify.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/add-field-with-modify.md_1.snap b/tests/core/snapshots/add-field-with-modify.md_1.snap index 7dbe361ffc..571b7aefc2 100644 --- a/tests/core/snapshots/add-field-with-modify.md_1.snap +++ b/tests/core/snapshots/add-field-with-modify.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/add-field-with-modify.md_client.snap b/tests/core/snapshots/add-field-with-modify.md_client.snap index 495d594bc1..2a995d66b8 100644 --- a/tests/core/snapshots/add-field-with-modify.md_client.snap +++ b/tests/core/snapshots/add-field-with-modify.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { person1: User 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 9fedd3356b..6541ffad9b 100644 --- a/tests/core/snapshots/add-field-with-modify.md_merged.snap +++ b/tests/core/snapshots/add-field-with-modify.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/add-field.md_0.snap b/tests/core/snapshots/add-field.md_0.snap index 46dcd8c3b2..309c9484e9 100644 --- a/tests/core/snapshots/add-field.md_0.snap +++ b/tests/core/snapshots/add-field.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/add-field.md_client.snap b/tests/core/snapshots/add-field.md_client.snap index ade40aa4a1..59dc2b31b1 100644 --- a/tests/core/snapshots/add-field.md_client.snap +++ b/tests/core/snapshots/add-field.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Address { geo: Geo diff --git a/tests/core/snapshots/add-field.md_merged.snap b/tests/core/snapshots/add-field.md_merged.snap index 8b39ec30f5..8f31490b9f 100644 --- a/tests/core/snapshots/add-field.md_merged.snap +++ b/tests/core/snapshots/add-field.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/apollo-federation-entities-batch.md_0.snap b/tests/core/snapshots/apollo-federation-entities-batch.md_0.snap index cdd18ea9a9..8530bc6c9e 100644 --- a/tests/core/snapshots/apollo-federation-entities-batch.md_0.snap +++ b/tests/core/snapshots/apollo-federation-entities-batch.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/apollo-federation-entities-batch.md_1.snap b/tests/core/snapshots/apollo-federation-entities-batch.md_1.snap index 53faa2e036..358a041cd5 100644 --- a/tests/core/snapshots/apollo-federation-entities-batch.md_1.snap +++ b/tests/core/snapshots/apollo-federation-entities-batch.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/apollo-federation-entities-batch.md_client.snap b/tests/core/snapshots/apollo-federation-entities-batch.md_client.snap index 240fff3b5b..2f54cc63f9 100644 --- a/tests/core/snapshots/apollo-federation-entities-batch.md_client.snap +++ b/tests/core/snapshots/apollo-federation-entities-batch.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int! diff --git a/tests/core/snapshots/apollo-federation-entities-batch.md_merged.snap b/tests/core/snapshots/apollo-federation-entities-batch.md_merged.snap index 8511079c2c..d85e9f7717 100644 --- a/tests/core/snapshots/apollo-federation-entities-batch.md_merged.snap +++ b/tests/core/snapshots/apollo-federation-entities-batch.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(enableFederation: true, port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/apollo-federation-entities-validation.md_error.snap b/tests/core/snapshots/apollo-federation-entities-validation.md_error.snap index 876c8e3ed9..80fc5eaabe 100644 --- a/tests/core/snapshots/apollo-federation-entities-validation.md_error.snap +++ b/tests/core/snapshots/apollo-federation-entities-validation.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/apollo-federation-entities.md_0.snap b/tests/core/snapshots/apollo-federation-entities.md_0.snap index 071a6837f3..76942f93e3 100644 --- a/tests/core/snapshots/apollo-federation-entities.md_0.snap +++ b/tests/core/snapshots/apollo-federation-entities.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/apollo-federation-entities.md_1.snap b/tests/core/snapshots/apollo-federation-entities.md_1.snap index 53faa2e036..358a041cd5 100644 --- a/tests/core/snapshots/apollo-federation-entities.md_1.snap +++ b/tests/core/snapshots/apollo-federation-entities.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/apollo-federation-entities.md_client.snap b/tests/core/snapshots/apollo-federation-entities.md_client.snap index 240fff3b5b..2f54cc63f9 100644 --- a/tests/core/snapshots/apollo-federation-entities.md_client.snap +++ b/tests/core/snapshots/apollo-federation-entities.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int! diff --git a/tests/core/snapshots/apollo-federation-entities.md_merged.snap b/tests/core/snapshots/apollo-federation-entities.md_merged.snap index dd26a0e9a3..e18bcb796d 100644 --- a/tests/core/snapshots/apollo-federation-entities.md_merged.snap +++ b/tests/core/snapshots/apollo-federation-entities.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(enableFederation: true, port: 8000) diff --git a/tests/core/snapshots/apollo-federation-validation.md_error.snap b/tests/core/snapshots/apollo-federation-validation.md_error.snap index fb321eb5ae..0ecf8a83bd 100644 --- a/tests/core/snapshots/apollo-federation-validation.md_error.snap +++ b/tests/core/snapshots/apollo-federation-validation.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/apollo-tracing.md_0.snap b/tests/core/snapshots/apollo-tracing.md_0.snap index d1aa07b391..24dccb3955 100644 --- a/tests/core/snapshots/apollo-tracing.md_0.snap +++ b/tests/core/snapshots/apollo-tracing.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/apollo-tracing.md_client.snap b/tests/core/snapshots/apollo-tracing.md_client.snap index d07b38f527..3d053758db 100644 --- a/tests/core/snapshots/apollo-tracing.md_client.snap +++ b/tests/core/snapshots/apollo-tracing.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { hello: String! diff --git a/tests/core/snapshots/apollo-tracing.md_merged.snap b/tests/core/snapshots/apollo-tracing.md_merged.snap index 330ab43603..e7ca2b0596 100644 --- a/tests/core/snapshots/apollo-tracing.md_merged.snap +++ b/tests/core/snapshots/apollo-tracing.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/async-cache-disabled.md_0.snap b/tests/core/snapshots/async-cache-disabled.md_0.snap index 96461ffba6..6f5dc445e8 100644 --- a/tests/core/snapshots/async-cache-disabled.md_0.snap +++ b/tests/core/snapshots/async-cache-disabled.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/async-cache-disabled.md_client.snap b/tests/core/snapshots/async-cache-disabled.md_client.snap index ffe1589053..285a44bbfb 100644 --- a/tests/core/snapshots/async-cache-disabled.md_client.snap +++ b/tests/core/snapshots/async-cache-disabled.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/async-cache-disabled.md_merged.snap b/tests/core/snapshots/async-cache-disabled.md_merged.snap index 6fb6ca4f37..19034b2930 100644 --- a/tests/core/snapshots/async-cache-disabled.md_merged.snap +++ b/tests/core/snapshots/async-cache-disabled.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) @upstream { query: Query diff --git a/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_0.snap b/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_0.snap index 5774eaa25a..79cef1ba6a 100644 --- a/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_0.snap +++ b/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_client.snap b/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_client.snap index a1e6771d53..408aa1959f 100644 --- a/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_client.snap +++ b/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_merged.snap b/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_merged.snap index 1b3803ad06..9b23299848 100644 --- a/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_merged.snap +++ b/tests/core/snapshots/async-cache-enable-multiple-resolvers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) @upstream { query: Query diff --git a/tests/core/snapshots/async-cache-enabled.md_0.snap b/tests/core/snapshots/async-cache-enabled.md_0.snap index b2709ed123..0032dadd59 100644 --- a/tests/core/snapshots/async-cache-enabled.md_0.snap +++ b/tests/core/snapshots/async-cache-enabled.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/async-cache-enabled.md_client.snap b/tests/core/snapshots/async-cache-enabled.md_client.snap index fd9e443470..30cf05313b 100644 --- a/tests/core/snapshots/async-cache-enabled.md_client.snap +++ b/tests/core/snapshots/async-cache-enabled.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/async-cache-enabled.md_merged.snap b/tests/core/snapshots/async-cache-enabled.md_merged.snap index 3506d4506b..5a9eaefc3d 100644 --- a/tests/core/snapshots/async-cache-enabled.md_merged.snap +++ b/tests/core/snapshots/async-cache-enabled.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) @upstream { query: Query diff --git a/tests/core/snapshots/async-cache-global.md_0.snap b/tests/core/snapshots/async-cache-global.md_0.snap index 62ed8b07b6..7bd6ff89bb 100644 --- a/tests/core/snapshots/async-cache-global.md_0.snap +++ b/tests/core/snapshots/async-cache-global.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/async-cache-global.md_client.snap b/tests/core/snapshots/async-cache-global.md_client.snap index c48b74aa3d..5335b2d393 100644 --- a/tests/core/snapshots/async-cache-global.md_client.snap +++ b/tests/core/snapshots/async-cache-global.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/async-cache-global.md_merged.snap b/tests/core/snapshots/async-cache-global.md_merged.snap index 628bcda6e6..d753b1f6fa 100644 --- a/tests/core/snapshots/async-cache-global.md_merged.snap +++ b/tests/core/snapshots/async-cache-global.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) @upstream { query: Query diff --git a/tests/core/snapshots/async-cache-inflight-request.md_0.snap b/tests/core/snapshots/async-cache-inflight-request.md_0.snap index b2709ed123..0032dadd59 100644 --- a/tests/core/snapshots/async-cache-inflight-request.md_0.snap +++ b/tests/core/snapshots/async-cache-inflight-request.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/async-cache-inflight-request.md_client.snap b/tests/core/snapshots/async-cache-inflight-request.md_client.snap index fd9e443470..30cf05313b 100644 --- a/tests/core/snapshots/async-cache-inflight-request.md_client.snap +++ b/tests/core/snapshots/async-cache-inflight-request.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/async-cache-inflight-request.md_merged.snap b/tests/core/snapshots/async-cache-inflight-request.md_merged.snap index 3506d4506b..5a9eaefc3d 100644 --- a/tests/core/snapshots/async-cache-inflight-request.md_merged.snap +++ b/tests/core/snapshots/async-cache-inflight-request.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) @upstream { query: Query diff --git a/tests/core/snapshots/auth-basic.md_0.snap b/tests/core/snapshots/auth-basic.md_0.snap index 19966dbd12..60f7ffff7f 100644 --- a/tests/core/snapshots/auth-basic.md_0.snap +++ b/tests/core/snapshots/auth-basic.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-basic.md_3.snap b/tests/core/snapshots/auth-basic.md_3.snap index 5a8bbd2fd3..8a1605ad84 100644 --- a/tests/core/snapshots/auth-basic.md_3.snap +++ b/tests/core/snapshots/auth-basic.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-basic.md_5.snap b/tests/core/snapshots/auth-basic.md_5.snap index 1afd85d51b..48b019c813 100644 --- a/tests/core/snapshots/auth-basic.md_5.snap +++ b/tests/core/snapshots/auth-basic.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-basic.md_client.snap b/tests/core/snapshots/auth-basic.md_client.snap index 4b69aeb528..25d3727b0f 100644 --- a/tests/core/snapshots/auth-basic.md_client.snap +++ b/tests/core/snapshots/auth-basic.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Mutation { protectedType: ProtectedType diff --git a/tests/core/snapshots/auth-basic.md_merged.snap b/tests/core/snapshots/auth-basic.md_merged.snap index 7317c1c588..a7faae5b0f 100644 --- a/tests/core/snapshots/auth-basic.md_merged.snap +++ b/tests/core/snapshots/auth-basic.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) { query: Query diff --git a/tests/core/snapshots/auth-jwt.md_0.snap b/tests/core/snapshots/auth-jwt.md_0.snap index 19966dbd12..60f7ffff7f 100644 --- a/tests/core/snapshots/auth-jwt.md_0.snap +++ b/tests/core/snapshots/auth-jwt.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-jwt.md_2.snap b/tests/core/snapshots/auth-jwt.md_2.snap index 5a8bbd2fd3..8a1605ad84 100644 --- a/tests/core/snapshots/auth-jwt.md_2.snap +++ b/tests/core/snapshots/auth-jwt.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-jwt.md_4.snap b/tests/core/snapshots/auth-jwt.md_4.snap index 1afd85d51b..48b019c813 100644 --- a/tests/core/snapshots/auth-jwt.md_4.snap +++ b/tests/core/snapshots/auth-jwt.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-jwt.md_client.snap b/tests/core/snapshots/auth-jwt.md_client.snap index 4b69aeb528..25d3727b0f 100644 --- a/tests/core/snapshots/auth-jwt.md_client.snap +++ b/tests/core/snapshots/auth-jwt.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Mutation { protectedType: ProtectedType diff --git a/tests/core/snapshots/auth-jwt.md_merged.snap b/tests/core/snapshots/auth-jwt.md_merged.snap index f4d83de801..36e2f512b4 100644 --- a/tests/core/snapshots/auth-jwt.md_merged.snap +++ b/tests/core/snapshots/auth-jwt.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream @link(id: "jwks", src: "jwks.json", type: Jwks) { query: Query diff --git a/tests/core/snapshots/auth-multiple-complex.md_0.snap b/tests/core/snapshots/auth-multiple-complex.md_0.snap index b8378a8700..34235ef4d8 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_0.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_1.snap b/tests/core/snapshots/auth-multiple-complex.md_1.snap index 810687be1d..05850d1bba 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_1.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_2.snap b/tests/core/snapshots/auth-multiple-complex.md_2.snap index 5a69c6e6ca..8987f03180 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_2.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_3.snap b/tests/core/snapshots/auth-multiple-complex.md_3.snap index 5a69c6e6ca..8987f03180 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_3.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_4.snap b/tests/core/snapshots/auth-multiple-complex.md_4.snap index b8378a8700..34235ef4d8 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_4.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_5.snap b/tests/core/snapshots/auth-multiple-complex.md_5.snap index 810687be1d..05850d1bba 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_5.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_6.snap b/tests/core/snapshots/auth-multiple-complex.md_6.snap index c145e53e8d..aad1de9c9d 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_6.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_7.snap b/tests/core/snapshots/auth-multiple-complex.md_7.snap index 759f37b8d7..624b0d894f 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_7.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_7.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_8.snap b/tests/core/snapshots/auth-multiple-complex.md_8.snap index 54359c9181..ba323b762e 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_8.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_8.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple-complex.md_client.snap b/tests/core/snapshots/auth-multiple-complex.md_client.snap index f5c70f34ce..8de999b082 100644 --- a/tests/core/snapshots/auth-multiple-complex.md_client.snap +++ b/tests/core/snapshots/auth-multiple-complex.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- union Animal = Bird | Cat | Dog diff --git a/tests/core/snapshots/auth-multiple.md_1.snap b/tests/core/snapshots/auth-multiple.md_1.snap index 85ddc15b9a..1ccf560169 100644 --- a/tests/core/snapshots/auth-multiple.md_1.snap +++ b/tests/core/snapshots/auth-multiple.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_10.snap b/tests/core/snapshots/auth-multiple.md_10.snap index 3ed3d718ac..c11bd23cd6 100644 --- a/tests/core/snapshots/auth-multiple.md_10.snap +++ b/tests/core/snapshots/auth-multiple.md_10.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_11.snap b/tests/core/snapshots/auth-multiple.md_11.snap index 3ed3d718ac..c11bd23cd6 100644 --- a/tests/core/snapshots/auth-multiple.md_11.snap +++ b/tests/core/snapshots/auth-multiple.md_11.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_12.snap b/tests/core/snapshots/auth-multiple.md_12.snap index 3ed3d718ac..c11bd23cd6 100644 --- a/tests/core/snapshots/auth-multiple.md_12.snap +++ b/tests/core/snapshots/auth-multiple.md_12.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_13.snap b/tests/core/snapshots/auth-multiple.md_13.snap index 3ed3d718ac..c11bd23cd6 100644 --- a/tests/core/snapshots/auth-multiple.md_13.snap +++ b/tests/core/snapshots/auth-multiple.md_13.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_14.snap b/tests/core/snapshots/auth-multiple.md_14.snap index 3ed3d718ac..c11bd23cd6 100644 --- a/tests/core/snapshots/auth-multiple.md_14.snap +++ b/tests/core/snapshots/auth-multiple.md_14.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_5.snap b/tests/core/snapshots/auth-multiple.md_5.snap index 6c9bf317bc..4a8c78140d 100644 --- a/tests/core/snapshots/auth-multiple.md_5.snap +++ b/tests/core/snapshots/auth-multiple.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_6.snap b/tests/core/snapshots/auth-multiple.md_6.snap index cd0c842b9b..59b4abc42b 100644 --- a/tests/core/snapshots/auth-multiple.md_6.snap +++ b/tests/core/snapshots/auth-multiple.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_9.snap b/tests/core/snapshots/auth-multiple.md_9.snap index 3ed3d718ac..c11bd23cd6 100644 --- a/tests/core/snapshots/auth-multiple.md_9.snap +++ b/tests/core/snapshots/auth-multiple.md_9.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/auth-multiple.md_client.snap b/tests/core/snapshots/auth-multiple.md_client.snap index af4690518b..dafe0fd26a 100644 --- a/tests/core/snapshots/auth-multiple.md_client.snap +++ b/tests/core/snapshots/auth-multiple.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { a_and_b: String diff --git a/tests/core/snapshots/auth-protected-without-auth.md_error.snap b/tests/core/snapshots/auth-protected-without-auth.md_error.snap index 7330dede2f..9db8f40243 100644 --- a/tests/core/snapshots/auth-protected-without-auth.md_error.snap +++ b/tests/core/snapshots/auth-protected-without-auth.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/auth-validations.md_error.snap b/tests/core/snapshots/auth-validations.md_error.snap index 19dd962929..b4ea48d8f7 100644 --- a/tests/core/snapshots/auth-validations.md_error.snap +++ b/tests/core/snapshots/auth-validations.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/auth.md_client.snap b/tests/core/snapshots/auth.md_client.snap index 66a444f416..310967ec09 100644 --- a/tests/core/snapshots/auth.md_client.snap +++ b/tests/core/snapshots/auth.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { data: String diff --git a/tests/core/snapshots/auth.md_merged.snap b/tests/core/snapshots/auth.md_merged.snap index 9ad0fc322d..a4c0ba1805 100644 --- a/tests/core/snapshots/auth.md_merged.snap +++ b/tests/core/snapshots/auth.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server diff --git a/tests/core/snapshots/auth_order.md_client.snap b/tests/core/snapshots/auth_order.md_client.snap index 66a444f416..310967ec09 100644 --- a/tests/core/snapshots/auth_order.md_client.snap +++ b/tests/core/snapshots/auth_order.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { data: String diff --git a/tests/core/snapshots/auth_order.md_merged.snap b/tests/core/snapshots/auth_order.md_merged.snap index e53d975500..87d48f1a66 100644 --- a/tests/core/snapshots/auth_order.md_merged.snap +++ b/tests/core/snapshots/auth_order.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) { query: Query diff --git a/tests/core/snapshots/batching-default.md_0.snap b/tests/core/snapshots/batching-default.md_0.snap index f83fd2bba9..2acc507b95 100644 --- a/tests/core/snapshots/batching-default.md_0.snap +++ b/tests/core/snapshots/batching-default.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching-default.md_client.snap b/tests/core/snapshots/batching-default.md_client.snap index fd9e443470..30cf05313b 100644 --- a/tests/core/snapshots/batching-default.md_client.snap +++ b/tests/core/snapshots/batching-default.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/batching-default.md_merged.snap b/tests/core/snapshots/batching-default.md_merged.snap index 2760790e5a..84995c2b57 100644 --- a/tests/core/snapshots/batching-default.md_merged.snap +++ b/tests/core/snapshots/batching-default.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 10, headers: []}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/batching-disabled.md_0.snap b/tests/core/snapshots/batching-disabled.md_0.snap index e8bca1fdcc..fe63cd4831 100644 --- a/tests/core/snapshots/batching-disabled.md_0.snap +++ b/tests/core/snapshots/batching-disabled.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching-disabled.md_client.snap b/tests/core/snapshots/batching-disabled.md_client.snap index 47edbb3102..983973bacd 100644 --- a/tests/core/snapshots/batching-disabled.md_client.snap +++ b/tests/core/snapshots/batching-disabled.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User diff --git a/tests/core/snapshots/batching-disabled.md_merged.snap b/tests/core/snapshots/batching-disabled.md_merged.snap index 3b12a7c11d..381b4ce9d9 100644 --- a/tests/core/snapshots/batching-disabled.md_merged.snap +++ b/tests/core/snapshots/batching-disabled.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 0, headers: [], maxSize: 100}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/batching-group-by-default.md_0.snap b/tests/core/snapshots/batching-group-by-default.md_0.snap index f83fd2bba9..2acc507b95 100644 --- a/tests/core/snapshots/batching-group-by-default.md_0.snap +++ b/tests/core/snapshots/batching-group-by-default.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching-group-by-default.md_client.snap b/tests/core/snapshots/batching-group-by-default.md_client.snap index fd9e443470..30cf05313b 100644 --- a/tests/core/snapshots/batching-group-by-default.md_client.snap +++ b/tests/core/snapshots/batching-group-by-default.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String 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 23b00350fb..8b3c506b4c 100644 --- a/tests/core/snapshots/batching-group-by-default.md_merged.snap +++ b/tests/core/snapshots/batching-group-by-default.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/batching-group-by-optional-key.md_0.snap b/tests/core/snapshots/batching-group-by-optional-key.md_0.snap index 03825cb57b..9a76fbdef8 100644 --- a/tests/core/snapshots/batching-group-by-optional-key.md_0.snap +++ b/tests/core/snapshots/batching-group-by-optional-key.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching-group-by-optional-key.md_client.snap b/tests/core/snapshots/batching-group-by-optional-key.md_client.snap index a8ef80479f..f3aa67a0d8 100644 --- a/tests/core/snapshots/batching-group-by-optional-key.md_client.snap +++ b/tests/core/snapshots/batching-group-by-optional-key.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/batching-group-by-optional-key.md_merged.snap b/tests/core/snapshots/batching-group-by-optional-key.md_merged.snap index c72f004372..59f89eab5a 100644 --- a/tests/core/snapshots/batching-group-by-optional-key.md_merged.snap +++ b/tests/core/snapshots/batching-group-by-optional-key.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) diff --git a/tests/core/snapshots/batching-group-by.md_0.snap b/tests/core/snapshots/batching-group-by.md_0.snap index f83fd2bba9..2acc507b95 100644 --- a/tests/core/snapshots/batching-group-by.md_0.snap +++ b/tests/core/snapshots/batching-group-by.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching-group-by.md_client.snap b/tests/core/snapshots/batching-group-by.md_client.snap index fd9e443470..30cf05313b 100644 --- a/tests/core/snapshots/batching-group-by.md_client.snap +++ b/tests/core/snapshots/batching-group-by.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/batching-group-by.md_merged.snap b/tests/core/snapshots/batching-group-by.md_merged.snap index 840c3b2cb2..73e02720a8 100644 --- a/tests/core/snapshots/batching-group-by.md_merged.snap +++ b/tests/core/snapshots/batching-group-by.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) diff --git a/tests/core/snapshots/batching-post.md_0.snap b/tests/core/snapshots/batching-post.md_0.snap index 43853b4346..044cc851d2 100644 --- a/tests/core/snapshots/batching-post.md_0.snap +++ b/tests/core/snapshots/batching-post.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching-post.md_client.snap b/tests/core/snapshots/batching-post.md_client.snap index fd9e443470..30cf05313b 100644 --- a/tests/core/snapshots/batching-post.md_client.snap +++ b/tests/core/snapshots/batching-post.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/batching-post.md_merged.snap b/tests/core/snapshots/batching-post.md_merged.snap index f98c413920..6a327f1fb0 100644 --- a/tests/core/snapshots/batching-post.md_merged.snap +++ b/tests/core/snapshots/batching-post.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) diff --git a/tests/core/snapshots/batching-validation.md_error.snap b/tests/core/snapshots/batching-validation.md_error.snap index 7c03000416..68d218897f 100644 --- a/tests/core/snapshots/batching-validation.md_error.snap +++ b/tests/core/snapshots/batching-validation.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/batching.md_0.snap b/tests/core/snapshots/batching.md_0.snap index b1a1411d19..ea094e8fb6 100644 --- a/tests/core/snapshots/batching.md_0.snap +++ b/tests/core/snapshots/batching.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching.md_1.snap b/tests/core/snapshots/batching.md_1.snap index 4a83588a1a..3b77c86b75 100644 --- a/tests/core/snapshots/batching.md_1.snap +++ b/tests/core/snapshots/batching.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching.md_2.snap b/tests/core/snapshots/batching.md_2.snap index 2d278c54f5..7cb398ac8b 100644 --- a/tests/core/snapshots/batching.md_2.snap +++ b/tests/core/snapshots/batching.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/batching.md_client.snap b/tests/core/snapshots/batching.md_client.snap index 52d67b233a..e7241293e9 100644 --- a/tests/core/snapshots/batching.md_client.snap +++ b/tests/core/snapshots/batching.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/batching.md_merged.snap b/tests/core/snapshots/batching.md_merged.snap index ea42772fad..ed80eff673 100644 --- a/tests/core/snapshots/batching.md_merged.snap +++ b/tests/core/snapshots/batching.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(batchRequests: true) @upstream { query: Query diff --git a/tests/core/snapshots/body-batching-cases.md_0.snap b/tests/core/snapshots/body-batching-cases.md_0.snap index cd99803cc2..c065aa5471 100644 --- a/tests/core/snapshots/body-batching-cases.md_0.snap +++ b/tests/core/snapshots/body-batching-cases.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/body-batching-cases.md_1.snap b/tests/core/snapshots/body-batching-cases.md_1.snap index c555390e10..141d28fb60 100644 --- a/tests/core/snapshots/body-batching-cases.md_1.snap +++ b/tests/core/snapshots/body-batching-cases.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/body-batching-cases.md_2.snap b/tests/core/snapshots/body-batching-cases.md_2.snap index 3957e2c1a4..c89aaefc44 100644 --- a/tests/core/snapshots/body-batching-cases.md_2.snap +++ b/tests/core/snapshots/body-batching-cases.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/body-batching-cases.md_client.snap b/tests/core/snapshots/body-batching-cases.md_client.snap index 2c8ce93782..c6c47a3db1 100644 --- a/tests/core/snapshots/body-batching-cases.md_client.snap +++ b/tests/core/snapshots/body-batching-cases.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { a: Int diff --git a/tests/core/snapshots/body-batching-cases.md_merged.snap b/tests/core/snapshots/body-batching-cases.md_merged.snap index a546176af5..776650bab0 100644 --- a/tests/core/snapshots/body-batching-cases.md_merged.snap +++ b/tests/core/snapshots/body-batching-cases.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream(batch: {delay: 1, headers: []}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/body-batching.md_0.snap b/tests/core/snapshots/body-batching.md_0.snap index ab8ac6b554..2505c26109 100644 --- a/tests/core/snapshots/body-batching.md_0.snap +++ b/tests/core/snapshots/body-batching.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/body-batching.md_1.snap b/tests/core/snapshots/body-batching.md_1.snap index ec1863ee43..e167446553 100644 --- a/tests/core/snapshots/body-batching.md_1.snap +++ b/tests/core/snapshots/body-batching.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/body-batching.md_client.snap b/tests/core/snapshots/body-batching.md_client.snap index 92f94eba7f..d7a434694d 100644 --- a/tests/core/snapshots/body-batching.md_client.snap +++ b/tests/core/snapshots/body-batching.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Comment { id: Int diff --git a/tests/core/snapshots/body-batching.md_merged.snap b/tests/core/snapshots/body-batching.md_merged.snap index 3c4b7a45b6..4818a68eee 100644 --- a/tests/core/snapshots/body-batching.md_merged.snap +++ b/tests/core/snapshots/body-batching.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) diff --git a/tests/core/snapshots/cache-control.md_0.snap b/tests/core/snapshots/cache-control.md_0.snap index c3c2762363..170cdf8572 100644 --- a/tests/core/snapshots/cache-control.md_0.snap +++ b/tests/core/snapshots/cache-control.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/cache-control.md_1.snap b/tests/core/snapshots/cache-control.md_1.snap index c84152761a..6ec04a82a1 100644 --- a/tests/core/snapshots/cache-control.md_1.snap +++ b/tests/core/snapshots/cache-control.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/cache-control.md_2.snap b/tests/core/snapshots/cache-control.md_2.snap index 5ca46d4fd2..126be71c6a 100644 --- a/tests/core/snapshots/cache-control.md_2.snap +++ b/tests/core/snapshots/cache-control.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/cache-control.md_3.snap b/tests/core/snapshots/cache-control.md_3.snap index 33705363d3..1ff49d5f10 100644 --- a/tests/core/snapshots/cache-control.md_3.snap +++ b/tests/core/snapshots/cache-control.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/cache-control.md_client.snap b/tests/core/snapshots/cache-control.md_client.snap index 5e9fd2fa39..455588a80b 100644 --- a/tests/core/snapshots/cache-control.md_client.snap +++ b/tests/core/snapshots/cache-control.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int): User diff --git a/tests/core/snapshots/cache-control.md_merged.snap b/tests/core/snapshots/cache-control.md_merged.snap index cb766383ea..d9e977c16d 100644 --- a/tests/core/snapshots/cache-control.md_merged.snap +++ b/tests/core/snapshots/cache-control.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(headers: {cacheControl: true}) @upstream { query: Query diff --git a/tests/core/snapshots/caching-collision.md_0.snap b/tests/core/snapshots/caching-collision.md_0.snap index 78dc9d88b8..2c2832002c 100644 --- a/tests/core/snapshots/caching-collision.md_0.snap +++ b/tests/core/snapshots/caching-collision.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/caching-collision.md_client.snap b/tests/core/snapshots/caching-collision.md_client.snap index 8b73880b37..d3c71c98af 100644 --- a/tests/core/snapshots/caching-collision.md_client.snap +++ b/tests/core/snapshots/caching-collision.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { foo: Foo diff --git a/tests/core/snapshots/caching-collision.md_merged.snap b/tests/core/snapshots/caching-collision.md_merged.snap index b79b449f74..e87b1e063a 100644 --- a/tests/core/snapshots/caching-collision.md_merged.snap +++ b/tests/core/snapshots/caching-collision.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) { query: Query diff --git a/tests/core/snapshots/caching.md_0.snap b/tests/core/snapshots/caching.md_0.snap index 2121b43f17..ce24a8f5cf 100644 --- a/tests/core/snapshots/caching.md_0.snap +++ b/tests/core/snapshots/caching.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/caching.md_1.snap b/tests/core/snapshots/caching.md_1.snap index 40625200f5..e1280db53a 100644 --- a/tests/core/snapshots/caching.md_1.snap +++ b/tests/core/snapshots/caching.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/caching.md_2.snap b/tests/core/snapshots/caching.md_2.snap index 40625200f5..e1280db53a 100644 --- a/tests/core/snapshots/caching.md_2.snap +++ b/tests/core/snapshots/caching.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/caching.md_client.snap b/tests/core/snapshots/caching.md_client.snap index 5fc689497a..f1806a34d5 100644 --- a/tests/core/snapshots/caching.md_client.snap +++ b/tests/core/snapshots/caching.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { fieldCache: Type diff --git a/tests/core/snapshots/caching.md_merged.snap b/tests/core/snapshots/caching.md_merged.snap index 120fca795d..393125bad6 100644 --- a/tests/core/snapshots/caching.md_merged.snap +++ b/tests/core/snapshots/caching.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) { query: Query diff --git a/tests/core/snapshots/call-graphql-datasource.md_0.snap b/tests/core/snapshots/call-graphql-datasource.md_0.snap index b4420e10c7..cdcd20d61f 100644 --- a/tests/core/snapshots/call-graphql-datasource.md_0.snap +++ b/tests/core/snapshots/call-graphql-datasource.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-graphql-datasource.md_client.snap b/tests/core/snapshots/call-graphql-datasource.md_client.snap index 65c726c3dd..e7f490418f 100644 --- a/tests/core/snapshots/call-graphql-datasource.md_client.snap +++ b/tests/core/snapshots/call-graphql-datasource.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String! diff --git a/tests/core/snapshots/call-graphql-datasource.md_merged.snap b/tests/core/snapshots/call-graphql-datasource.md_merged.snap index 391f71c593..c37609aaf3 100644 --- a/tests/core/snapshots/call-graphql-datasource.md_merged.snap +++ b/tests/core/snapshots/call-graphql-datasource.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/call-multiple-steps-piping.md_0.snap b/tests/core/snapshots/call-multiple-steps-piping.md_0.snap index dc07f0ac53..72e6ed2385 100644 --- a/tests/core/snapshots/call-multiple-steps-piping.md_0.snap +++ b/tests/core/snapshots/call-multiple-steps-piping.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-multiple-steps-piping.md_1.snap b/tests/core/snapshots/call-multiple-steps-piping.md_1.snap index dcd399b30f..2e38fb1d90 100644 --- a/tests/core/snapshots/call-multiple-steps-piping.md_1.snap +++ b/tests/core/snapshots/call-multiple-steps-piping.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-multiple-steps-piping.md_client.snap b/tests/core/snapshots/call-multiple-steps-piping.md_client.snap index 32cb3a821c..00d1931a3d 100644 --- a/tests/core/snapshots/call-multiple-steps-piping.md_client.snap +++ b/tests/core/snapshots/call-multiple-steps-piping.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar JSON 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 64fce1675f..2c8904f528 100644 --- a/tests/core/snapshots/call-multiple-steps-piping.md_merged.snap +++ b/tests/core/snapshots/call-multiple-steps-piping.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/call-mutation.md_0.snap b/tests/core/snapshots/call-mutation.md_0.snap index a0b72d835b..4f1b70831d 100644 --- a/tests/core/snapshots/call-mutation.md_0.snap +++ b/tests/core/snapshots/call-mutation.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-mutation.md_1.snap b/tests/core/snapshots/call-mutation.md_1.snap index ac831dbf76..bc6826d3d3 100644 --- a/tests/core/snapshots/call-mutation.md_1.snap +++ b/tests/core/snapshots/call-mutation.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-mutation.md_2.snap b/tests/core/snapshots/call-mutation.md_2.snap index e2c0d0eb8a..922ea11f26 100644 --- a/tests/core/snapshots/call-mutation.md_2.snap +++ b/tests/core/snapshots/call-mutation.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-mutation.md_3.snap b/tests/core/snapshots/call-mutation.md_3.snap index 2e8dd036cd..297588d29e 100644 --- a/tests/core/snapshots/call-mutation.md_3.snap +++ b/tests/core/snapshots/call-mutation.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-mutation.md_4.snap b/tests/core/snapshots/call-mutation.md_4.snap index e082082e7d..e0213a8e98 100644 --- a/tests/core/snapshots/call-mutation.md_4.snap +++ b/tests/core/snapshots/call-mutation.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-mutation.md_client.snap b/tests/core/snapshots/call-mutation.md_client.snap index 81e7e3b2d7..639edd557e 100644 --- a/tests/core/snapshots/call-mutation.md_client.snap +++ b/tests/core/snapshots/call-mutation.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Mutation { attachPostToFirstUser(postId: Int!): User diff --git a/tests/core/snapshots/call-mutation.md_merged.snap b/tests/core/snapshots/call-mutation.md_merged.snap index 2123be8662..1aa6696906 100644 --- a/tests/core/snapshots/call-mutation.md_merged.snap +++ b/tests/core/snapshots/call-mutation.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/call-operator.md_0.snap b/tests/core/snapshots/call-operator.md_0.snap index 70bb1cdebb..e440a185b2 100644 --- a/tests/core/snapshots/call-operator.md_0.snap +++ b/tests/core/snapshots/call-operator.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_1.snap b/tests/core/snapshots/call-operator.md_1.snap index 8b3a950db1..a1386b374b 100644 --- a/tests/core/snapshots/call-operator.md_1.snap +++ b/tests/core/snapshots/call-operator.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_10.snap b/tests/core/snapshots/call-operator.md_10.snap index 87b277bf3c..918899e206 100644 --- a/tests/core/snapshots/call-operator.md_10.snap +++ b/tests/core/snapshots/call-operator.md_10.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_11.snap b/tests/core/snapshots/call-operator.md_11.snap index e90dc644de..b44bb8e5eb 100644 --- a/tests/core/snapshots/call-operator.md_11.snap +++ b/tests/core/snapshots/call-operator.md_11.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_12.snap b/tests/core/snapshots/call-operator.md_12.snap index c37773a9b8..03c8299b71 100644 --- a/tests/core/snapshots/call-operator.md_12.snap +++ b/tests/core/snapshots/call-operator.md_12.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_2.snap b/tests/core/snapshots/call-operator.md_2.snap index cd98048d91..77c25b94ac 100644 --- a/tests/core/snapshots/call-operator.md_2.snap +++ b/tests/core/snapshots/call-operator.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_3.snap b/tests/core/snapshots/call-operator.md_3.snap index 00eff50b9a..f1fbcb7e23 100644 --- a/tests/core/snapshots/call-operator.md_3.snap +++ b/tests/core/snapshots/call-operator.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_4.snap b/tests/core/snapshots/call-operator.md_4.snap index 00eff50b9a..f1fbcb7e23 100644 --- a/tests/core/snapshots/call-operator.md_4.snap +++ b/tests/core/snapshots/call-operator.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_5.snap b/tests/core/snapshots/call-operator.md_5.snap index 806ab8a84d..8fd40e8d49 100644 --- a/tests/core/snapshots/call-operator.md_5.snap +++ b/tests/core/snapshots/call-operator.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_6.snap b/tests/core/snapshots/call-operator.md_6.snap index 660a3716c6..caf50ad9ed 100644 --- a/tests/core/snapshots/call-operator.md_6.snap +++ b/tests/core/snapshots/call-operator.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_7.snap b/tests/core/snapshots/call-operator.md_7.snap index 226a9c3e3a..bc2a039177 100644 --- a/tests/core/snapshots/call-operator.md_7.snap +++ b/tests/core/snapshots/call-operator.md_7.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_8.snap b/tests/core/snapshots/call-operator.md_8.snap index 555ce24bfc..ad34d04c3e 100644 --- a/tests/core/snapshots/call-operator.md_8.snap +++ b/tests/core/snapshots/call-operator.md_8.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_9.snap b/tests/core/snapshots/call-operator.md_9.snap index f4f2990d59..29091d9912 100644 --- a/tests/core/snapshots/call-operator.md_9.snap +++ b/tests/core/snapshots/call-operator.md_9.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/call-operator.md_client.snap b/tests/core/snapshots/call-operator.md_client.snap index b45a50d9a7..bdd9934d15 100644 --- a/tests/core/snapshots/call-operator.md_client.snap +++ b/tests/core/snapshots/call-operator.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { body: String diff --git a/tests/core/snapshots/call-operator.md_merged.snap b/tests/core/snapshots/call-operator.md_merged.snap index 52aa9cb5d6..f21b1bec91 100644 --- a/tests/core/snapshots/call-operator.md_merged.snap +++ b/tests/core/snapshots/call-operator.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) diff --git a/tests/core/snapshots/cors-allow-cred-false.md_0.snap b/tests/core/snapshots/cors-allow-cred-false.md_0.snap index 396411301d..d5158a7e06 100644 --- a/tests/core/snapshots/cors-allow-cred-false.md_0.snap +++ b/tests/core/snapshots/cors-allow-cred-false.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/cors-allow-cred-false.md_client.snap b/tests/core/snapshots/cors-allow-cred-false.md_client.snap index 90ef607f77..6367b0cf96 100644 --- a/tests/core/snapshots/cors-allow-cred-false.md_client.snap +++ b/tests/core/snapshots/cors-allow-cred-false.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { val: Int 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 2105c4fc1d..563575f96f 100644 --- a/tests/core/snapshots/cors-allow-cred-false.md_merged.snap +++ b/tests/core/snapshots/cors-allow-cred-false.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server( diff --git a/tests/core/snapshots/cors-allow-cred-true.md_0.snap b/tests/core/snapshots/cors-allow-cred-true.md_0.snap index 0d277c5d44..05235a8f70 100644 --- a/tests/core/snapshots/cors-allow-cred-true.md_0.snap +++ b/tests/core/snapshots/cors-allow-cred-true.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/cors-allow-cred-true.md_client.snap b/tests/core/snapshots/cors-allow-cred-true.md_client.snap index 90ef607f77..6367b0cf96 100644 --- a/tests/core/snapshots/cors-allow-cred-true.md_client.snap +++ b/tests/core/snapshots/cors-allow-cred-true.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { val: Int 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 772c09bada..214ac18c0e 100644 --- a/tests/core/snapshots/cors-allow-cred-true.md_merged.snap +++ b/tests/core/snapshots/cors-allow-cred-true.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server( diff --git a/tests/core/snapshots/cors-allow-cred-vary.md_0.snap b/tests/core/snapshots/cors-allow-cred-vary.md_0.snap index 027484ed4f..7c0af0d2bf 100644 --- a/tests/core/snapshots/cors-allow-cred-vary.md_0.snap +++ b/tests/core/snapshots/cors-allow-cred-vary.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/cors-allow-cred-vary.md_client.snap b/tests/core/snapshots/cors-allow-cred-vary.md_client.snap index 90ef607f77..6367b0cf96 100644 --- a/tests/core/snapshots/cors-allow-cred-vary.md_client.snap +++ b/tests/core/snapshots/cors-allow-cred-vary.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { val: Int 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 772c09bada..214ac18c0e 100644 --- a/tests/core/snapshots/cors-allow-cred-vary.md_merged.snap +++ b/tests/core/snapshots/cors-allow-cred-vary.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server( diff --git a/tests/core/snapshots/cors-invalid-expose-headers.md_error.snap b/tests/core/snapshots/cors-invalid-expose-headers.md_error.snap index 746e69d015..3a48ece312 100644 --- a/tests/core/snapshots/cors-invalid-expose-headers.md_error.snap +++ b/tests/core/snapshots/cors-invalid-expose-headers.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/cors-invalid-headers.md_error.snap b/tests/core/snapshots/cors-invalid-headers.md_error.snap index 581594e0b9..220bba772d 100644 --- a/tests/core/snapshots/cors-invalid-headers.md_error.snap +++ b/tests/core/snapshots/cors-invalid-headers.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/cors-invalid-methods.md_error.snap b/tests/core/snapshots/cors-invalid-methods.md_error.snap index f4c9b4b2f7..2d23f1ccaa 100644 --- a/tests/core/snapshots/cors-invalid-methods.md_error.snap +++ b/tests/core/snapshots/cors-invalid-methods.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/cors-invalid-origins.md_error.snap b/tests/core/snapshots/cors-invalid-origins.md_error.snap index d8799954bb..1d3683d6a9 100644 --- a/tests/core/snapshots/cors-invalid-origins.md_error.snap +++ b/tests/core/snapshots/cors-invalid-origins.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/custom-headers.md_0.snap b/tests/core/snapshots/custom-headers.md_0.snap index 4dc49a862b..924096b6bc 100644 --- a/tests/core/snapshots/custom-headers.md_0.snap +++ b/tests/core/snapshots/custom-headers.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/custom-headers.md_client.snap b/tests/core/snapshots/custom-headers.md_client.snap index e749432d28..dfc1b5f0a0 100644 --- a/tests/core/snapshots/custom-headers.md_client.snap +++ b/tests/core/snapshots/custom-headers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { greet: String diff --git a/tests/core/snapshots/custom-headers.md_merged.snap b/tests/core/snapshots/custom-headers.md_merged.snap index 6a061abf08..2c70e18cae 100644 --- a/tests/core/snapshots/custom-headers.md_merged.snap +++ b/tests/core/snapshots/custom-headers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(headers: {custom: [{key: "x-id", value: "1"}, {key: "x-name", value: "John Doe"}]}) @upstream { query: Query diff --git a/tests/core/snapshots/custom-scalars.md_0.snap b/tests/core/snapshots/custom-scalars.md_0.snap index 8fee86ee58..b24ba203d6 100644 --- a/tests/core/snapshots/custom-scalars.md_0.snap +++ b/tests/core/snapshots/custom-scalars.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/custom-scalars.md_client.snap b/tests/core/snapshots/custom-scalars.md_client.snap index 4c487138d6..33106fe43a 100644 --- a/tests/core/snapshots/custom-scalars.md_client.snap +++ b/tests/core/snapshots/custom-scalars.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar Bytes diff --git a/tests/core/snapshots/custom-scalars.md_merged.snap b/tests/core/snapshots/custom-scalars.md_merged.snap index 689a424bae..c40ea49cdf 100644 --- a/tests/core/snapshots/custom-scalars.md_merged.snap +++ b/tests/core/snapshots/custom-scalars.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/dedupe_batch_query_execution.md_0.snap b/tests/core/snapshots/dedupe_batch_query_execution.md_0.snap index 62ed8b07b6..7bd6ff89bb 100644 --- a/tests/core/snapshots/dedupe_batch_query_execution.md_0.snap +++ b/tests/core/snapshots/dedupe_batch_query_execution.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/dedupe_batch_query_execution.md_client.snap b/tests/core/snapshots/dedupe_batch_query_execution.md_client.snap index c48b74aa3d..5335b2d393 100644 --- a/tests/core/snapshots/dedupe_batch_query_execution.md_client.snap +++ b/tests/core/snapshots/dedupe_batch_query_execution.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/dedupe_batch_query_execution.md_merged.snap b/tests/core/snapshots/dedupe_batch_query_execution.md_merged.snap index 628bcda6e6..d753b1f6fa 100644 --- a/tests/core/snapshots/dedupe_batch_query_execution.md_merged.snap +++ b/tests/core/snapshots/dedupe_batch_query_execution.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, queryValidation: false) @upstream { query: Query diff --git a/tests/core/snapshots/default-value-arg.md_0.snap b/tests/core/snapshots/default-value-arg.md_0.snap index c3d9995606..fa74ccec1c 100644 --- a/tests/core/snapshots/default-value-arg.md_0.snap +++ b/tests/core/snapshots/default-value-arg.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/default-value-arg.md_1.snap b/tests/core/snapshots/default-value-arg.md_1.snap index 7fb28bfef9..08e3f81dcc 100644 --- a/tests/core/snapshots/default-value-arg.md_1.snap +++ b/tests/core/snapshots/default-value-arg.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/default-value-arg.md_client.snap b/tests/core/snapshots/default-value-arg.md_client.snap index 2d58111153..059f218b96 100644 --- a/tests/core/snapshots/default-value-arg.md_client.snap +++ b/tests/core/snapshots/default-value-arg.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input Input { id: Int! diff --git a/tests/core/snapshots/default-value-arg.md_merged.snap b/tests/core/snapshots/default-value-arg.md_merged.snap index 2603c4c8a4..8486447f4d 100644 --- a/tests/core/snapshots/default-value-arg.md_merged.snap +++ b/tests/core/snapshots/default-value-arg.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/default-value-config.md_client.snap b/tests/core/snapshots/default-value-config.md_client.snap index 1a5111fb83..e783427e31 100644 --- a/tests/core/snapshots/default-value-config.md_client.snap +++ b/tests/core/snapshots/default-value-config.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input Input { id: Int = 1 diff --git a/tests/core/snapshots/default-value-config.md_merged.snap b/tests/core/snapshots/default-value-config.md_merged.snap index b0ca4d47d7..c0a2a87b4b 100644 --- a/tests/core/snapshots/default-value-config.md_merged.snap +++ b/tests/core/snapshots/default-value-config.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/enum-args.md_0.snap b/tests/core/snapshots/enum-args.md_0.snap index 3b976af00b..8cb62c20a8 100644 --- a/tests/core/snapshots/enum-args.md_0.snap +++ b/tests/core/snapshots/enum-args.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/enum-args.md_client.snap b/tests/core/snapshots/enum-args.md_client.snap index 0372f32e76..3c3aa974d6 100644 --- a/tests/core/snapshots/enum-args.md_client.snap +++ b/tests/core/snapshots/enum-args.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- enum COLOR { BLUE diff --git a/tests/core/snapshots/enum-args.md_merged.snap b/tests/core/snapshots/enum-args.md_merged.snap index 1b707cab39..4abfde83d2 100644 --- a/tests/core/snapshots/enum-args.md_merged.snap +++ b/tests/core/snapshots/enum-args.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/env-value.md_0.snap b/tests/core/snapshots/env-value.md_0.snap index 2c2d8a3107..2c3eb64a6c 100644 --- a/tests/core/snapshots/env-value.md_0.snap +++ b/tests/core/snapshots/env-value.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/env-value.md_client.snap b/tests/core/snapshots/env-value.md_client.snap index 3ecc060530..9320b62afd 100644 --- a/tests/core/snapshots/env-value.md_client.snap +++ b/tests/core/snapshots/env-value.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/env-value.md_merged.snap b/tests/core/snapshots/env-value.md_merged.snap index 0a7f593d45..7098abde18 100644 --- a/tests/core/snapshots/env-value.md_merged.snap +++ b/tests/core/snapshots/env-value.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/experimental-headers-error.md_error.snap b/tests/core/snapshots/experimental-headers-error.md_error.snap index ec99849386..936af28fe8 100644 --- a/tests/core/snapshots/experimental-headers-error.md_error.snap +++ b/tests/core/snapshots/experimental-headers-error.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/experimental-headers.md_0.snap b/tests/core/snapshots/experimental-headers.md_0.snap index 559c15b572..79e632be1b 100644 --- a/tests/core/snapshots/experimental-headers.md_0.snap +++ b/tests/core/snapshots/experimental-headers.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/experimental-headers.md_client.snap b/tests/core/snapshots/experimental-headers.md_client.snap index 9f6354f50d..ce382b2ba5 100644 --- a/tests/core/snapshots/experimental-headers.md_client.snap +++ b/tests/core/snapshots/experimental-headers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { users: [User] diff --git a/tests/core/snapshots/experimental-headers.md_merged.snap b/tests/core/snapshots/experimental-headers.md_merged.snap index 21ea54563b..523d454de4 100644 --- a/tests/core/snapshots/experimental-headers.md_merged.snap +++ b/tests/core/snapshots/experimental-headers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(headers: {experimental: ["X-experimental", "x-tailcall"]}) @upstream { query: Query diff --git a/tests/core/snapshots/federation-subgraph-force-disabled.md_0.snap b/tests/core/snapshots/federation-subgraph-force-disabled.md_0.snap index 661accca7b..279fcf6e75 100644 --- a/tests/core/snapshots/federation-subgraph-force-disabled.md_0.snap +++ b/tests/core/snapshots/federation-subgraph-force-disabled.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/federation-subgraph-force-disabled.md_1.snap b/tests/core/snapshots/federation-subgraph-force-disabled.md_1.snap index 661accca7b..279fcf6e75 100644 --- a/tests/core/snapshots/federation-subgraph-force-disabled.md_1.snap +++ b/tests/core/snapshots/federation-subgraph-force-disabled.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/federation-subgraph-force-disabled.md_client.snap b/tests/core/snapshots/federation-subgraph-force-disabled.md_client.snap index f0cf6e9796..627d54d3cb 100644 --- a/tests/core/snapshots/federation-subgraph-force-disabled.md_client.snap +++ b/tests/core/snapshots/federation-subgraph-force-disabled.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User diff --git a/tests/core/snapshots/federation-subgraph-force-disabled.md_merged.snap b/tests/core/snapshots/federation-subgraph-force-disabled.md_merged.snap index 181c9e7a12..dbc35e22c5 100644 --- a/tests/core/snapshots/federation-subgraph-force-disabled.md_merged.snap +++ b/tests/core/snapshots/federation-subgraph-force-disabled.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(enableFederation: false, port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/federation-subgraph-force-enabled.md_0.snap b/tests/core/snapshots/federation-subgraph-force-enabled.md_0.snap index 661accca7b..279fcf6e75 100644 --- a/tests/core/snapshots/federation-subgraph-force-enabled.md_0.snap +++ b/tests/core/snapshots/federation-subgraph-force-enabled.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/federation-subgraph-force-enabled.md_1.snap b/tests/core/snapshots/federation-subgraph-force-enabled.md_1.snap index 3de0e06d04..a9d9f3e09d 100644 --- a/tests/core/snapshots/federation-subgraph-force-enabled.md_1.snap +++ b/tests/core/snapshots/federation-subgraph-force-enabled.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/federation-subgraph-force-enabled.md_client.snap b/tests/core/snapshots/federation-subgraph-force-enabled.md_client.snap index 607627ad6e..83206884c7 100644 --- a/tests/core/snapshots/federation-subgraph-force-enabled.md_client.snap +++ b/tests/core/snapshots/federation-subgraph-force-enabled.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { """ diff --git a/tests/core/snapshots/federation-subgraph-force-enabled.md_merged.snap b/tests/core/snapshots/federation-subgraph-force-enabled.md_merged.snap index ce491b9ef6..c9e0056ba0 100644 --- a/tests/core/snapshots/federation-subgraph-force-enabled.md_merged.snap +++ b/tests/core/snapshots/federation-subgraph-force-enabled.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(enableFederation: true, port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/federation-subgraph-no-entities.md_0.snap b/tests/core/snapshots/federation-subgraph-no-entities.md_0.snap index 661accca7b..279fcf6e75 100644 --- a/tests/core/snapshots/federation-subgraph-no-entities.md_0.snap +++ b/tests/core/snapshots/federation-subgraph-no-entities.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/federation-subgraph-no-entities.md_1.snap b/tests/core/snapshots/federation-subgraph-no-entities.md_1.snap index 661accca7b..279fcf6e75 100644 --- a/tests/core/snapshots/federation-subgraph-no-entities.md_1.snap +++ b/tests/core/snapshots/federation-subgraph-no-entities.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/federation-subgraph-no-entities.md_client.snap b/tests/core/snapshots/federation-subgraph-no-entities.md_client.snap index f0cf6e9796..627d54d3cb 100644 --- a/tests/core/snapshots/federation-subgraph-no-entities.md_client.snap +++ b/tests/core/snapshots/federation-subgraph-no-entities.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User diff --git a/tests/core/snapshots/federation-subgraph-no-entities.md_merged.snap b/tests/core/snapshots/federation-subgraph-no-entities.md_merged.snap index 0446b75947..c51133fa15 100644 --- a/tests/core/snapshots/federation-subgraph-no-entities.md_merged.snap +++ b/tests/core/snapshots/federation-subgraph-no-entities.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-001.md_0.snap b/tests/core/snapshots/graphql-conformance-001.md_0.snap index 1e1d93fa3a..380ff38f7c 100644 --- a/tests/core/snapshots/graphql-conformance-001.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-001.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-001.md_1.snap b/tests/core/snapshots/graphql-conformance-001.md_1.snap index 275bc566d0..a3d7b06b20 100644 --- a/tests/core/snapshots/graphql-conformance-001.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-001.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-001.md_2.snap b/tests/core/snapshots/graphql-conformance-001.md_2.snap index ecc91653fd..cb1fc60cd3 100644 --- a/tests/core/snapshots/graphql-conformance-001.md_2.snap +++ b/tests/core/snapshots/graphql-conformance-001.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-001.md_3.snap b/tests/core/snapshots/graphql-conformance-001.md_3.snap index 2cc5607f01..61460074e4 100644 --- a/tests/core/snapshots/graphql-conformance-001.md_3.snap +++ b/tests/core/snapshots/graphql-conformance-001.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-001.md_4.snap b/tests/core/snapshots/graphql-conformance-001.md_4.snap index 13997f40e9..f2b4762c8a 100644 --- a/tests/core/snapshots/graphql-conformance-001.md_4.snap +++ b/tests/core/snapshots/graphql-conformance-001.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-001.md_client.snap b/tests/core/snapshots/graphql-conformance-001.md_client.snap index fe68975d19..2e759f3b7c 100644 --- a/tests/core/snapshots/graphql-conformance-001.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-001.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-001.md_merged.snap b/tests/core/snapshots/graphql-conformance-001.md_merged.snap index 1e9172d87d..a28dcd3c81 100644 --- a/tests/core/snapshots/graphql-conformance-001.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-001.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-003.md_0.snap b/tests/core/snapshots/graphql-conformance-003.md_0.snap index e2ef14ebd5..6099be43df 100644 --- a/tests/core/snapshots/graphql-conformance-003.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-003.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-003.md_1.snap b/tests/core/snapshots/graphql-conformance-003.md_1.snap index 2cc5f40539..7cd1d6647e 100644 --- a/tests/core/snapshots/graphql-conformance-003.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-003.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-003.md_client.snap b/tests/core/snapshots/graphql-conformance-003.md_client.snap index cb05e461f7..987a81bf82 100644 --- a/tests/core/snapshots/graphql-conformance-003.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-003.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-003.md_merged.snap b/tests/core/snapshots/graphql-conformance-003.md_merged.snap index 5936d93fac..4a492f6d1f 100644 --- a/tests/core/snapshots/graphql-conformance-003.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-003.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-010.md_0.snap b/tests/core/snapshots/graphql-conformance-010.md_0.snap index b0703e0d4e..3dc744ed82 100644 --- a/tests/core/snapshots/graphql-conformance-010.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-010.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-010.md_1.snap b/tests/core/snapshots/graphql-conformance-010.md_1.snap index b0703e0d4e..3dc744ed82 100644 --- a/tests/core/snapshots/graphql-conformance-010.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-010.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-010.md_client.snap b/tests/core/snapshots/graphql-conformance-010.md_client.snap index a8a2a67c6c..f375d83f86 100644 --- a/tests/core/snapshots/graphql-conformance-010.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-010.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Location { lat: Int! diff --git a/tests/core/snapshots/graphql-conformance-010.md_merged.snap b/tests/core/snapshots/graphql-conformance-010.md_merged.snap index 8d51398c20..742a9a8290 100644 --- a/tests/core/snapshots/graphql-conformance-010.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-010.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-013.md_0.snap b/tests/core/snapshots/graphql-conformance-013.md_0.snap index f48d074d00..f182201d7f 100644 --- a/tests/core/snapshots/graphql-conformance-013.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-013.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-013.md_client.snap b/tests/core/snapshots/graphql-conformance-013.md_client.snap index 6d42200537..a5ce7809f1 100644 --- a/tests/core/snapshots/graphql-conformance-013.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-013.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar Date diff --git a/tests/core/snapshots/graphql-conformance-013.md_merged.snap b/tests/core/snapshots/graphql-conformance-013.md_merged.snap index 3daa957b60..5d4857500c 100644 --- a/tests/core/snapshots/graphql-conformance-013.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-013.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-014.md_0.snap b/tests/core/snapshots/graphql-conformance-014.md_0.snap index e6efc64331..9f520416ce 100644 --- a/tests/core/snapshots/graphql-conformance-014.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-014.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-014.md_1.snap b/tests/core/snapshots/graphql-conformance-014.md_1.snap index 85143a1efb..5af023abeb 100644 --- a/tests/core/snapshots/graphql-conformance-014.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-014.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-014.md_client.snap b/tests/core/snapshots/graphql-conformance-014.md_client.snap index fe68975d19..2e759f3b7c 100644 --- a/tests/core/snapshots/graphql-conformance-014.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-014.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-014.md_merged.snap b/tests/core/snapshots/graphql-conformance-014.md_merged.snap index 1e9172d87d..a28dcd3c81 100644 --- a/tests/core/snapshots/graphql-conformance-014.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-014.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-015.md_0.snap b/tests/core/snapshots/graphql-conformance-015.md_0.snap index b4f7ff70a1..1b8596d04b 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_1.snap b/tests/core/snapshots/graphql-conformance-015.md_1.snap index 7217296fd3..df6d21c5ab 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_11.snap b/tests/core/snapshots/graphql-conformance-015.md_11.snap index a24ffcbc5d..aa1d127cfd 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_11.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_11.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_2.snap b/tests/core/snapshots/graphql-conformance-015.md_2.snap index cdb5df7fc9..cdf95c2973 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_2.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_3.snap b/tests/core/snapshots/graphql-conformance-015.md_3.snap index ace07bd203..0e28b7d401 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_3.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_4.snap b/tests/core/snapshots/graphql-conformance-015.md_4.snap index e586519b7b..82efcf907d 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_4.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_5.snap b/tests/core/snapshots/graphql-conformance-015.md_5.snap index d4492073ee..2491eed07b 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_5.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_6.snap b/tests/core/snapshots/graphql-conformance-015.md_6.snap index b8a9fc7dfd..bf2d89754c 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_6.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_7.snap b/tests/core/snapshots/graphql-conformance-015.md_7.snap index cef9e058e8..0ff0fb9040 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_7.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_7.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_8.snap b/tests/core/snapshots/graphql-conformance-015.md_8.snap index ada31c2959..da0549a44c 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_8.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_8.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-015.md_client.snap b/tests/core/snapshots/graphql-conformance-015.md_client.snap index 2b1b4a30a0..f276398c28 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input Foo { bar: String! = "BUZZ" diff --git a/tests/core/snapshots/graphql-conformance-015.md_merged.snap b/tests/core/snapshots/graphql-conformance-015.md_merged.snap index f220edfaf4..6fa190cb9c 100644 --- a/tests/core/snapshots/graphql-conformance-015.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-015.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-018.md_0.snap b/tests/core/snapshots/graphql-conformance-018.md_0.snap index 67b166b416..dddc31c0c5 100644 --- a/tests/core/snapshots/graphql-conformance-018.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-018.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-018.md_client.snap b/tests/core/snapshots/graphql-conformance-018.md_client.snap index 21e04a64ac..9ce88f5fcc 100644 --- a/tests/core/snapshots/graphql-conformance-018.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-018.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-018.md_merged.snap b/tests/core/snapshots/graphql-conformance-018.md_merged.snap index a88d92fcbc..05ce85690b 100644 --- a/tests/core/snapshots/graphql-conformance-018.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-018.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-001.md_0.snap b/tests/core/snapshots/graphql-conformance-http-001.md_0.snap index 1e1d93fa3a..380ff38f7c 100644 --- a/tests/core/snapshots/graphql-conformance-http-001.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-001.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-001.md_1.snap b/tests/core/snapshots/graphql-conformance-http-001.md_1.snap index 275bc566d0..a3d7b06b20 100644 --- a/tests/core/snapshots/graphql-conformance-http-001.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-http-001.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-001.md_2.snap b/tests/core/snapshots/graphql-conformance-http-001.md_2.snap index ecc91653fd..cb1fc60cd3 100644 --- a/tests/core/snapshots/graphql-conformance-http-001.md_2.snap +++ b/tests/core/snapshots/graphql-conformance-http-001.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-001.md_3.snap b/tests/core/snapshots/graphql-conformance-http-001.md_3.snap index 2cc5607f01..61460074e4 100644 --- a/tests/core/snapshots/graphql-conformance-http-001.md_3.snap +++ b/tests/core/snapshots/graphql-conformance-http-001.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-001.md_4.snap b/tests/core/snapshots/graphql-conformance-http-001.md_4.snap index 13997f40e9..f2b4762c8a 100644 --- a/tests/core/snapshots/graphql-conformance-http-001.md_4.snap +++ b/tests/core/snapshots/graphql-conformance-http-001.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-001.md_client.snap b/tests/core/snapshots/graphql-conformance-http-001.md_client.snap index fe68975d19..2e759f3b7c 100644 --- a/tests/core/snapshots/graphql-conformance-http-001.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-001.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-http-001.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-001.md_merged.snap index 642ac573e6..e0ea921538 100644 --- a/tests/core/snapshots/graphql-conformance-http-001.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-001.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-002.md_0.snap b/tests/core/snapshots/graphql-conformance-http-002.md_0.snap index 6ba4226313..dae048aa31 100644 --- a/tests/core/snapshots/graphql-conformance-http-002.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-002.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-002.md_client.snap b/tests/core/snapshots/graphql-conformance-http-002.md_client.snap index 4b9d55b703..6c4a887912 100644 --- a/tests/core/snapshots/graphql-conformance-http-002.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-002.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type BirthDay { day: Int! diff --git a/tests/core/snapshots/graphql-conformance-http-002.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-002.md_merged.snap index 12edc9dfe2..cd6ca7f939 100644 --- a/tests/core/snapshots/graphql-conformance-http-002.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-002.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-003.md_0.snap b/tests/core/snapshots/graphql-conformance-http-003.md_0.snap index 68ff382be6..cd0b9d2b3f 100644 --- a/tests/core/snapshots/graphql-conformance-http-003.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-003.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-003.md_1.snap b/tests/core/snapshots/graphql-conformance-http-003.md_1.snap index bcbc9cde04..79646f219b 100644 --- a/tests/core/snapshots/graphql-conformance-http-003.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-http-003.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-003.md_client.snap b/tests/core/snapshots/graphql-conformance-http-003.md_client.snap index cb05e461f7..987a81bf82 100644 --- a/tests/core/snapshots/graphql-conformance-http-003.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-003.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-http-003.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-003.md_merged.snap index a26db3f74f..29b398f95e 100644 --- a/tests/core/snapshots/graphql-conformance-http-003.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-003.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-004.md_0.snap b/tests/core/snapshots/graphql-conformance-http-004.md_0.snap index 86d2140796..076954c112 100644 --- a/tests/core/snapshots/graphql-conformance-http-004.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-004.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-004.md_client.snap b/tests/core/snapshots/graphql-conformance-http-004.md_client.snap index cb05e461f7..987a81bf82 100644 --- a/tests/core/snapshots/graphql-conformance-http-004.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-004.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-http-004.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-004.md_merged.snap index a26db3f74f..29b398f95e 100644 --- a/tests/core/snapshots/graphql-conformance-http-004.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-004.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-005.md_0.snap b/tests/core/snapshots/graphql-conformance-http-005.md_0.snap index b00fb885e9..3a440cec24 100644 --- a/tests/core/snapshots/graphql-conformance-http-005.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-005.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-005.md_client.snap b/tests/core/snapshots/graphql-conformance-http-005.md_client.snap index 03f65ab5ff..da44cda0e3 100644 --- a/tests/core/snapshots/graphql-conformance-http-005.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-005.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-http-005.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-005.md_merged.snap index 7a07e413b8..bf3363b6cf 100644 --- a/tests/core/snapshots/graphql-conformance-http-005.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-005.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-006.md_0.snap b/tests/core/snapshots/graphql-conformance-http-006.md_0.snap index 8ea1eb6d5e..287e922a4a 100644 --- a/tests/core/snapshots/graphql-conformance-http-006.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-006.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-006.md_1.snap b/tests/core/snapshots/graphql-conformance-http-006.md_1.snap index 8ea1eb6d5e..287e922a4a 100644 --- a/tests/core/snapshots/graphql-conformance-http-006.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-http-006.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-006.md_2.snap b/tests/core/snapshots/graphql-conformance-http-006.md_2.snap index 8ea1eb6d5e..287e922a4a 100644 --- a/tests/core/snapshots/graphql-conformance-http-006.md_2.snap +++ b/tests/core/snapshots/graphql-conformance-http-006.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-006.md_client.snap b/tests/core/snapshots/graphql-conformance-http-006.md_client.snap index 99b6b22e90..15bea93292 100644 --- a/tests/core/snapshots/graphql-conformance-http-006.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-006.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-http-006.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-006.md_merged.snap index 334955ea82..50249b3404 100644 --- a/tests/core/snapshots/graphql-conformance-http-006.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-006.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-007.md_0.snap b/tests/core/snapshots/graphql-conformance-http-007.md_0.snap index c9ad2f3e2c..be3ac70615 100644 --- a/tests/core/snapshots/graphql-conformance-http-007.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-007.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-007.md_client.snap b/tests/core/snapshots/graphql-conformance-http-007.md_client.snap index 3eacfd8774..d660837a02 100644 --- a/tests/core/snapshots/graphql-conformance-http-007.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-007.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Counter { count: Int! diff --git a/tests/core/snapshots/graphql-conformance-http-007.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-007.md_merged.snap index 05758545a8..97b7085299 100644 --- a/tests/core/snapshots/graphql-conformance-http-007.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-007.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-008.md_0.snap b/tests/core/snapshots/graphql-conformance-http-008.md_0.snap index c9ad2f3e2c..be3ac70615 100644 --- a/tests/core/snapshots/graphql-conformance-http-008.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-008.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-008.md_client.snap b/tests/core/snapshots/graphql-conformance-http-008.md_client.snap index 3eacfd8774..d660837a02 100644 --- a/tests/core/snapshots/graphql-conformance-http-008.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-008.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Counter { count: Int! diff --git a/tests/core/snapshots/graphql-conformance-http-008.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-008.md_merged.snap index 12038fc2b5..bc27e56100 100644 --- a/tests/core/snapshots/graphql-conformance-http-008.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-008.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-010.md_0.snap b/tests/core/snapshots/graphql-conformance-http-010.md_0.snap index b0703e0d4e..3dc744ed82 100644 --- a/tests/core/snapshots/graphql-conformance-http-010.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-010.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-010.md_1.snap b/tests/core/snapshots/graphql-conformance-http-010.md_1.snap index b0703e0d4e..3dc744ed82 100644 --- a/tests/core/snapshots/graphql-conformance-http-010.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-http-010.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-010.md_client.snap b/tests/core/snapshots/graphql-conformance-http-010.md_client.snap index a8a2a67c6c..f375d83f86 100644 --- a/tests/core/snapshots/graphql-conformance-http-010.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-010.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Location { lat: Int! diff --git a/tests/core/snapshots/graphql-conformance-http-010.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-010.md_merged.snap index aff10d1696..c244a7639f 100644 --- a/tests/core/snapshots/graphql-conformance-http-010.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-010.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-012.md_0.snap b/tests/core/snapshots/graphql-conformance-http-012.md_0.snap index 4a41d6be01..79a8028efe 100644 --- a/tests/core/snapshots/graphql-conformance-http-012.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-012.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-012.md_1.snap b/tests/core/snapshots/graphql-conformance-http-012.md_1.snap index 4a41d6be01..79a8028efe 100644 --- a/tests/core/snapshots/graphql-conformance-http-012.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-http-012.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-012.md_client.snap b/tests/core/snapshots/graphql-conformance-http-012.md_client.snap index cece3220d6..3600d64328 100644 --- a/tests/core/snapshots/graphql-conformance-http-012.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-012.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Person { age: Int diff --git a/tests/core/snapshots/graphql-conformance-http-012.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-012.md_merged.snap index 3c19e41372..8507ade4e3 100644 --- a/tests/core/snapshots/graphql-conformance-http-012.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-012.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-013.md_0.snap b/tests/core/snapshots/graphql-conformance-http-013.md_0.snap index f48d074d00..f182201d7f 100644 --- a/tests/core/snapshots/graphql-conformance-http-013.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-013.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-013.md_client.snap b/tests/core/snapshots/graphql-conformance-http-013.md_client.snap index 6d42200537..a5ce7809f1 100644 --- a/tests/core/snapshots/graphql-conformance-http-013.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-013.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar Date diff --git a/tests/core/snapshots/graphql-conformance-http-013.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-013.md_merged.snap index c4a4d68e66..52fec7f57c 100644 --- a/tests/core/snapshots/graphql-conformance-http-013.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-013.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-014.md_0.snap b/tests/core/snapshots/graphql-conformance-http-014.md_0.snap index e6efc64331..9f520416ce 100644 --- a/tests/core/snapshots/graphql-conformance-http-014.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-014.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-014.md_1.snap b/tests/core/snapshots/graphql-conformance-http-014.md_1.snap index 85143a1efb..5af023abeb 100644 --- a/tests/core/snapshots/graphql-conformance-http-014.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-http-014.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-014.md_client.snap b/tests/core/snapshots/graphql-conformance-http-014.md_client.snap index fe68975d19..2e759f3b7c 100644 --- a/tests/core/snapshots/graphql-conformance-http-014.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-014.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: ID!): User! diff --git a/tests/core/snapshots/graphql-conformance-http-014.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-014.md_merged.snap index 642ac573e6..e0ea921538 100644 --- a/tests/core/snapshots/graphql-conformance-http-014.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-014.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_0.snap b/tests/core/snapshots/graphql-conformance-http-015.md_0.snap index b4f7ff70a1..1b8596d04b 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_1.snap b/tests/core/snapshots/graphql-conformance-http-015.md_1.snap index 7217296fd3..df6d21c5ab 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_11.snap b/tests/core/snapshots/graphql-conformance-http-015.md_11.snap index a24ffcbc5d..aa1d127cfd 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_11.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_11.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_2.snap b/tests/core/snapshots/graphql-conformance-http-015.md_2.snap index cdb5df7fc9..cdf95c2973 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_2.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_3.snap b/tests/core/snapshots/graphql-conformance-http-015.md_3.snap index ace07bd203..0e28b7d401 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_3.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_4.snap b/tests/core/snapshots/graphql-conformance-http-015.md_4.snap index e586519b7b..82efcf907d 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_4.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_5.snap b/tests/core/snapshots/graphql-conformance-http-015.md_5.snap index d4492073ee..2491eed07b 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_5.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_6.snap b/tests/core/snapshots/graphql-conformance-http-015.md_6.snap index b8a9fc7dfd..bf2d89754c 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_6.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_7.snap b/tests/core/snapshots/graphql-conformance-http-015.md_7.snap index cef9e058e8..0ff0fb9040 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_7.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_7.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_8.snap b/tests/core/snapshots/graphql-conformance-http-015.md_8.snap index ada31c2959..da0549a44c 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_8.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_8.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_client.snap b/tests/core/snapshots/graphql-conformance-http-015.md_client.snap index 2b1b4a30a0..f276398c28 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input Foo { bar: String! = "BUZZ" diff --git a/tests/core/snapshots/graphql-conformance-http-015.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-015.md_merged.snap index 8acedfaee5..2df28536a7 100644 --- a/tests/core/snapshots/graphql-conformance-http-015.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-015.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-http-017.md_0.snap b/tests/core/snapshots/graphql-conformance-http-017.md_0.snap index a44c8d5570..8c79983c64 100644 --- a/tests/core/snapshots/graphql-conformance-http-017.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-http-017.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-017.md_1.snap b/tests/core/snapshots/graphql-conformance-http-017.md_1.snap index 6a663d21ee..3c3a210331 100644 --- a/tests/core/snapshots/graphql-conformance-http-017.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-http-017.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-http-017.md_client.snap b/tests/core/snapshots/graphql-conformance-http-017.md_client.snap index 39b667bf81..ac82707d17 100644 --- a/tests/core/snapshots/graphql-conformance-http-017.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-http-017.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- interface Animal { id: ID! diff --git a/tests/core/snapshots/graphql-conformance-http-017.md_merged.snap b/tests/core/snapshots/graphql-conformance-http-017.md_merged.snap index 850bd04690..b4fcab3970 100644 --- a/tests/core/snapshots/graphql-conformance-http-017.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-http-017.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_0.snap b/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_0.snap index 8d583dd624..bf0cca7203 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_client.snap b/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_client.snap index 740daf953e..45adf6a484 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Admin { name: String! diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_merged.snap b/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_merged.snap index 89a4a66c74..6caf38d5d7 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists-fragment.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_0.snap b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_0.snap index 09daefec5d..47468f72e8 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_1.snap b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_1.snap index 02b07d6d88..5475524804 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_2.snap b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_2.snap index 5d8e545f31..2e959ac7dc 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_2.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_client.snap b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_client.snap index 341ff5b8c6..3906b2b188 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { addUsers(userNames: [[String!]!]!): Boolean diff --git a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_merged.snap b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_merged.snap index 0ca8a52479..d02fbe8f56 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists-http.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists-http.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-conformance-nested-lists.md_0.snap b/tests/core/snapshots/graphql-conformance-nested-lists.md_0.snap index 09daefec5d..47468f72e8 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists.md_0.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-nested-lists.md_1.snap b/tests/core/snapshots/graphql-conformance-nested-lists.md_1.snap index 02b07d6d88..5475524804 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists.md_1.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-nested-lists.md_2.snap b/tests/core/snapshots/graphql-conformance-nested-lists.md_2.snap index 5d8e545f31..2e959ac7dc 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists.md_2.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-conformance-nested-lists.md_client.snap b/tests/core/snapshots/graphql-conformance-nested-lists.md_client.snap index 341ff5b8c6..3906b2b188 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists.md_client.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { addUsers(userNames: [[String!]!]!): Boolean diff --git a/tests/core/snapshots/graphql-conformance-nested-lists.md_merged.snap b/tests/core/snapshots/graphql-conformance-nested-lists.md_merged.snap index b2e7447d0f..bf74d40343 100644 --- a/tests/core/snapshots/graphql-conformance-nested-lists.md_merged.snap +++ b/tests/core/snapshots/graphql-conformance-nested-lists.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/graphql-dataloader-batch-request.md_0.snap b/tests/core/snapshots/graphql-dataloader-batch-request.md_0.snap index b4420e10c7..cdcd20d61f 100644 --- a/tests/core/snapshots/graphql-dataloader-batch-request.md_0.snap +++ b/tests/core/snapshots/graphql-dataloader-batch-request.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-dataloader-batch-request.md_client.snap b/tests/core/snapshots/graphql-dataloader-batch-request.md_client.snap index 932036ff78..b1638efb60 100644 --- a/tests/core/snapshots/graphql-dataloader-batch-request.md_client.snap +++ b/tests/core/snapshots/graphql-dataloader-batch-request.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int 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 4ec834a696..683dd6f9cc 100644 --- a/tests/core/snapshots/graphql-dataloader-batch-request.md_merged.snap +++ b/tests/core/snapshots/graphql-dataloader-batch-request.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 1, headers: []}) { query: Query diff --git a/tests/core/snapshots/graphql-dataloader-no-batch-request.md_0.snap b/tests/core/snapshots/graphql-dataloader-no-batch-request.md_0.snap index b4420e10c7..cdcd20d61f 100644 --- a/tests/core/snapshots/graphql-dataloader-no-batch-request.md_0.snap +++ b/tests/core/snapshots/graphql-dataloader-no-batch-request.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-dataloader-no-batch-request.md_client.snap b/tests/core/snapshots/graphql-dataloader-no-batch-request.md_client.snap index 932036ff78..b1638efb60 100644 --- a/tests/core/snapshots/graphql-dataloader-no-batch-request.md_client.snap +++ b/tests/core/snapshots/graphql-dataloader-no-batch-request.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int 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 ab37e71fdc..d0044e3570 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 @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 1, headers: []}) { query: Query diff --git a/tests/core/snapshots/graphql-datasource-errors.md_0.snap b/tests/core/snapshots/graphql-datasource-errors.md_0.snap index a14dce54cb..c98af289a0 100644 --- a/tests/core/snapshots/graphql-datasource-errors.md_0.snap +++ b/tests/core/snapshots/graphql-datasource-errors.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-errors.md_1.snap b/tests/core/snapshots/graphql-datasource-errors.md_1.snap index 02f11ae658..777d086016 100644 --- a/tests/core/snapshots/graphql-datasource-errors.md_1.snap +++ b/tests/core/snapshots/graphql-datasource-errors.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-errors.md_client.snap b/tests/core/snapshots/graphql-datasource-errors.md_client.snap index 5e9fd2fa39..455588a80b 100644 --- a/tests/core/snapshots/graphql-datasource-errors.md_client.snap +++ b/tests/core/snapshots/graphql-datasource-errors.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int): User diff --git a/tests/core/snapshots/graphql-datasource-errors.md_merged.snap b/tests/core/snapshots/graphql-datasource-errors.md_merged.snap index 30aee8d777..52e9757626 100644 --- a/tests/core/snapshots/graphql-datasource-errors.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-errors.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/graphql-datasource-mutation.md_0.snap b/tests/core/snapshots/graphql-datasource-mutation.md_0.snap index 4a1861c0e1..1ccff3bfa7 100644 --- a/tests/core/snapshots/graphql-datasource-mutation.md_0.snap +++ b/tests/core/snapshots/graphql-datasource-mutation.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-mutation.md_client.snap b/tests/core/snapshots/graphql-datasource-mutation.md_client.snap index 817a9de9a6..a961e58f3e 100644 --- a/tests/core/snapshots/graphql-datasource-mutation.md_client.snap +++ b/tests/core/snapshots/graphql-datasource-mutation.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Mutation { createUser(user: UserInput!): User diff --git a/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap b/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap index 3ceec60315..53de3b5a3e 100644 --- a/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-mutation.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/graphql-datasource-no-args.md_0.snap b/tests/core/snapshots/graphql-datasource-no-args.md_0.snap index d4d493733f..384b487606 100644 --- a/tests/core/snapshots/graphql-datasource-no-args.md_0.snap +++ b/tests/core/snapshots/graphql-datasource-no-args.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-no-args.md_client.snap b/tests/core/snapshots/graphql-datasource-no-args.md_client.snap index 72ffb65629..b5afe7917d 100644 --- a/tests/core/snapshots/graphql-datasource-no-args.md_client.snap +++ b/tests/core/snapshots/graphql-datasource-no-args.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { users_list: [User] 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 4c1e345f65..c083d5abbf 100644 --- a/tests/core/snapshots/graphql-datasource-no-args.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-no-args.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/graphql-datasource-query-directives.md_0.snap b/tests/core/snapshots/graphql-datasource-query-directives.md_0.snap index fde4f3bc74..14ca3ec70f 100644 --- a/tests/core/snapshots/graphql-datasource-query-directives.md_0.snap +++ b/tests/core/snapshots/graphql-datasource-query-directives.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-query-directives.md_1.snap b/tests/core/snapshots/graphql-datasource-query-directives.md_1.snap index 5948e3f20e..d8f1b2a0bb 100644 --- a/tests/core/snapshots/graphql-datasource-query-directives.md_1.snap +++ b/tests/core/snapshots/graphql-datasource-query-directives.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-query-directives.md_client.snap b/tests/core/snapshots/graphql-datasource-query-directives.md_client.snap index 52d67b233a..e7241293e9 100644 --- a/tests/core/snapshots/graphql-datasource-query-directives.md_client.snap +++ b/tests/core/snapshots/graphql-datasource-query-directives.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/graphql-datasource-query-directives.md_merged.snap b/tests/core/snapshots/graphql-datasource-query-directives.md_merged.snap index 3e34144364..35abb7df65 100644 --- a/tests/core/snapshots/graphql-datasource-query-directives.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-query-directives.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/graphql-datasource-with-args.md_0.snap b/tests/core/snapshots/graphql-datasource-with-args.md_0.snap index 27bf57106e..16005a0f61 100644 --- a/tests/core/snapshots/graphql-datasource-with-args.md_0.snap +++ b/tests/core/snapshots/graphql-datasource-with-args.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-with-args.md_1.snap b/tests/core/snapshots/graphql-datasource-with-args.md_1.snap index ccb0082d47..f69edc0e63 100644 --- a/tests/core/snapshots/graphql-datasource-with-args.md_1.snap +++ b/tests/core/snapshots/graphql-datasource-with-args.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-with-args.md_client.snap b/tests/core/snapshots/graphql-datasource-with-args.md_client.snap index dd04e488ea..5d2e78269c 100644 --- a/tests/core/snapshots/graphql-datasource-with-args.md_client.snap +++ b/tests/core/snapshots/graphql-datasource-with-args.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int 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 84332a5847..76530d1086 100644 --- a/tests/core/snapshots/graphql-datasource-with-args.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-with-args.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/graphql-datasource-with-empty-enum.md_0.snap b/tests/core/snapshots/graphql-datasource-with-empty-enum.md_0.snap index b039c861f8..00deaf455b 100644 --- a/tests/core/snapshots/graphql-datasource-with-empty-enum.md_0.snap +++ b/tests/core/snapshots/graphql-datasource-with-empty-enum.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-with-empty-enum.md_client.snap b/tests/core/snapshots/graphql-datasource-with-empty-enum.md_client.snap index da73ff4865..0938cdab45 100644 --- a/tests/core/snapshots/graphql-datasource-with-empty-enum.md_client.snap +++ b/tests/core/snapshots/graphql-datasource-with-empty-enum.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- enum EnumType { INFORMATION diff --git a/tests/core/snapshots/graphql-datasource-with-empty-enum.md_merged.snap b/tests/core/snapshots/graphql-datasource-with-empty-enum.md_merged.snap index b2e019ecfe..6715b2cbfd 100644 --- a/tests/core/snapshots/graphql-datasource-with-empty-enum.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-with-empty-enum.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_0.snap b/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_0.snap index 142ef173e9..65c1a4eee7 100644 --- a/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_0.snap +++ b/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_client.snap b/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_client.snap index 37c2b0f512..912a6e2b47 100644 --- a/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_client.snap +++ b/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- enum EnumType { INFORMATION diff --git a/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_merged.snap b/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_merged.snap index 7de81f58c2..0a1b917e5f 100644 --- a/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_merged.snap +++ b/tests/core/snapshots/graphql-datasource-with-mandatory-enum.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/graphql-nested-datasource.md_0.snap b/tests/core/snapshots/graphql-nested-datasource.md_0.snap index ea545f284a..128394ef6e 100644 --- a/tests/core/snapshots/graphql-nested-datasource.md_0.snap +++ b/tests/core/snapshots/graphql-nested-datasource.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/graphql-nested-datasource.md_client.snap b/tests/core/snapshots/graphql-nested-datasource.md_client.snap index ecef94a855..a954801807 100644 --- a/tests/core/snapshots/graphql-nested-datasource.md_client.snap +++ b/tests/core/snapshots/graphql-nested-datasource.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type A { b: B diff --git a/tests/core/snapshots/graphql-nested-datasource.md_merged.snap b/tests/core/snapshots/graphql-nested-datasource.md_merged.snap index 1df65b0e41..188f91e42d 100644 --- a/tests/core/snapshots/graphql-nested-datasource.md_merged.snap +++ b/tests/core/snapshots/graphql-nested-datasource.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/on-request-body-grpc.md_0.snap b/tests/core/snapshots/graphql-nested.md_0.snap similarity index 53% rename from tests/core/snapshots/on-request-body-grpc.md_0.snap rename to tests/core/snapshots/graphql-nested.md_0.snap index b686744d7c..0b3e1b3e22 100644 --- a/tests/core/snapshots/on-request-body-grpc.md_0.snap +++ b/tests/core/snapshots/graphql-nested.md_0.snap @@ -9,9 +9,14 @@ expression: response }, "body": { "data": { - "newsById": { - "id": 2, - "title": "Note 2 - Changed by JS" + "queryNodeA": { + "name": "nodeA", + "nodeB": { + "name": "nodeB" + }, + "nodeC": { + "name": "nodeC" + } } } } diff --git a/tests/core/snapshots/graphql-nested.md_client.snap b/tests/core/snapshots/graphql-nested.md_client.snap new file mode 100644 index 0000000000..b804ac9539 --- /dev/null +++ b/tests/core/snapshots/graphql-nested.md_client.snap @@ -0,0 +1,30 @@ +--- +source: tests/core/spec.rs +expression: formatted +--- +type NodeA { + child: NodeA + name: String + nodeB: NodeB + nodeC: NodeC +} + +type NodeB { + name: String + nodeA: NodeA + nodeC: NodeC +} + +type NodeC { + name: String + nodeA: NodeA + nodeB: NodeB +} + +type Query { + queryNodeA: NodeA +} + +schema { + query: Query +} diff --git a/tests/core/snapshots/graphql-nested.md_merged.snap b/tests/core/snapshots/graphql-nested.md_merged.snap new file mode 100644 index 0000000000..8accbbde47 --- /dev/null +++ b/tests/core/snapshots/graphql-nested.md_merged.snap @@ -0,0 +1,30 @@ +--- +source: tests/core/spec.rs +expression: formatter +--- +schema @server(hostname: "0.0.0.0", port: 8000) @upstream { + query: Query +} + +type NodeA { + name: String + nodeA: NodeA @modify(name: "child") + nodeB: NodeB + nodeC: NodeC +} + +type NodeB { + name: String + nodeA: NodeA + nodeC: NodeC +} + +type NodeC { + name: String + nodeA: NodeA + nodeB: NodeB +} + +type Query { + queryNodeA: NodeA @graphQL(url: "http://upstream/graphql", name: "nodeA") +} diff --git a/tests/core/snapshots/grpc-batch.md_0.snap b/tests/core/snapshots/grpc-batch.md_0.snap index 7239944846..be635252b4 100644 --- a/tests/core/snapshots/grpc-batch.md_0.snap +++ b/tests/core/snapshots/grpc-batch.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-batch.md_client.snap b/tests/core/snapshots/grpc-batch.md_client.snap index 0e51757fea..56f7281504 100644 --- a/tests/core/snapshots/grpc-batch.md_client.snap +++ b/tests/core/snapshots/grpc-batch.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { body: String diff --git a/tests/core/snapshots/grpc-batch.md_merged.snap b/tests/core/snapshots/grpc-batch.md_merged.snap index eba7964e99..b58b47d536 100644 --- a/tests/core/snapshots/grpc-batch.md_merged.snap +++ b/tests/core/snapshots/grpc-batch.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) diff --git a/tests/core/snapshots/grpc-error.md_0.snap b/tests/core/snapshots/grpc-error.md_0.snap index cca7ca0d8c..22cf68df3e 100644 --- a/tests/core/snapshots/grpc-error.md_0.snap +++ b/tests/core/snapshots/grpc-error.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-error.md_client.snap b/tests/core/snapshots/grpc-error.md_client.snap index 0e51757fea..56f7281504 100644 --- a/tests/core/snapshots/grpc-error.md_client.snap +++ b/tests/core/snapshots/grpc-error.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { body: String diff --git a/tests/core/snapshots/grpc-error.md_merged.snap b/tests/core/snapshots/grpc-error.md_merged.snap index c5d81eb03d..ce7d6911d6 100644 --- a/tests/core/snapshots/grpc-error.md_merged.snap +++ b/tests/core/snapshots/grpc-error.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) diff --git a/tests/core/snapshots/grpc-json.md_0.snap b/tests/core/snapshots/grpc-json.md_0.snap index 889f672334..9a083f33cb 100644 --- a/tests/core/snapshots/grpc-json.md_0.snap +++ b/tests/core/snapshots/grpc-json.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-json.md_1.snap b/tests/core/snapshots/grpc-json.md_1.snap index 39d361b21d..8f3864560e 100644 --- a/tests/core/snapshots/grpc-json.md_1.snap +++ b/tests/core/snapshots/grpc-json.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-json.md_2.snap b/tests/core/snapshots/grpc-json.md_2.snap index f312fe8482..9fe5ee58d4 100644 --- a/tests/core/snapshots/grpc-json.md_2.snap +++ b/tests/core/snapshots/grpc-json.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-json.md_client.snap b/tests/core/snapshots/grpc-json.md_client.snap index 4103cad8e9..3877c6c6bc 100644 --- a/tests/core/snapshots/grpc-json.md_client.snap +++ b/tests/core/snapshots/grpc-json.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { body: String diff --git a/tests/core/snapshots/grpc-json.md_merged.snap b/tests/core/snapshots/grpc-json.md_merged.snap index 9400e1eee4..7c0e006055 100644 --- a/tests/core/snapshots/grpc-json.md_merged.snap +++ b/tests/core/snapshots/grpc-json.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream @link(id: "news", src: "news.proto", type: Protobuf) { query: Query diff --git a/tests/core/snapshots/grpc-map.md_0.snap b/tests/core/snapshots/grpc-map.md_0.snap index e4157fdb54..e9fad61007 100644 --- a/tests/core/snapshots/grpc-map.md_0.snap +++ b/tests/core/snapshots/grpc-map.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-map.md_client.snap b/tests/core/snapshots/grpc-map.md_client.snap index d4b17d5402..6e8eeee23a 100644 --- a/tests/core/snapshots/grpc-map.md_client.snap +++ b/tests/core/snapshots/grpc-map.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar JSON diff --git a/tests/core/snapshots/grpc-map.md_merged.snap b/tests/core/snapshots/grpc-map.md_merged.snap index a9522031c4..0e3bd11495 100644 --- a/tests/core/snapshots/grpc-map.md_merged.snap +++ b/tests/core/snapshots/grpc-map.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) diff --git a/tests/core/snapshots/grpc-proto-with-same-package.md_0.snap b/tests/core/snapshots/grpc-proto-with-same-package.md_0.snap index faaf53b6bd..7265041240 100644 --- a/tests/core/snapshots/grpc-proto-with-same-package.md_0.snap +++ b/tests/core/snapshots/grpc-proto-with-same-package.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-proto-with-same-package.md_client.snap b/tests/core/snapshots/grpc-proto-with-same-package.md_client.snap index f768889b32..81b7f08b59 100644 --- a/tests/core/snapshots/grpc-proto-with-same-package.md_client.snap +++ b/tests/core/snapshots/grpc-proto-with-same-package.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { bar: String diff --git a/tests/core/snapshots/grpc-proto-with-same-package.md_merged.snap b/tests/core/snapshots/grpc-proto-with-same-package.md_merged.snap index 3cd137670d..fea294c4d1 100644 --- a/tests/core/snapshots/grpc-proto-with-same-package.md_merged.snap +++ b/tests/core/snapshots/grpc-proto-with-same-package.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream @link(src: "foo.proto", type: Protobuf) @link(src: "bar.proto", type: Protobuf) { query: Query diff --git a/tests/core/snapshots/grpc-reflection.md_0.snap b/tests/core/snapshots/grpc-reflection.md_0.snap index f4f2990d59..29091d9912 100644 --- a/tests/core/snapshots/grpc-reflection.md_0.snap +++ b/tests/core/snapshots/grpc-reflection.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-reflection.md_client.snap b/tests/core/snapshots/grpc-reflection.md_client.snap index 2a5f5b8c4c..775dcd201a 100644 --- a/tests/core/snapshots/grpc-reflection.md_client.snap +++ b/tests/core/snapshots/grpc-reflection.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { body: String diff --git a/tests/core/snapshots/grpc-reflection.md_merged.snap b/tests/core/snapshots/grpc-reflection.md_merged.snap index ec63b23f6f..45e6161a49 100644 --- a/tests/core/snapshots/grpc-reflection.md_merged.snap +++ b/tests/core/snapshots/grpc-reflection.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream(httpCache: 42) @link(src: "http://localhost:50051", type: Grpc) { query: Query diff --git a/tests/core/snapshots/grpc-simple.md_0.snap b/tests/core/snapshots/grpc-simple.md_0.snap index f4f2990d59..29091d9912 100644 --- a/tests/core/snapshots/grpc-simple.md_0.snap +++ b/tests/core/snapshots/grpc-simple.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-simple.md_client.snap b/tests/core/snapshots/grpc-simple.md_client.snap index 24a54d50fd..2fd977b45a 100644 --- a/tests/core/snapshots/grpc-simple.md_client.snap +++ b/tests/core/snapshots/grpc-simple.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar Empty diff --git a/tests/core/snapshots/grpc-simple.md_merged.snap b/tests/core/snapshots/grpc-simple.md_merged.snap index db8c337675..4a7096d633 100644 --- a/tests/core/snapshots/grpc-simple.md_merged.snap +++ b/tests/core/snapshots/grpc-simple.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) diff --git a/tests/core/snapshots/grpc-url-from-upstream.md_0.snap b/tests/core/snapshots/grpc-url-from-upstream.md_0.snap index f4f2990d59..29091d9912 100644 --- a/tests/core/snapshots/grpc-url-from-upstream.md_0.snap +++ b/tests/core/snapshots/grpc-url-from-upstream.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/grpc-url-from-upstream.md_client.snap b/tests/core/snapshots/grpc-url-from-upstream.md_client.snap index 0e51757fea..56f7281504 100644 --- a/tests/core/snapshots/grpc-url-from-upstream.md_client.snap +++ b/tests/core/snapshots/grpc-url-from-upstream.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { body: String 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 c5d81eb03d..ce7d6911d6 100644 --- a/tests/core/snapshots/grpc-url-from-upstream.md_merged.snap +++ b/tests/core/snapshots/grpc-url-from-upstream.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) diff --git a/tests/core/snapshots/http-select.md_0.snap b/tests/core/snapshots/http-select.md_0.snap index 81a80739bd..c69ceb338c 100644 --- a/tests/core/snapshots/http-select.md_0.snap +++ b/tests/core/snapshots/http-select.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/http-select.md_client.snap b/tests/core/snapshots/http-select.md_client.snap index d8e1dae7c9..351326dd73 100644 --- a/tests/core/snapshots/http-select.md_client.snap +++ b/tests/core/snapshots/http-select.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Company { catchPhrase: String! diff --git a/tests/core/snapshots/http-select.md_merged.snap b/tests/core/snapshots/http-select.md_merged.snap index 49be827426..e4d0762b3d 100644 --- a/tests/core/snapshots/http-select.md_merged.snap +++ b/tests/core/snapshots/http-select.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/https.md_0.snap b/tests/core/snapshots/https.md_0.snap deleted file mode 100644 index a085a7c561..0000000000 --- a/tests/core/snapshots/https.md_0.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: tests/core/spec.rs -expression: response ---- -{ - "status": 200, - "headers": { - "content-type": "application/json" - }, - "body": { - "data": { - "firstUser": { - "name": "Leanne Graham" - } - } - } -} diff --git a/tests/core/snapshots/https.md_client.snap b/tests/core/snapshots/https.md_client.snap deleted file mode 100644 index 2215e476ec..0000000000 --- a/tests/core/snapshots/https.md_client.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatted ---- -type Query { - firstUser: User -} - -type User { - id: Int - name: String -} - -schema { - query: Query -} diff --git a/tests/core/snapshots/https.md_merged.snap b/tests/core/snapshots/https.md_merged.snap deleted file mode 100644 index 8868c6973d..0000000000 --- a/tests/core/snapshots/https.md_merged.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server @upstream { - query: Query -} - -type Query { - firstUser: User @http(url: "http://jsonplaceholder.typicode.com/users/1") -} - -type User { - id: Int - name: String -} diff --git a/tests/core/snapshots/inline-field.md_0.snap b/tests/core/snapshots/inline-field.md_0.snap index 9b27f8fefd..b65a725f76 100644 --- a/tests/core/snapshots/inline-field.md_0.snap +++ b/tests/core/snapshots/inline-field.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/inline-field.md_client.snap b/tests/core/snapshots/inline-field.md_client.snap index 63bde3baf7..ecbe57978f 100644 --- a/tests/core/snapshots/inline-field.md_client.snap +++ b/tests/core/snapshots/inline-field.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/inline-field.md_merged.snap b/tests/core/snapshots/inline-field.md_merged.snap index 3b5dd5f9b3..b7d85eff28 100644 --- a/tests/core/snapshots/inline-field.md_merged.snap +++ b/tests/core/snapshots/inline-field.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/inline-index-list.md_0.snap b/tests/core/snapshots/inline-index-list.md_0.snap index a5b7c188b6..5316822d92 100644 --- a/tests/core/snapshots/inline-index-list.md_0.snap +++ b/tests/core/snapshots/inline-index-list.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/inline-index-list.md_client.snap b/tests/core/snapshots/inline-index-list.md_client.snap index 24efe190ff..fab90bddd5 100644 --- a/tests/core/snapshots/inline-index-list.md_client.snap +++ b/tests/core/snapshots/inline-index-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { username: String diff --git a/tests/core/snapshots/inline-index-list.md_merged.snap b/tests/core/snapshots/inline-index-list.md_merged.snap index b321ecb476..f882d01595 100644 --- a/tests/core/snapshots/inline-index-list.md_merged.snap +++ b/tests/core/snapshots/inline-index-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/inline-many-list.md_client.snap b/tests/core/snapshots/inline-many-list.md_client.snap index 09e87d9d02..fd7b65c7ec 100644 --- a/tests/core/snapshots/inline-many-list.md_client.snap +++ b/tests/core/snapshots/inline-many-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { u: U diff --git a/tests/core/snapshots/inline-many-list.md_merged.snap b/tests/core/snapshots/inline-many-list.md_merged.snap index 9174c51993..abca133e5c 100644 --- a/tests/core/snapshots/inline-many-list.md_merged.snap +++ b/tests/core/snapshots/inline-many-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/inline-many.md_client.snap b/tests/core/snapshots/inline-many.md_client.snap index 7bc026e96f..fc68f625a2 100644 --- a/tests/core/snapshots/inline-many.md_client.snap +++ b/tests/core/snapshots/inline-many.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/inline-many.md_merged.snap b/tests/core/snapshots/inline-many.md_merged.snap index 0cdc230a82..ea4a72d0b9 100644 --- a/tests/core/snapshots/inline-many.md_merged.snap +++ b/tests/core/snapshots/inline-many.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/input-type-protected-error.md_error.snap b/tests/core/snapshots/input-type-protected-error.md_error.snap index e09e747a24..48a5bf75f6 100644 --- a/tests/core/snapshots/input-type-protected-error.md_error.snap +++ b/tests/core/snapshots/input-type-protected-error.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_0.snap b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_0.snap index 661accca7b..279fcf6e75 100644 --- a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_0.snap +++ b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_1.snap b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_1.snap index 537dca8d84..783e9db8ff 100644 --- a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_1.snap +++ b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_client.snap b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_client.snap index 6d42200537..a5ce7809f1 100644 --- a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_client.snap +++ b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar Date diff --git a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_merged.snap b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_merged.snap index 2c671cbd93..9405de31b1 100644 --- a/tests/core/snapshots/introspection-query-with-disabled-introspection.md_merged.snap +++ b/tests/core/snapshots/introspection-query-with-disabled-introspection.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", introspection: false, port: 8001, queryValidation: false) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/io-cache.md_0.snap b/tests/core/snapshots/io-cache.md_0.snap index 78ec8aca42..cdbecf2289 100644 --- a/tests/core/snapshots/io-cache.md_0.snap +++ b/tests/core/snapshots/io-cache.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/io-cache.md_client.snap b/tests/core/snapshots/io-cache.md_client.snap index c0f0d1dae9..3781e69ea1 100644 --- a/tests/core/snapshots/io-cache.md_client.snap +++ b/tests/core/snapshots/io-cache.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String! diff --git a/tests/core/snapshots/io-cache.md_merged.snap b/tests/core/snapshots/io-cache.md_merged.snap index ceea8fa892..2061e7c7d8 100644 --- a/tests/core/snapshots/io-cache.md_merged.snap +++ b/tests/core/snapshots/io-cache.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream(httpCache: 42) { query: Query diff --git a/tests/core/snapshots/jit-enum-array.md_0.snap b/tests/core/snapshots/jit-enum-array.md_0.snap index 7758ba58c3..249f61486f 100644 --- a/tests/core/snapshots/jit-enum-array.md_0.snap +++ b/tests/core/snapshots/jit-enum-array.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/jit-enum-array.md_client.snap b/tests/core/snapshots/jit-enum-array.md_client.snap index 6248f5bfaa..7d6f81127e 100644 --- a/tests/core/snapshots/jit-enum-array.md_client.snap +++ b/tests/core/snapshots/jit-enum-array.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type DTA { departments: [Department] diff --git a/tests/core/snapshots/jit-enum-array.md_merged.snap b/tests/core/snapshots/jit-enum-array.md_merged.snap index b2f1e82971..7b5846a999 100644 --- a/tests/core/snapshots/jit-enum-array.md_merged.snap +++ b/tests/core/snapshots/jit-enum-array.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/js-directive.md_0.snap b/tests/core/snapshots/js-directive.md_0.snap index bba13ddb0e..77ab987809 100644 --- a/tests/core/snapshots/js-directive.md_0.snap +++ b/tests/core/snapshots/js-directive.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/js-directive.md_client.snap b/tests/core/snapshots/js-directive.md_client.snap index 8cf0b9181a..c604bcc5ab 100644 --- a/tests/core/snapshots/js-directive.md_client.snap +++ b/tests/core/snapshots/js-directive.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { hello: User! diff --git a/tests/core/snapshots/js-directive.md_merged.snap b/tests/core/snapshots/js-directive.md_merged.snap index 36a6ff5048..77a5c05e58 100644 --- a/tests/core/snapshots/js-directive.md_merged.snap +++ b/tests/core/snapshots/js-directive.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream @link(src: "test.js", type: Script) { query: Query diff --git a/tests/core/snapshots/jsonplaceholder-call-post.md_0.snap b/tests/core/snapshots/jsonplaceholder-call-post.md_0.snap index 64e4c375c5..cdb871f288 100644 --- a/tests/core/snapshots/jsonplaceholder-call-post.md_0.snap +++ b/tests/core/snapshots/jsonplaceholder-call-post.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/jsonplaceholder-call-post.md_client.snap b/tests/core/snapshots/jsonplaceholder-call-post.md_client.snap index e86a8ddb4b..5c6d56dee0 100644 --- a/tests/core/snapshots/jsonplaceholder-call-post.md_client.snap +++ b/tests/core/snapshots/jsonplaceholder-call-post.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int! diff --git a/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap b/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap index 827ad6ac0d..15677c3e90 100644 --- a/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap +++ b/tests/core/snapshots/jsonplaceholder-call-post.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/test-nested-link.md_client.snap b/tests/core/snapshots/merge-linked-config.md_client.snap similarity index 83% rename from tests/core/snapshots/test-nested-link.md_client.snap rename to tests/core/snapshots/merge-linked-config.md_client.snap index a1839b52b8..d46a44fd2d 100644 --- a/tests/core/snapshots/test-nested-link.md_client.snap +++ b/tests/core/snapshots/merge-linked-config.md_client.snap @@ -1,10 +1,10 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- -enum Foo { - BAR - BAZ +type Foo { + foo: String } type Post { diff --git a/tests/core/snapshots/test-nested-link.md_merged.snap b/tests/core/snapshots/merge-linked-config.md_merged.snap similarity index 68% rename from tests/core/snapshots/test-nested-link.md_merged.snap rename to tests/core/snapshots/merge-linked-config.md_merged.snap index 02fdc7e986..a0eed4f4f4 100644 --- a/tests/core/snapshots/test-nested-link.md_merged.snap +++ b/tests/core/snapshots/merge-linked-config.md_merged.snap @@ -1,19 +1,18 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema - @server - @upstream - @link(src: "graphql-with-link.graphql", type: Config) - @link(src: "link-enum.graphql", type: Config) - @link(src: "link-enum.graphql", type: Config) { + @server(port: 8000) + @upstream(batch: {delay: 10, headers: []}, httpCache: 10) + @link(src: "link-1.graphql", type: Config) + @link(src: "link-2.graphql", type: Config) { query: Query } -enum Foo { - BAR - BAZ +type Foo { + foo: String } type Post { diff --git a/tests/core/snapshots/modified-field.md_0.snap b/tests/core/snapshots/modified-field.md_0.snap index f932b05da0..6c4d359524 100644 --- a/tests/core/snapshots/modified-field.md_0.snap +++ b/tests/core/snapshots/modified-field.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/modified-field.md_client.snap b/tests/core/snapshots/modified-field.md_client.snap index 52961967eb..60c4b09bc1 100644 --- a/tests/core/snapshots/modified-field.md_client.snap +++ b/tests/core/snapshots/modified-field.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/modified-field.md_merged.snap b/tests/core/snapshots/modified-field.md_merged.snap index 43b1759025..28da51b4ce 100644 --- a/tests/core/snapshots/modified-field.md_merged.snap +++ b/tests/core/snapshots/modified-field.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/mutation-put.md_0.snap b/tests/core/snapshots/mutation-put.md_0.snap index df1c1b3a6d..5b81613cb4 100644 --- a/tests/core/snapshots/mutation-put.md_0.snap +++ b/tests/core/snapshots/mutation-put.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/mutation-put.md_client.snap b/tests/core/snapshots/mutation-put.md_client.snap index 68ec1619a5..2bda8392b3 100644 --- a/tests/core/snapshots/mutation-put.md_client.snap +++ b/tests/core/snapshots/mutation-put.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Mutation { insertPost(input: PostInput!): Post diff --git a/tests/core/snapshots/mutation-put.md_merged.snap b/tests/core/snapshots/mutation-put.md_merged.snap index 399f8de825..66deccd6c3 100644 --- a/tests/core/snapshots/mutation-put.md_merged.snap +++ b/tests/core/snapshots/mutation-put.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/mutation.md_0.snap b/tests/core/snapshots/mutation.md_0.snap index a0b72d835b..4f1b70831d 100644 --- a/tests/core/snapshots/mutation.md_0.snap +++ b/tests/core/snapshots/mutation.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/mutation.md_client.snap b/tests/core/snapshots/mutation.md_client.snap index 1cf97bc546..b2c6440371 100644 --- a/tests/core/snapshots/mutation.md_client.snap +++ b/tests/core/snapshots/mutation.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Mutation { insertPost(input: PostInput): Post diff --git a/tests/core/snapshots/mutation.md_merged.snap b/tests/core/snapshots/mutation.md_merged.snap index 81e5c4c893..3e22765196 100644 --- a/tests/core/snapshots/mutation.md_merged.snap +++ b/tests/core/snapshots/mutation.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/n-plus-one-list.md_0.snap b/tests/core/snapshots/n-plus-one-list.md_0.snap index f25f1dd6ba..eb4bd609f0 100644 --- a/tests/core/snapshots/n-plus-one-list.md_0.snap +++ b/tests/core/snapshots/n-plus-one-list.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/n-plus-one-list.md_client.snap b/tests/core/snapshots/n-plus-one-list.md_client.snap index 6d9f4383a0..aef1e632f0 100644 --- a/tests/core/snapshots/n-plus-one-list.md_client.snap +++ b/tests/core/snapshots/n-plus-one-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { foo: [Foo] 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 3b11a2cea8..5d5377c758 100644 --- a/tests/core/snapshots/n-plus-one-list.md_merged.snap +++ b/tests/core/snapshots/n-plus-one-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) { query: Query diff --git a/tests/core/snapshots/n-plus-one.md_0.snap b/tests/core/snapshots/n-plus-one.md_0.snap index 4293f81a84..7b4115fd2f 100644 --- a/tests/core/snapshots/n-plus-one.md_0.snap +++ b/tests/core/snapshots/n-plus-one.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/n-plus-one.md_client.snap b/tests/core/snapshots/n-plus-one.md_client.snap index 6d9f4383a0..aef1e632f0 100644 --- a/tests/core/snapshots/n-plus-one.md_client.snap +++ b/tests/core/snapshots/n-plus-one.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { foo: [Foo] diff --git a/tests/core/snapshots/n-plus-one.md_merged.snap b/tests/core/snapshots/n-plus-one.md_merged.snap index 3b11a2cea8..5d5377c758 100644 --- a/tests/core/snapshots/n-plus-one.md_merged.snap +++ b/tests/core/snapshots/n-plus-one.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) { query: Query diff --git a/tests/core/snapshots/nested-objects.md_0.snap b/tests/core/snapshots/nested-objects.md_0.snap index 81e0aa2d2f..24800a1d03 100644 --- a/tests/core/snapshots/nested-objects.md_0.snap +++ b/tests/core/snapshots/nested-objects.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/nested-objects.md_client.snap b/tests/core/snapshots/nested-objects.md_client.snap index f429615b8a..649ef646bb 100644 --- a/tests/core/snapshots/nested-objects.md_client.snap +++ b/tests/core/snapshots/nested-objects.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Address { geo: Geo diff --git a/tests/core/snapshots/nested-objects.md_merged.snap b/tests/core/snapshots/nested-objects.md_merged.snap index 1d098fabf2..24d851ab08 100644 --- a/tests/core/snapshots/nested-objects.md_merged.snap +++ b/tests/core/snapshots/nested-objects.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/nested-recursive-types.md_0.snap b/tests/core/snapshots/nested-recursive-types.md_0.snap index 9117c7f5ee..4c93daf346 100644 --- a/tests/core/snapshots/nested-recursive-types.md_0.snap +++ b/tests/core/snapshots/nested-recursive-types.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/nested-recursive-types.md_client.snap b/tests/core/snapshots/nested-recursive-types.md_client.snap index 712e24e7b9..111ec6156c 100644 --- a/tests/core/snapshots/nested-recursive-types.md_client.snap +++ b/tests/core/snapshots/nested-recursive-types.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Connection { nested: NestedUser diff --git a/tests/core/snapshots/nested-recursive-types.md_merged.snap b/tests/core/snapshots/nested-recursive-types.md_merged.snap index e61ece34f7..2904c9f4c0 100644 --- a/tests/core/snapshots/nested-recursive-types.md_merged.snap +++ b/tests/core/snapshots/nested-recursive-types.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/nesting-level3.md_0.snap b/tests/core/snapshots/nesting-level3.md_0.snap index bf53033aef..e0aa837d9e 100644 --- a/tests/core/snapshots/nesting-level3.md_0.snap +++ b/tests/core/snapshots/nesting-level3.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/nesting-level3.md_client.snap b/tests/core/snapshots/nesting-level3.md_client.snap index b1c4dd47f4..ddb7f3704c 100644 --- a/tests/core/snapshots/nesting-level3.md_client.snap +++ b/tests/core/snapshots/nesting-level3.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/nesting-level3.md_merged.snap b/tests/core/snapshots/nesting-level3.md_merged.snap index fd3480ea1b..5d06891c89 100644 --- a/tests/core/snapshots/nesting-level3.md_merged.snap +++ b/tests/core/snapshots/nesting-level3.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/non-scalar-value-in-query.md_error.snap b/tests/core/snapshots/non-scalar-value-in-query.md_error.snap index 0e537df433..af9fd14ede 100644 --- a/tests/core/snapshots/non-scalar-value-in-query.md_error.snap +++ b/tests/core/snapshots/non-scalar-value-in-query.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/nullable-arg-query.md_0.snap b/tests/core/snapshots/nullable-arg-query.md_0.snap index 416637ca30..da0f1897b8 100644 --- a/tests/core/snapshots/nullable-arg-query.md_0.snap +++ b/tests/core/snapshots/nullable-arg-query.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/nullable-arg-query.md_1.snap b/tests/core/snapshots/nullable-arg-query.md_1.snap index fba365192d..7e64e79649 100644 --- a/tests/core/snapshots/nullable-arg-query.md_1.snap +++ b/tests/core/snapshots/nullable-arg-query.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/nullable-arg-query.md_client.snap b/tests/core/snapshots/nullable-arg-query.md_client.snap index 102efec113..16de7af77f 100644 --- a/tests/core/snapshots/nullable-arg-query.md_client.snap +++ b/tests/core/snapshots/nullable-arg-query.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { users(id: ID): [User] diff --git a/tests/core/snapshots/nullable-arg-query.md_merged.snap b/tests/core/snapshots/nullable-arg-query.md_merged.snap index 74427ecda9..49b909205c 100644 --- a/tests/core/snapshots/nullable-arg-query.md_merged.snap +++ b/tests/core/snapshots/nullable-arg-query.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/omit-index-list.md_0.snap b/tests/core/snapshots/omit-index-list.md_0.snap index a5b7c188b6..5316822d92 100644 --- a/tests/core/snapshots/omit-index-list.md_0.snap +++ b/tests/core/snapshots/omit-index-list.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/omit-index-list.md_client.snap b/tests/core/snapshots/omit-index-list.md_client.snap index 24efe190ff..fab90bddd5 100644 --- a/tests/core/snapshots/omit-index-list.md_client.snap +++ b/tests/core/snapshots/omit-index-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { username: String diff --git a/tests/core/snapshots/omit-index-list.md_merged.snap b/tests/core/snapshots/omit-index-list.md_merged.snap index b321ecb476..f882d01595 100644 --- a/tests/core/snapshots/omit-index-list.md_merged.snap +++ b/tests/core/snapshots/omit-index-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/omit-many.md_client.snap b/tests/core/snapshots/omit-many.md_client.snap index 87b249b134..395057b443 100644 --- a/tests/core/snapshots/omit-many.md_client.snap +++ b/tests/core/snapshots/omit-many.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/omit-many.md_merged.snap b/tests/core/snapshots/omit-many.md_merged.snap index f583e86cff..a74b2b4107 100644 --- a/tests/core/snapshots/omit-many.md_merged.snap +++ b/tests/core/snapshots/omit-many.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/omit-resolved-by-parent.md_0.snap b/tests/core/snapshots/omit-resolved-by-parent.md_0.snap index 33ee8d1664..2376824b33 100644 --- a/tests/core/snapshots/omit-resolved-by-parent.md_0.snap +++ b/tests/core/snapshots/omit-resolved-by-parent.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/omit-resolved-by-parent.md_client.snap b/tests/core/snapshots/omit-resolved-by-parent.md_client.snap index 63bde3baf7..ecbe57978f 100644 --- a/tests/core/snapshots/omit-resolved-by-parent.md_client.snap +++ b/tests/core/snapshots/omit-resolved-by-parent.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User 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 f823d4c745..199f9cf9ec 100644 --- a/tests/core/snapshots/omit-resolved-by-parent.md_merged.snap +++ b/tests/core/snapshots/omit-resolved-by-parent.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/on-request-body-grpc.md_client.snap b/tests/core/snapshots/on-request-body-grpc.md_client.snap deleted file mode 100644 index 3040174250..0000000000 --- a/tests/core/snapshots/on-request-body-grpc.md_client.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatted ---- -type News { - body: String - id: Int - postImage: String - title: String -} - -type Query { - newsById: News! -} - -schema { - query: Query -} diff --git a/tests/core/snapshots/on-request-body-grpc.md_merged.snap b/tests/core/snapshots/on-request-body-grpc.md_merged.snap deleted file mode 100644 index c72cde554c..0000000000 --- a/tests/core/snapshots/on-request-body-grpc.md_merged.snap +++ /dev/null @@ -1,28 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema - @server(port: 8000) - @upstream - @link(src: "test.js", type: Script) - @link(id: "news", src: "news.proto", type: Protobuf) { - query: Query -} - -type News { - body: String - id: Int - postImage: String - title: String -} - -type Query { - newsById: News! - @grpc( - url: "http://localhost:50051" - body: {id: 2} - method: "news.NewsService.GetNews" - onResponseBody: "onResponse" - ) -} diff --git a/tests/core/snapshots/on-response-body-grpc.md_0.snap b/tests/core/snapshots/on-response-body-grpc.md_0.snap index b686744d7c..6e2afff99b 100644 --- a/tests/core/snapshots/on-response-body-grpc.md_0.snap +++ b/tests/core/snapshots/on-response-body-grpc.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/on-response-body-grpc.md_client.snap b/tests/core/snapshots/on-response-body-grpc.md_client.snap index 3040174250..f88c5a4194 100644 --- a/tests/core/snapshots/on-response-body-grpc.md_client.snap +++ b/tests/core/snapshots/on-response-body-grpc.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { body: String diff --git a/tests/core/snapshots/on-response-body-grpc.md_merged.snap b/tests/core/snapshots/on-response-body-grpc.md_merged.snap index c72cde554c..3d4a34a30f 100644 --- a/tests/core/snapshots/on-response-body-grpc.md_merged.snap +++ b/tests/core/snapshots/on-response-body-grpc.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) diff --git a/tests/core/snapshots/predefined-scalar.md_error.snap b/tests/core/snapshots/predefined-scalar.md_error.snap index f453e7bfcb..afdbf5cdf9 100644 --- a/tests/core/snapshots/predefined-scalar.md_error.snap +++ b/tests/core/snapshots/predefined-scalar.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/recursive-types-json.md_0.snap b/tests/core/snapshots/recursive-types-json.md_0.snap deleted file mode 100644 index f92af42448..0000000000 --- a/tests/core/snapshots/recursive-types-json.md_0.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: tests/core/spec.rs -expression: response ---- -{ - "status": 200, - "headers": { - "content-type": "application/json" - }, - "body": { - "data": { - "user": { - "name": "User1", - "id": 1, - "connections": [ - { - "type": "friend", - "user": { - "name": "User2", - "id": 2, - "connections": [ - { - "user": { - "name": "User3", - "id": 3 - } - }, - { - "user": { - "name": "User4", - "id": 4 - } - } - ] - } - } - ] - } - } - } -} diff --git a/tests/core/snapshots/recursive-types-json.md_1.snap b/tests/core/snapshots/recursive-types-json.md_1.snap deleted file mode 100644 index cb47da11fe..0000000000 --- a/tests/core/snapshots/recursive-types-json.md_1.snap +++ /dev/null @@ -1,27 +0,0 @@ ---- -source: tests/core/spec.rs -expression: response ---- -{ - "status": 200, - "headers": { - "content-type": "application/json" - }, - "body": { - "data": { - "createUser": { - "name": "NewUser", - "id": 111, - "connections": [ - { - "type": "friend", - "user": { - "name": "User1", - "id": 1 - } - } - ] - } - } - } -} diff --git a/tests/core/snapshots/recursive-types-json.md_client.snap b/tests/core/snapshots/recursive-types-json.md_client.snap deleted file mode 100644 index d88545ef2e..0000000000 --- a/tests/core/snapshots/recursive-types-json.md_client.snap +++ /dev/null @@ -1,38 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatted ---- -type Connection { - type: String - user: User -} - -input ConnectionInput { - type: String - user: UserInput -} - -type Mutation { - createUser(user: UserInput): User -} - -type Query { - user: User -} - -type User { - connections: [Connection] - id: Int! - name: String! -} - -input UserInput { - connections: [ConnectionInput] - id: Int! - name: String! -} - -schema { - query: Query - mutation: Mutation -} diff --git a/tests/core/snapshots/recursive-types-json.md_merged.snap b/tests/core/snapshots/recursive-types-json.md_merged.snap deleted file mode 100644 index 7722b453d6..0000000000 --- a/tests/core/snapshots/recursive-types-json.md_merged.snap +++ /dev/null @@ -1,39 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server @upstream(httpCache: 42) { - query: Query - mutation: Mutation -} - -input ConnectionInput { - type: String - user: UserInput -} - -input UserInput { - connections: [ConnectionInput] @http(url: "http://jsonplaceholder.typicode.com/connections/{{.value.id}}") - id: Int! - name: String! -} - -type Connection { - type: String - user: User -} - -type Mutation { - createUser(user: UserInput): User - @http(url: "http://jsonplaceholder.typicode.com/user", body: "{{.args.user}}", method: "POST") -} - -type Query { - user: User @http(url: "http://jsonplaceholder.typicode.com/users/1") -} - -type User { - connections: [Connection] @http(url: "http://jsonplaceholder.typicode.com/connections/{{.value.id}}") - id: Int! - name: String! -} diff --git a/tests/core/snapshots/recursive-types-no-resolver.md_error.snap b/tests/core/snapshots/recursive-types-no-resolver.md_error.snap index 5592955499..aeba93ca93 100644 --- a/tests/core/snapshots/recursive-types-no-resolver.md_error.snap +++ b/tests/core/snapshots/recursive-types-no-resolver.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/recursive-types.md_0.snap b/tests/core/snapshots/recursive-types.md_0.snap index f92af42448..85ec074b88 100644 --- a/tests/core/snapshots/recursive-types.md_0.snap +++ b/tests/core/snapshots/recursive-types.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/recursive-types.md_1.snap b/tests/core/snapshots/recursive-types.md_1.snap index cb47da11fe..51070481ff 100644 --- a/tests/core/snapshots/recursive-types.md_1.snap +++ b/tests/core/snapshots/recursive-types.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/recursive-types.md_client.snap b/tests/core/snapshots/recursive-types.md_client.snap index b8b9e5d3c5..f783902dcf 100644 --- a/tests/core/snapshots/recursive-types.md_client.snap +++ b/tests/core/snapshots/recursive-types.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Connection { type: String diff --git a/tests/core/snapshots/recursive-types.md_merged.snap b/tests/core/snapshots/recursive-types.md_merged.snap index 02f7869077..90280f57c1 100644 --- a/tests/core/snapshots/recursive-types.md_merged.snap +++ b/tests/core/snapshots/recursive-types.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/ref-other-nested.md_0.snap b/tests/core/snapshots/ref-other-nested.md_0.snap index 98cad028b7..0f3f3926a9 100644 --- a/tests/core/snapshots/ref-other-nested.md_0.snap +++ b/tests/core/snapshots/ref-other-nested.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/ref-other-nested.md_client.snap b/tests/core/snapshots/ref-other-nested.md_client.snap index 19ae040d8e..3ffedd54a6 100644 --- a/tests/core/snapshots/ref-other-nested.md_client.snap +++ b/tests/core/snapshots/ref-other-nested.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { firstUser: User1 diff --git a/tests/core/snapshots/ref-other-nested.md_merged.snap b/tests/core/snapshots/ref-other-nested.md_merged.snap index 37acaf29d1..c3edd81b2a 100644 --- a/tests/core/snapshots/ref-other-nested.md_merged.snap +++ b/tests/core/snapshots/ref-other-nested.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/ref-other.md_0.snap b/tests/core/snapshots/ref-other.md_0.snap index 73bdac00d5..af89c7a115 100644 --- a/tests/core/snapshots/ref-other.md_0.snap +++ b/tests/core/snapshots/ref-other.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/ref-other.md_client.snap b/tests/core/snapshots/ref-other.md_client.snap index 68645d3a5d..a09023ec12 100644 --- a/tests/core/snapshots/ref-other.md_client.snap +++ b/tests/core/snapshots/ref-other.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { firstUser: User1 diff --git a/tests/core/snapshots/ref-other.md_merged.snap b/tests/core/snapshots/ref-other.md_merged.snap index 3b8283aac8..78690ebe85 100644 --- a/tests/core/snapshots/ref-other.md_merged.snap +++ b/tests/core/snapshots/ref-other.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/related-fields-recursive.md_client.snap b/tests/core/snapshots/related-fields-recursive.md_client.snap index 0d98a90b7b..0fa6594727 100644 --- a/tests/core/snapshots/related-fields-recursive.md_client.snap +++ b/tests/core/snapshots/related-fields-recursive.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type NodeA { name: String diff --git a/tests/core/snapshots/related-fields-recursive.md_merged.snap b/tests/core/snapshots/related-fields-recursive.md_merged.snap index 6b50ea16eb..42aea91f01 100644 --- a/tests/core/snapshots/related-fields-recursive.md_merged.snap +++ b/tests/core/snapshots/related-fields-recursive.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "0.0.0.0", port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/rename-field.md_0.snap b/tests/core/snapshots/rename-field.md_0.snap index 2db7000d43..fc437e146b 100644 --- a/tests/core/snapshots/rename-field.md_0.snap +++ b/tests/core/snapshots/rename-field.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/rename-field.md_1.snap b/tests/core/snapshots/rename-field.md_1.snap index 76cb55bf18..c1ce8de765 100644 --- a/tests/core/snapshots/rename-field.md_1.snap +++ b/tests/core/snapshots/rename-field.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/rename-field.md_client.snap b/tests/core/snapshots/rename-field.md_client.snap index 9dba1fc45e..3da1034de2 100644 --- a/tests/core/snapshots/rename-field.md_client.snap +++ b/tests/core/snapshots/rename-field.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user1: User diff --git a/tests/core/snapshots/rename-field.md_merged.snap b/tests/core/snapshots/rename-field.md_merged.snap index 053ccccd19..cbb865262c 100644 --- a/tests/core/snapshots/rename-field.md_merged.snap +++ b/tests/core/snapshots/rename-field.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/request-to-upstream-batching.md_0.snap b/tests/core/snapshots/request-to-upstream-batching.md_0.snap index 910fe79ff4..a36c0d78ee 100644 --- a/tests/core/snapshots/request-to-upstream-batching.md_0.snap +++ b/tests/core/snapshots/request-to-upstream-batching.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/request-to-upstream-batching.md_client.snap b/tests/core/snapshots/request-to-upstream-batching.md_client.snap index cbcfe5da06..1b9d4f5438 100644 --- a/tests/core/snapshots/request-to-upstream-batching.md_client.snap +++ b/tests/core/snapshots/request-to-upstream-batching.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User 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 935f6d2017..0a9c1d0551 100644 --- a/tests/core/snapshots/request-to-upstream-batching.md_merged.snap +++ b/tests/core/snapshots/request-to-upstream-batching.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(batchRequests: true) @upstream(batch: {delay: 1, headers: [], maxSize: 100}) { query: Query diff --git a/tests/core/snapshots/resolve-with-headers.md_0.snap b/tests/core/snapshots/resolve-with-headers.md_0.snap index 918dbaba7a..7c7b0fefcf 100644 --- a/tests/core/snapshots/resolve-with-headers.md_0.snap +++ b/tests/core/snapshots/resolve-with-headers.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/resolve-with-headers.md_client.snap b/tests/core/snapshots/resolve-with-headers.md_client.snap index 39d5b00ad3..663b6e0dbf 100644 --- a/tests/core/snapshots/resolve-with-headers.md_client.snap +++ b/tests/core/snapshots/resolve-with-headers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String! diff --git a/tests/core/snapshots/resolve-with-headers.md_merged.snap b/tests/core/snapshots/resolve-with-headers.md_merged.snap index 07a5cb1763..361f24f57b 100644 --- a/tests/core/snapshots/resolve-with-headers.md_merged.snap +++ b/tests/core/snapshots/resolve-with-headers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(allowedHeaders: ["authorization"]) { query: Query diff --git a/tests/core/snapshots/resolve-with-vars.md_0.snap b/tests/core/snapshots/resolve-with-vars.md_0.snap index 47bfa75fff..623f147669 100644 --- a/tests/core/snapshots/resolve-with-vars.md_0.snap +++ b/tests/core/snapshots/resolve-with-vars.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/resolve-with-vars.md_client.snap b/tests/core/snapshots/resolve-with-vars.md_client.snap index b72bcbad50..e899abf464 100644 --- a/tests/core/snapshots/resolve-with-vars.md_client.snap +++ b/tests/core/snapshots/resolve-with-vars.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: [User] diff --git a/tests/core/snapshots/resolve-with-vars.md_merged.snap b/tests/core/snapshots/resolve-with-vars.md_merged.snap index d0113a3f37..61fe670e22 100644 --- a/tests/core/snapshots/resolve-with-vars.md_merged.snap +++ b/tests/core/snapshots/resolve-with-vars.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(vars: [{key: "id", value: "1"}]) @upstream { query: Query diff --git a/tests/core/snapshots/resolved-by-parent.md_0.snap b/tests/core/snapshots/resolved-by-parent.md_0.snap index 33ee8d1664..2376824b33 100644 --- a/tests/core/snapshots/resolved-by-parent.md_0.snap +++ b/tests/core/snapshots/resolved-by-parent.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/resolved-by-parent.md_client.snap b/tests/core/snapshots/resolved-by-parent.md_client.snap index 63bde3baf7..ecbe57978f 100644 --- a/tests/core/snapshots/resolved-by-parent.md_client.snap +++ b/tests/core/snapshots/resolved-by-parent.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/resolved-by-parent.md_merged.snap b/tests/core/snapshots/resolved-by-parent.md_merged.snap index f823d4c745..199f9cf9ec 100644 --- a/tests/core/snapshots/resolved-by-parent.md_merged.snap +++ b/tests/core/snapshots/resolved-by-parent.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/rest-api-error.md_0.snap b/tests/core/snapshots/rest-api-error.md_0.snap index 71f1df3c32..b1d703c40f 100644 --- a/tests/core/snapshots/rest-api-error.md_0.snap +++ b/tests/core/snapshots/rest-api-error.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 500, diff --git a/tests/core/snapshots/rest-api-error.md_client.snap b/tests/core/snapshots/rest-api-error.md_client.snap index f0cf6e9796..627d54d3cb 100644 --- a/tests/core/snapshots/rest-api-error.md_client.snap +++ b/tests/core/snapshots/rest-api-error.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User diff --git a/tests/core/snapshots/rest-api-error.md_merged.snap b/tests/core/snapshots/rest-api-error.md_merged.snap index ceed6b8faf..2453ce5576 100644 --- a/tests/core/snapshots/rest-api-error.md_merged.snap +++ b/tests/core/snapshots/rest-api-error.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream @link(src: "operation-user.graphql", type: Operation) { query: Query diff --git a/tests/core/snapshots/rest-api-post.md_0.snap b/tests/core/snapshots/rest-api-post.md_0.snap index cc6597baac..ca4925cbd3 100644 --- a/tests/core/snapshots/rest-api-post.md_0.snap +++ b/tests/core/snapshots/rest-api-post.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/rest-api-post.md_client.snap b/tests/core/snapshots/rest-api-post.md_client.snap index f0cf6e9796..627d54d3cb 100644 --- a/tests/core/snapshots/rest-api-post.md_client.snap +++ b/tests/core/snapshots/rest-api-post.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User diff --git a/tests/core/snapshots/rest-api-post.md_merged.snap b/tests/core/snapshots/rest-api-post.md_merged.snap index ceed6b8faf..2453ce5576 100644 --- a/tests/core/snapshots/rest-api-post.md_merged.snap +++ b/tests/core/snapshots/rest-api-post.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream @link(src: "operation-user.graphql", type: Operation) { query: Query diff --git a/tests/core/snapshots/rest-api.md_0.snap b/tests/core/snapshots/rest-api.md_0.snap index cc6597baac..ca4925cbd3 100644 --- a/tests/core/snapshots/rest-api.md_0.snap +++ b/tests/core/snapshots/rest-api.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/rest-api.md_client.snap b/tests/core/snapshots/rest-api.md_client.snap index f0cf6e9796..627d54d3cb 100644 --- a/tests/core/snapshots/rest-api.md_client.snap +++ b/tests/core/snapshots/rest-api.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User diff --git a/tests/core/snapshots/rest-api.md_merged.snap b/tests/core/snapshots/rest-api.md_merged.snap index ceed6b8faf..2453ce5576 100644 --- a/tests/core/snapshots/rest-api.md_merged.snap +++ b/tests/core/snapshots/rest-api.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream @link(src: "operation-user.graphql", type: Operation) { query: Query diff --git a/tests/core/snapshots/routes-param-on-server-directive.md_0.snap b/tests/core/snapshots/routes-param-on-server-directive.md_0.snap index f683c854d5..1519280e70 100644 --- a/tests/core/snapshots/routes-param-on-server-directive.md_0.snap +++ b/tests/core/snapshots/routes-param-on-server-directive.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/routes-param-on-server-directive.md_1.snap b/tests/core/snapshots/routes-param-on-server-directive.md_1.snap index b5a72701af..06283acff3 100644 --- a/tests/core/snapshots/routes-param-on-server-directive.md_1.snap +++ b/tests/core/snapshots/routes-param-on-server-directive.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/routes-param-on-server-directive.md_client.snap b/tests/core/snapshots/routes-param-on-server-directive.md_client.snap index c06f0e4862..c09f5c8dbf 100644 --- a/tests/core/snapshots/routes-param-on-server-directive.md_client.snap +++ b/tests/core/snapshots/routes-param-on-server-directive.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { users: [User] diff --git a/tests/core/snapshots/routes-param-on-server-directive.md_merged.snap b/tests/core/snapshots/routes-param-on-server-directive.md_merged.snap index 96f8185f8a..810e4fc388 100644 --- a/tests/core/snapshots/routes-param-on-server-directive.md_merged.snap +++ b/tests/core/snapshots/routes-param-on-server-directive.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000, routes: {status: "/health", graphQL: "/tailcall-gql"}) @upstream { query: Query diff --git a/tests/core/snapshots/showcase.md_0.snap b/tests/core/snapshots/showcase.md_0.snap index 13a20b3310..47aa236a6f 100644 --- a/tests/core/snapshots/showcase.md_0.snap +++ b/tests/core/snapshots/showcase.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/showcase.md_1.snap b/tests/core/snapshots/showcase.md_1.snap index 6dfc7e9df6..5ed5cfd68f 100644 --- a/tests/core/snapshots/showcase.md_1.snap +++ b/tests/core/snapshots/showcase.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/showcase.md_2.snap b/tests/core/snapshots/showcase.md_2.snap index fe3dc5a3b5..df024399e3 100644 --- a/tests/core/snapshots/showcase.md_2.snap +++ b/tests/core/snapshots/showcase.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/showcase.md_3.snap b/tests/core/snapshots/showcase.md_3.snap index b178f82042..f92922fe3f 100644 --- a/tests/core/snapshots/showcase.md_3.snap +++ b/tests/core/snapshots/showcase.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/showcase.md_4.snap b/tests/core/snapshots/showcase.md_4.snap index 543411ada6..af8f49fd0a 100644 --- a/tests/core/snapshots/showcase.md_4.snap +++ b/tests/core/snapshots/showcase.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/showcase.md_client.snap b/tests/core/snapshots/showcase.md_client.snap index cf0792fa59..69b16c7027 100644 --- a/tests/core/snapshots/showcase.md_client.snap +++ b/tests/core/snapshots/showcase.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { not_user: User diff --git a/tests/core/snapshots/showcase.md_merged.snap b/tests/core/snapshots/showcase.md_merged.snap index b43ac5ec33..f4494af99b 100644 --- a/tests/core/snapshots/showcase.md_merged.snap +++ b/tests/core/snapshots/showcase.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(showcase: true) @upstream { query: Query diff --git a/tests/core/snapshots/simple-graphql.md_0.snap b/tests/core/snapshots/simple-graphql.md_0.snap index 13a20b3310..47aa236a6f 100644 --- a/tests/core/snapshots/simple-graphql.md_0.snap +++ b/tests/core/snapshots/simple-graphql.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/simple-graphql.md_1.snap b/tests/core/snapshots/simple-graphql.md_1.snap index 543411ada6..af8f49fd0a 100644 --- a/tests/core/snapshots/simple-graphql.md_1.snap +++ b/tests/core/snapshots/simple-graphql.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/simple-graphql.md_client.snap b/tests/core/snapshots/simple-graphql.md_client.snap index 52d67b233a..e7241293e9 100644 --- a/tests/core/snapshots/simple-graphql.md_client.snap +++ b/tests/core/snapshots/simple-graphql.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/simple-graphql.md_merged.snap b/tests/core/snapshots/simple-graphql.md_merged.snap index 9a8bef2a99..e498e56248 100644 --- a/tests/core/snapshots/simple-graphql.md_merged.snap +++ b/tests/core/snapshots/simple-graphql.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/simple-query.md_0.snap b/tests/core/snapshots/simple-query.md_0.snap index d24c105fb6..7f26ed092c 100644 --- a/tests/core/snapshots/simple-query.md_0.snap +++ b/tests/core/snapshots/simple-query.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/simple-query.md_client.snap b/tests/core/snapshots/simple-query.md_client.snap index 2215e476ec..50ede85f7f 100644 --- a/tests/core/snapshots/simple-query.md_client.snap +++ b/tests/core/snapshots/simple-query.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { firstUser: User diff --git a/tests/core/snapshots/simple-query.md_merged.snap b/tests/core/snapshots/simple-query.md_merged.snap index 8868c6973d..8be9e9164e 100644 --- a/tests/core/snapshots/simple-query.md_merged.snap +++ b/tests/core/snapshots/simple-query.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-add-field-error.md_error.snap b/tests/core/snapshots/test-add-field-error.md_error.snap index 7a9527f963..16cb3ca063 100644 --- a/tests/core/snapshots/test-add-field-error.md_error.snap +++ b/tests/core/snapshots/test-add-field-error.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-add-field-list.md_client.snap b/tests/core/snapshots/test-add-field-list.md_client.snap index fc75dbc1c8..519fda6b2d 100644 --- a/tests/core/snapshots/test-add-field-list.md_client.snap +++ b/tests/core/snapshots/test-add-field-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type A { b: B 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 50190e214b..c7c321da44 100644 --- a/tests/core/snapshots/test-add-field-list.md_merged.snap +++ b/tests/core/snapshots/test-add-field-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-add-field.md_client.snap b/tests/core/snapshots/test-add-field.md_client.snap index 9671af581c..d343e08c44 100644 --- a/tests/core/snapshots/test-add-field.md_client.snap +++ b/tests/core/snapshots/test-add-field.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type A { b: B diff --git a/tests/core/snapshots/test-add-field.md_merged.snap b/tests/core/snapshots/test-add-field.md_merged.snap index 8cae36924b..11af3abefd 100644 --- a/tests/core/snapshots/test-add-field.md_merged.snap +++ b/tests/core/snapshots/test-add-field.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-add-link-to-empty-config.md_client.snap b/tests/core/snapshots/test-add-link-to-empty-config.md_client.snap index aef4222523..04c53c1b6b 100644 --- a/tests/core/snapshots/test-add-link-to-empty-config.md_client.snap +++ b/tests/core/snapshots/test-add-link-to-empty-config.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- enum Foo { BAR 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 958855f115..0ef42d8708 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 @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream @link(src: "link-expr.graphql", type: Config) @link(src: "link-enum.graphql", type: Config) { query: Query diff --git a/tests/core/snapshots/test-alias-on-enum.md_0.snap b/tests/core/snapshots/test-alias-on-enum.md_0.snap index 3865a02a82..e66e9dcb08 100644 --- a/tests/core/snapshots/test-alias-on-enum.md_0.snap +++ b/tests/core/snapshots/test-alias-on-enum.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-alias-on-enum.md_client.snap b/tests/core/snapshots/test-alias-on-enum.md_client.snap index ba148eb921..b6d627b091 100644 --- a/tests/core/snapshots/test-alias-on-enum.md_client.snap +++ b/tests/core/snapshots/test-alias-on-enum.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type DTA { departments: [Department] diff --git a/tests/core/snapshots/test-alias-on-enum.md_merged.snap b/tests/core/snapshots/test-alias-on-enum.md_merged.snap index d03a191f48..1bd78119ae 100644 --- a/tests/core/snapshots/test-alias-on-enum.md_merged.snap +++ b/tests/core/snapshots/test-alias-on-enum.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(batchRequests: true) @upstream(batch: {delay: 1, headers: [], maxSize: 100}) { query: Query diff --git a/tests/core/snapshots/test-all-blueprint-errors.md_error.snap b/tests/core/snapshots/test-all-blueprint-errors.md_error.snap index 54f6633036..b81b8e69cc 100644 --- a/tests/core/snapshots/test-all-blueprint-errors.md_error.snap +++ b/tests/core/snapshots/test-all-blueprint-errors.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-batch-operator-post.md_error.snap b/tests/core/snapshots/test-batch-operator-post.md_error.snap index d7898cfbcf..f6e83511b3 100644 --- a/tests/core/snapshots/test-batch-operator-post.md_error.snap +++ b/tests/core/snapshots/test-batch-operator-post.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-batching-group-by.md_client.snap b/tests/core/snapshots/test-batching-group-by.md_client.snap index fd9e443470..30cf05313b 100644 --- a/tests/core/snapshots/test-batching-group-by.md_client.snap +++ b/tests/core/snapshots/test-batching-group-by.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String 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 fea8f0aafc..b9155f38bb 100644 --- a/tests/core/snapshots/test-batching-group-by.md_merged.snap +++ b/tests/core/snapshots/test-batching-group-by.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 4000) @upstream(batch: {delay: 1, headers: [], maxSize: 1000}) { query: Query diff --git a/tests/core/snapshots/test-cache.md_client.snap b/tests/core/snapshots/test-cache.md_client.snap index 52d67b233a..e7241293e9 100644 --- a/tests/core/snapshots/test-cache.md_client.snap +++ b/tests/core/snapshots/test-cache.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/test-cache.md_merged.snap b/tests/core/snapshots/test-cache.md_merged.snap index 60b95dc3a6..4d3a1e4f9d 100644 --- a/tests/core/snapshots/test-cache.md_merged.snap +++ b/tests/core/snapshots/test-cache.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-call-operator-errors.md_error.snap b/tests/core/snapshots/test-call-operator-errors.md_error.snap index 7c64620082..02f952f0e3 100644 --- a/tests/core/snapshots/test-call-operator-errors.md_error.snap +++ b/tests/core/snapshots/test-call-operator-errors.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-conflict-allowed-headers.md_merged.snap b/tests/core/snapshots/test-conflict-allowed-headers.md_merged.snap deleted file mode 100644 index d3aa18973c..0000000000 --- a/tests/core/snapshots/test-conflict-allowed-headers.md_merged.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server @upstream(allowedHeaders: ["a", "b", "c", "d"]) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} diff --git a/tests/core/snapshots/test-conflict-vars.md_merged.snap b/tests/core/snapshots/test-conflict-vars.md_merged.snap deleted file mode 100644 index 5dfdeaaabb..0000000000 --- a/tests/core/snapshots/test-conflict-vars.md_merged.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server(vars: [{key: "a", value: "b"}, {key: "c", value: "d"}, {key: "p", value: "q"}]) @upstream { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} diff --git a/tests/core/snapshots/test-custom-scalar.md_client.snap b/tests/core/snapshots/test-custom-scalar.md_client.snap index 2f96842cca..e9a26b07d1 100644 --- a/tests/core/snapshots/test-custom-scalar.md_client.snap +++ b/tests/core/snapshots/test-custom-scalar.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar Json diff --git a/tests/core/snapshots/test-custom-scalar.md_merged.snap b/tests/core/snapshots/test-custom-scalar.md_merged.snap index 2fa5fda505..57b604fd2d 100644 --- a/tests/core/snapshots/test-custom-scalar.md_merged.snap +++ b/tests/core/snapshots/test-custom-scalar.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-custom-types.md_client.snap b/tests/core/snapshots/test-custom-types.md_client.snap index 13bc848be8..e74271a6ff 100644 --- a/tests/core/snapshots/test-custom-types.md_client.snap +++ b/tests/core/snapshots/test-custom-types.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Mut { insertPost(input: PostInput): Post diff --git a/tests/core/snapshots/test-custom-types.md_merged.snap b/tests/core/snapshots/test-custom-types.md_merged.snap index 85914edbb4..ffecbfc28b 100644 --- a/tests/core/snapshots/test-custom-types.md_merged.snap +++ b/tests/core/snapshots/test-custom-types.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Que diff --git a/tests/core/snapshots/test-dbl-usage-many.md_client.snap b/tests/core/snapshots/test-dbl-usage-many.md_client.snap index 79f3866ae5..aa7b23f2e0 100644 --- a/tests/core/snapshots/test-dbl-usage-many.md_client.snap +++ b/tests/core/snapshots/test-dbl-usage-many.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: ID! diff --git a/tests/core/snapshots/test-dbl-usage-many.md_merged.snap b/tests/core/snapshots/test-dbl-usage-many.md_merged.snap index e688d2e90a..10f595a49d 100644 --- a/tests/core/snapshots/test-dbl-usage-many.md_merged.snap +++ b/tests/core/snapshots/test-dbl-usage-many.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-dedupe.md_0.snap b/tests/core/snapshots/test-dedupe.md_0.snap index 888b1eb108..0f96bf766c 100644 --- a/tests/core/snapshots/test-dedupe.md_0.snap +++ b/tests/core/snapshots/test-dedupe.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-dedupe.md_client.snap b/tests/core/snapshots/test-dedupe.md_client.snap index fd9e443470..30cf05313b 100644 --- a/tests/core/snapshots/test-dedupe.md_client.snap +++ b/tests/core/snapshots/test-dedupe.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/test-dedupe.md_merged.snap b/tests/core/snapshots/test-dedupe.md_merged.snap index ee9bcdee4d..236a2c900b 100644 --- a/tests/core/snapshots/test-dedupe.md_merged.snap +++ b/tests/core/snapshots/test-dedupe.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream(batch: {delay: 1, headers: []}) { query: Query diff --git a/tests/core/snapshots/test-description-many.md_client.snap b/tests/core/snapshots/test-description-many.md_client.snap index 273deb1aa2..272d53b9b3 100644 --- a/tests/core/snapshots/test-description-many.md_client.snap +++ b/tests/core/snapshots/test-description-many.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { """ diff --git a/tests/core/snapshots/test-description-many.md_merged.snap b/tests/core/snapshots/test-description-many.md_merged.snap index d20caf5b81..7b2691b392 100644 --- a/tests/core/snapshots/test-description-many.md_merged.snap +++ b/tests/core/snapshots/test-description-many.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-directives-undef-null-fields.md_error.snap b/tests/core/snapshots/test-directives-undef-null-fields.md_error.snap index adb506ebde..75fc301b09 100644 --- a/tests/core/snapshots/test-directives-undef-null-fields.md_error.snap +++ b/tests/core/snapshots/test-directives-undef-null-fields.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-discriminator-invalid.md_error.snap b/tests/core/snapshots/test-discriminator-invalid.md_error.snap index 2857f6554e..66782ec928 100644 --- a/tests/core/snapshots/test-discriminator-invalid.md_error.snap +++ b/tests/core/snapshots/test-discriminator-invalid.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-duplicated-link.md_error.snap b/tests/core/snapshots/test-duplicated-link.md_error.snap index 3f990dc863..d586ef2efb 100644 --- a/tests/core/snapshots/test-duplicated-link.md_error.snap +++ b/tests/core/snapshots/test-duplicated-link.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-empty-link.md_error.snap b/tests/core/snapshots/test-empty-link.md_error.snap index 6ee4deb1d6..a8d7985844 100644 --- a/tests/core/snapshots/test-empty-link.md_error.snap +++ b/tests/core/snapshots/test-empty-link.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-enable-jit.md_0.snap b/tests/core/snapshots/test-enable-jit.md_0.snap index bac993905e..1e57805967 100644 --- a/tests/core/snapshots/test-enable-jit.md_0.snap +++ b/tests/core/snapshots/test-enable-jit.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enable-jit.md_client.snap b/tests/core/snapshots/test-enable-jit.md_client.snap index f9f9daa9fa..0e8912877b 100644 --- a/tests/core/snapshots/test-enable-jit.md_client.snap +++ b/tests/core/snapshots/test-enable-jit.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int! diff --git a/tests/core/snapshots/test-enable-jit.md_merged.snap b/tests/core/snapshots/test-enable-jit.md_merged.snap index c79d7ac501..99a8a80fcb 100644 --- a/tests/core/snapshots/test-enable-jit.md_merged.snap +++ b/tests/core/snapshots/test-enable-jit.md_merged.snap @@ -1,8 +1,9 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- -schema @server(enableJIT: true, hostname: "0.0.0.0", port: 8000) @upstream { +schema @server(hostname: "0.0.0.0", port: 8000) @upstream { query: Query } diff --git a/tests/core/snapshots/test-enum-aliases.md_0.snap b/tests/core/snapshots/test-enum-aliases.md_0.snap index 63a4be352d..e608a998d2 100644 --- a/tests/core/snapshots/test-enum-aliases.md_0.snap +++ b/tests/core/snapshots/test-enum-aliases.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum-aliases.md_client.snap b/tests/core/snapshots/test-enum-aliases.md_client.snap index 61835c8112..81e90b81d1 100644 --- a/tests/core/snapshots/test-enum-aliases.md_client.snap +++ b/tests/core/snapshots/test-enum-aliases.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- enum Foo { BAR diff --git a/tests/core/snapshots/test-enum-aliases.md_merged.snap b/tests/core/snapshots/test-enum-aliases.md_merged.snap index 5034710372..91e46e9261 100644 --- a/tests/core/snapshots/test-enum-aliases.md_merged.snap +++ b/tests/core/snapshots/test-enum-aliases.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-enum-as-argument.md_0.snap b/tests/core/snapshots/test-enum-as-argument.md_0.snap index 65b72721d6..5b23dbc6b7 100644 --- a/tests/core/snapshots/test-enum-as-argument.md_0.snap +++ b/tests/core/snapshots/test-enum-as-argument.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum-as-argument.md_client.snap b/tests/core/snapshots/test-enum-as-argument.md_client.snap index bbeebabcdc..8e8f362180 100644 --- a/tests/core/snapshots/test-enum-as-argument.md_client.snap +++ b/tests/core/snapshots/test-enum-as-argument.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!, test: Test): User diff --git a/tests/core/snapshots/test-enum-as-argument.md_merged.snap b/tests/core/snapshots/test-enum-as-argument.md_merged.snap index 827f9e3471..f7b74c6ca2 100644 --- a/tests/core/snapshots/test-enum-as-argument.md_merged.snap +++ b/tests/core/snapshots/test-enum-as-argument.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-enum-default.md_0.snap b/tests/core/snapshots/test-enum-default.md_0.snap index 84d79bf621..9ae2ce124c 100644 --- a/tests/core/snapshots/test-enum-default.md_0.snap +++ b/tests/core/snapshots/test-enum-default.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum-default.md_client.snap b/tests/core/snapshots/test-enum-default.md_client.snap index 83d4755a05..6d9d8a6553 100644 --- a/tests/core/snapshots/test-enum-default.md_client.snap +++ b/tests/core/snapshots/test-enum-default.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { foo: Status diff --git a/tests/core/snapshots/test-enum-default.md_merged.snap b/tests/core/snapshots/test-enum-default.md_merged.snap index b85ad2e9e1..20c33a1ae6 100644 --- a/tests/core/snapshots/test-enum-default.md_merged.snap +++ b/tests/core/snapshots/test-enum-default.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8080) diff --git a/tests/core/snapshots/test-enum-description.md_0.snap b/tests/core/snapshots/test-enum-description.md_0.snap index 63a4be352d..e608a998d2 100644 --- a/tests/core/snapshots/test-enum-description.md_0.snap +++ b/tests/core/snapshots/test-enum-description.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum-description.md_1.snap b/tests/core/snapshots/test-enum-description.md_1.snap index 444b7bb300..cbbe92cfe0 100644 --- a/tests/core/snapshots/test-enum-description.md_1.snap +++ b/tests/core/snapshots/test-enum-description.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum-description.md_2.snap b/tests/core/snapshots/test-enum-description.md_2.snap index c19c038cf7..7ce161510f 100644 --- a/tests/core/snapshots/test-enum-description.md_2.snap +++ b/tests/core/snapshots/test-enum-description.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum-description.md_client.snap b/tests/core/snapshots/test-enum-description.md_client.snap index e9c648fde9..5ba6833a38 100644 --- a/tests/core/snapshots/test-enum-description.md_client.snap +++ b/tests/core/snapshots/test-enum-description.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- """ Description of enum Foo diff --git a/tests/core/snapshots/test-enum-description.md_merged.snap b/tests/core/snapshots/test-enum-description.md_merged.snap index 7adb432c3e..f8ce409f4d 100644 --- a/tests/core/snapshots/test-enum-description.md_merged.snap +++ b/tests/core/snapshots/test-enum-description.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { 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 b89d9c3e49..fc8d316853 100644 --- a/tests/core/snapshots/test-enum-merge.md_merged.snap +++ b/tests/core/snapshots/test-enum-merge.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-enum.md_0.snap b/tests/core/snapshots/test-enum.md_0.snap index 63a4be352d..e608a998d2 100644 --- a/tests/core/snapshots/test-enum.md_0.snap +++ b/tests/core/snapshots/test-enum.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum.md_1.snap b/tests/core/snapshots/test-enum.md_1.snap index 444b7bb300..cbbe92cfe0 100644 --- a/tests/core/snapshots/test-enum.md_1.snap +++ b/tests/core/snapshots/test-enum.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum.md_2.snap b/tests/core/snapshots/test-enum.md_2.snap index c19c038cf7..7ce161510f 100644 --- a/tests/core/snapshots/test-enum.md_2.snap +++ b/tests/core/snapshots/test-enum.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-enum.md_client.snap b/tests/core/snapshots/test-enum.md_client.snap index e9da37a23f..92f7a70fc5 100644 --- a/tests/core/snapshots/test-enum.md_client.snap +++ b/tests/core/snapshots/test-enum.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- enum Foo { BAR diff --git a/tests/core/snapshots/test-enum.md_merged.snap b/tests/core/snapshots/test-enum.md_merged.snap index 437f2b1be7..dbd1544547 100644 --- a/tests/core/snapshots/test-enum.md_merged.snap +++ b/tests/core/snapshots/test-enum.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-eval-partial.md_client.snap b/tests/core/snapshots/test-eval-partial.md_client.snap index 451a92880a..d3b1311d6c 100644 --- a/tests/core/snapshots/test-eval-partial.md_client.snap +++ b/tests/core/snapshots/test-eval-partial.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { foo: String diff --git a/tests/core/snapshots/test-eval-partial.md_merged.snap b/tests/core/snapshots/test-eval-partial.md_merged.snap index 2d8f99a4cf..1ee42b866e 100644 --- a/tests/core/snapshots/test-eval-partial.md_merged.snap +++ b/tests/core/snapshots/test-eval-partial.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8080) @upstream(batch: {delay: 100, headers: []}, httpCache: 42) { query: Query diff --git a/tests/core/snapshots/test-expr-error.md_error.snap b/tests/core/snapshots/test-expr-error.md_error.snap index cb7db5f40f..924fdbd2d7 100644 --- a/tests/core/snapshots/test-expr-error.md_error.snap +++ b/tests/core/snapshots/test-expr-error.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-expr-scalar-as-string.md_0.snap b/tests/core/snapshots/test-expr-scalar-as-string.md_0.snap index c7349486ac..6794274d5b 100644 --- a/tests/core/snapshots/test-expr-scalar-as-string.md_0.snap +++ b/tests/core/snapshots/test-expr-scalar-as-string.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-expr-scalar-as-string.md_client.snap b/tests/core/snapshots/test-expr-scalar-as-string.md_client.snap index 88402b4e2f..9b6dcea2db 100644 --- a/tests/core/snapshots/test-expr-scalar-as-string.md_client.snap +++ b/tests/core/snapshots/test-expr-scalar-as-string.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Entry { arr: String diff --git a/tests/core/snapshots/test-expr-scalar-as-string.md_merged.snap b/tests/core/snapshots/test-expr-scalar-as-string.md_merged.snap index 07a3608830..27657666e1 100644 --- a/tests/core/snapshots/test-expr-scalar-as-string.md_merged.snap +++ b/tests/core/snapshots/test-expr-scalar-as-string.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-expr-with-add-field.md_error.snap b/tests/core/snapshots/test-expr-with-add-field.md_error.snap index 0d8830eac9..2841835094 100644 --- a/tests/core/snapshots/test-expr-with-add-field.md_error.snap +++ b/tests/core/snapshots/test-expr-with-add-field.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-expr-with-inline.md_error.snap b/tests/core/snapshots/test-expr-with-inline.md_error.snap index 0d8830eac9..2841835094 100644 --- a/tests/core/snapshots/test-expr-with-inline.md_error.snap +++ b/tests/core/snapshots/test-expr-with-inline.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-expr-with-mustache.md_0.snap b/tests/core/snapshots/test-expr-with-mustache.md_0.snap index 0f772f2f1c..677819b1de 100644 --- a/tests/core/snapshots/test-expr-with-mustache.md_0.snap +++ b/tests/core/snapshots/test-expr-with-mustache.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-expr-with-mustache.md_client.snap b/tests/core/snapshots/test-expr-with-mustache.md_client.snap index 31ed790efb..cbfed108e0 100644 --- a/tests/core/snapshots/test-expr-with-mustache.md_client.snap +++ b/tests/core/snapshots/test-expr-with-mustache.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type A { a: Int 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 ca0e137c7d..b59bb7f1e2 100644 --- a/tests/core/snapshots/test-expr-with-mustache.md_merged.snap +++ b/tests/core/snapshots/test-expr-with-mustache.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-expr.md_client.snap b/tests/core/snapshots/test-expr.md_client.snap index cf7d4e49b2..cf3e72143e 100644 --- a/tests/core/snapshots/test-expr.md_client.snap +++ b/tests/core/snapshots/test-expr.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { hello: String diff --git a/tests/core/snapshots/test-expr.md_merged.snap b/tests/core/snapshots/test-expr.md_merged.snap index b51be71509..3ddfdaa657 100644 --- a/tests/core/snapshots/test-expr.md_merged.snap +++ b/tests/core/snapshots/test-expr.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-field-already-implemented-from-Interface.md_error.snap b/tests/core/snapshots/test-field-already-implemented-from-Interface.md_error.snap index e0af5a9a50..33c08f2890 100644 --- a/tests/core/snapshots/test-field-already-implemented-from-Interface.md_error.snap +++ b/tests/core/snapshots/test-field-already-implemented-from-Interface.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-graphql-with-add-field.md_error.snap b/tests/core/snapshots/test-graphql-with-add-field.md_error.snap index af649e47b8..813a35ddc9 100644 --- a/tests/core/snapshots/test-graphql-with-add-field.md_error.snap +++ b/tests/core/snapshots/test-graphql-with-add-field.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-graphqlsource-no-base-url.md_error.snap b/tests/core/snapshots/test-graphqlsource-no-base-url.md_error.snap index a1a4d2f8d8..8591d0c51f 100644 --- a/tests/core/snapshots/test-graphqlsource-no-base-url.md_error.snap +++ b/tests/core/snapshots/test-graphqlsource-no-base-url.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-graphqlsource.md_client.snap b/tests/core/snapshots/test-graphqlsource.md_client.snap index ab17028638..aa2ad928c4 100644 --- a/tests/core/snapshots/test-graphqlsource.md_client.snap +++ b/tests/core/snapshots/test-graphqlsource.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int! diff --git a/tests/core/snapshots/test-graphqlsource.md_merged.snap b/tests/core/snapshots/test-graphqlsource.md_merged.snap index b150aba580..a66230f9ca 100644 --- a/tests/core/snapshots/test-graphqlsource.md_merged.snap +++ b/tests/core/snapshots/test-graphqlsource.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-groupby-without-batching.md_error.snap b/tests/core/snapshots/test-groupby-without-batching.md_error.snap index b566d7c077..c73e3917c7 100644 --- a/tests/core/snapshots/test-groupby-without-batching.md_error.snap +++ b/tests/core/snapshots/test-groupby-without-batching.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-group-by.md_error.snap b/tests/core/snapshots/test-grpc-group-by.md_error.snap index a4356bd249..9c3d6068ca 100644 --- a/tests/core/snapshots/test-grpc-group-by.md_error.snap +++ b/tests/core/snapshots/test-grpc-group-by.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-invalid-method-format.md_error.snap b/tests/core/snapshots/test-grpc-invalid-method-format.md_error.snap index c2ca8b345f..bca0481047 100644 --- a/tests/core/snapshots/test-grpc-invalid-method-format.md_error.snap +++ b/tests/core/snapshots/test-grpc-invalid-method-format.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-invalid-proto-id.md_error.snap b/tests/core/snapshots/test-grpc-invalid-proto-id.md_error.snap index 36ee7add79..2a0cea068a 100644 --- a/tests/core/snapshots/test-grpc-invalid-proto-id.md_error.snap +++ b/tests/core/snapshots/test-grpc-invalid-proto-id.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-missing-fields.md_error.snap b/tests/core/snapshots/test-grpc-missing-fields.md_error.snap index cdde712544..060f1f371b 100644 --- a/tests/core/snapshots/test-grpc-missing-fields.md_error.snap +++ b/tests/core/snapshots/test-grpc-missing-fields.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-nested-data.md_error.snap b/tests/core/snapshots/test-grpc-nested-data.md_error.snap index 7ae4b0af3a..dcef34981d 100644 --- a/tests/core/snapshots/test-grpc-nested-data.md_error.snap +++ b/tests/core/snapshots/test-grpc-nested-data.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-nested-optional.md_error.snap b/tests/core/snapshots/test-grpc-nested-optional.md_error.snap index 1af2a9fb24..9f8b718472 100644 --- a/tests/core/snapshots/test-grpc-nested-optional.md_error.snap +++ b/tests/core/snapshots/test-grpc-nested-optional.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-optional.md_error.snap b/tests/core/snapshots/test-grpc-optional.md_error.snap index 1af2a9fb24..9f8b718472 100644 --- a/tests/core/snapshots/test-grpc-optional.md_error.snap +++ b/tests/core/snapshots/test-grpc-optional.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-proto-path.md_error.snap b/tests/core/snapshots/test-grpc-proto-path.md_error.snap index 34febb43e4..fe707bb313 100644 --- a/tests/core/snapshots/test-grpc-proto-path.md_error.snap +++ b/tests/core/snapshots/test-grpc-proto-path.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-service-method.md_error.snap b/tests/core/snapshots/test-grpc-service-method.md_error.snap index 95599fc658..a6fc982b8b 100644 --- a/tests/core/snapshots/test-grpc-service-method.md_error.snap +++ b/tests/core/snapshots/test-grpc-service-method.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc-service.md_error.snap b/tests/core/snapshots/test-grpc-service.md_error.snap index 269001ba60..5e0acb95cf 100644 --- a/tests/core/snapshots/test-grpc-service.md_error.snap +++ b/tests/core/snapshots/test-grpc-service.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-grpc.md_client.snap b/tests/core/snapshots/test-grpc.md_client.snap index c2a0078373..3960d84a5b 100644 --- a/tests/core/snapshots/test-grpc.md_client.snap +++ b/tests/core/snapshots/test-grpc.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { body: String diff --git a/tests/core/snapshots/test-grpc.md_merged.snap b/tests/core/snapshots/test-grpc.md_merged.snap index c28e68f243..41d30bb609 100644 --- a/tests/core/snapshots/test-grpc.md_merged.snap +++ b/tests/core/snapshots/test-grpc.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) diff --git a/tests/core/snapshots/test-hostname-faliure.md_error.snap b/tests/core/snapshots/test-hostname-faliure.md_error.snap index 2c6ac4d613..7aa9bcbb6d 100644 --- a/tests/core/snapshots/test-hostname-faliure.md_error.snap +++ b/tests/core/snapshots/test-hostname-faliure.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-http-baseurl.md_client.snap b/tests/core/snapshots/test-http-baseurl.md_client.snap index 72c16c7198..f5da839686 100644 --- a/tests/core/snapshots/test-http-baseurl.md_client.snap +++ b/tests/core/snapshots/test-http-baseurl.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { bar: String diff --git a/tests/core/snapshots/test-http-baseurl.md_merged.snap b/tests/core/snapshots/test-http-baseurl.md_merged.snap index 392fb06d80..cc47be3bf5 100644 --- a/tests/core/snapshots/test-http-baseurl.md_merged.snap +++ b/tests/core/snapshots/test-http-baseurl.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-http-batchKey.md_0.snap b/tests/core/snapshots/test-http-batchKey.md_0.snap index acc6d89665..f1e3f17d0a 100644 --- a/tests/core/snapshots/test-http-batchKey.md_0.snap +++ b/tests/core/snapshots/test-http-batchKey.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-http-batchKey.md_client.snap b/tests/core/snapshots/test-http-batchKey.md_client.snap index ba473f8b6c..bdea45701b 100644 --- a/tests/core/snapshots/test-http-batchKey.md_client.snap +++ b/tests/core/snapshots/test-http-batchKey.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { barName: String! diff --git a/tests/core/snapshots/test-http-batchKey.md_merged.snap b/tests/core/snapshots/test-http-batchKey.md_merged.snap index 9758dc57e8..db32d6cc8b 100644 --- a/tests/core/snapshots/test-http-batchKey.md_merged.snap +++ b/tests/core/snapshots/test-http-batchKey.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream(batch: {delay: 10, headers: [], maxSize: 1000}) { query: Query diff --git a/tests/core/snapshots/test-http-headers.md_client.snap b/tests/core/snapshots/test-http-headers.md_client.snap index 893ac9057a..83535d83b5 100644 --- a/tests/core/snapshots/test-http-headers.md_client.snap +++ b/tests/core/snapshots/test-http-headers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { foo: String diff --git a/tests/core/snapshots/test-http-headers.md_merged.snap b/tests/core/snapshots/test-http-headers.md_merged.snap index b092d6ce5e..c37ce5693a 100644 --- a/tests/core/snapshots/test-http-headers.md_merged.snap +++ b/tests/core/snapshots/test-http-headers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-http-tmpl.md_client.snap b/tests/core/snapshots/test-http-tmpl.md_client.snap index 8fb16284cc..176c973622 100644 --- a/tests/core/snapshots/test-http-tmpl.md_client.snap +++ b/tests/core/snapshots/test-http-tmpl.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int diff --git a/tests/core/snapshots/test-http-tmpl.md_merged.snap b/tests/core/snapshots/test-http-tmpl.md_merged.snap index a6e50217a9..433090ad72 100644 --- a/tests/core/snapshots/test-http-tmpl.md_merged.snap +++ b/tests/core/snapshots/test-http-tmpl.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-http-with-add-field.md_error.snap b/tests/core/snapshots/test-http-with-add-field.md_error.snap index f1751bc827..160c4d809a 100644 --- a/tests/core/snapshots/test-http-with-add-field.md_error.snap +++ b/tests/core/snapshots/test-http-with-add-field.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-http-with-mustache-expr.md_0.snap b/tests/core/snapshots/test-http-with-mustache-expr.md_0.snap index 1f4ae40457..51fbfa64ff 100644 --- a/tests/core/snapshots/test-http-with-mustache-expr.md_0.snap +++ b/tests/core/snapshots/test-http-with-mustache-expr.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-http-with-mustache-expr.md_client.snap b/tests/core/snapshots/test-http-with-mustache-expr.md_client.snap index 9524d6fce7..6e04035337 100644 --- a/tests/core/snapshots/test-http-with-mustache-expr.md_client.snap +++ b/tests/core/snapshots/test-http-with-mustache-expr.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type A { a: Int 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 e5edab4670..1d8d5bf889 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 @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-http.md_client.snap b/tests/core/snapshots/test-http.md_client.snap index 71177707fd..07c7621583 100644 --- a/tests/core/snapshots/test-http.md_client.snap +++ b/tests/core/snapshots/test-http.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { foo: [User] diff --git a/tests/core/snapshots/test-http.md_merged.snap b/tests/core/snapshots/test-http.md_merged.snap index f8f0de135b..cd22df357e 100644 --- a/tests/core/snapshots/test-http.md_merged.snap +++ b/tests/core/snapshots/test-http.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-inline-error.md_error.snap b/tests/core/snapshots/test-inline-error.md_error.snap index 7a9527f963..16cb3ca063 100644 --- a/tests/core/snapshots/test-inline-error.md_error.snap +++ b/tests/core/snapshots/test-inline-error.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-inline-list.md_client.snap b/tests/core/snapshots/test-inline-list.md_client.snap index b1001b9d44..826d7855e9 100644 --- a/tests/core/snapshots/test-inline-list.md_client.snap +++ b/tests/core/snapshots/test-inline-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type B { c: String diff --git a/tests/core/snapshots/test-inline-list.md_merged.snap b/tests/core/snapshots/test-inline-list.md_merged.snap index 1d80e282fe..91c70844e4 100644 --- a/tests/core/snapshots/test-inline-list.md_merged.snap +++ b/tests/core/snapshots/test-inline-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-inline.md_client.snap b/tests/core/snapshots/test-inline.md_client.snap index b1001b9d44..826d7855e9 100644 --- a/tests/core/snapshots/test-inline.md_client.snap +++ b/tests/core/snapshots/test-inline.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type B { c: String diff --git a/tests/core/snapshots/test-inline.md_merged.snap b/tests/core/snapshots/test-inline.md_merged.snap index 277d53aae3..4109c5111c 100644 --- a/tests/core/snapshots/test-inline.md_merged.snap +++ b/tests/core/snapshots/test-inline.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-input-documentation.md_client.snap b/tests/core/snapshots/test-input-documentation.md_client.snap index 4c1ac2ef1d..7bb10c7e1d 100644 --- a/tests/core/snapshots/test-input-documentation.md_client.snap +++ b/tests/core/snapshots/test-input-documentation.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- """ Test input documentation diff --git a/tests/core/snapshots/test-input-documentation.md_merged.snap b/tests/core/snapshots/test-input-documentation.md_merged.snap index e43065e953..8fcbe93e49 100644 --- a/tests/core/snapshots/test-input-documentation.md_merged.snap +++ b/tests/core/snapshots/test-input-documentation.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-input-out.md_0.snap b/tests/core/snapshots/test-input-out.md_0.snap index 2ff2759825..81054dd298 100644 --- a/tests/core/snapshots/test-input-out.md_0.snap +++ b/tests/core/snapshots/test-input-out.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-input-out.md_client.snap b/tests/core/snapshots/test-input-out.md_client.snap index 0ebb9fa91a..207ce4b424 100644 --- a/tests/core/snapshots/test-input-out.md_client.snap +++ b/tests/core/snapshots/test-input-out.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input Filter { a: Int diff --git a/tests/core/snapshots/test-input-out.md_merged.snap b/tests/core/snapshots/test-input-out.md_merged.snap index 7e4b4b24ad..12b686f37a 100644 --- a/tests/core/snapshots/test-input-out.md_merged.snap +++ b/tests/core/snapshots/test-input-out.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-input-with-arg-out.md_0.snap b/tests/core/snapshots/test-input-with-arg-out.md_0.snap index 15a8438551..1054ae3c79 100644 --- a/tests/core/snapshots/test-input-with-arg-out.md_0.snap +++ b/tests/core/snapshots/test-input-with-arg-out.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-input-with-arg-out.md_client.snap b/tests/core/snapshots/test-input-with-arg-out.md_client.snap index 58bdb48805..d5e21fd05f 100644 --- a/tests/core/snapshots/test-input-with-arg-out.md_client.snap +++ b/tests/core/snapshots/test-input-with-arg-out.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input IntFilter { i: Int diff --git a/tests/core/snapshots/test-input-with-arg-out.md_merged.snap b/tests/core/snapshots/test-input-with-arg-out.md_merged.snap index c542bcf4b2..25c6801da3 100644 --- a/tests/core/snapshots/test-input-with-arg-out.md_merged.snap +++ b/tests/core/snapshots/test-input-with-arg-out.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-interface-from-json.md_client.snap b/tests/core/snapshots/test-interface-from-json.md_client.snap deleted file mode 100644 index ed99fa7b6d..0000000000 --- a/tests/core/snapshots/test-interface-from-json.md_client.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatted ---- -type B implements IA { - a: String - b: String -} - -interface IA { - a: String -} - -type Query { - bar: B -} - -schema { - query: Query -} diff --git a/tests/core/snapshots/test-interface-from-json.md_merged.snap b/tests/core/snapshots/test-interface-from-json.md_merged.snap deleted file mode 100644 index 862f3e1cf3..0000000000 --- a/tests/core/snapshots/test-interface-from-json.md_merged.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server @upstream { - query: Query -} - -interface IA { - a: String -} - -type B implements IA { - a: String - b: String -} - -type Query { - bar: B @http(url: "http://jsonplaceholder.typicode.com/posts") -} diff --git a/tests/core/snapshots/test-interface-result.md_client.snap b/tests/core/snapshots/test-interface-result.md_client.snap index 6d3262740c..c82d287eed 100644 --- a/tests/core/snapshots/test-interface-result.md_client.snap +++ b/tests/core/snapshots/test-interface-result.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type B implements IA { a: String diff --git a/tests/core/snapshots/test-interface-result.md_merged.snap b/tests/core/snapshots/test-interface-result.md_merged.snap index 98bcdf6616..9596ef2ad4 100644 --- a/tests/core/snapshots/test-interface-result.md_merged.snap +++ b/tests/core/snapshots/test-interface-result.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-interface.md_client.snap b/tests/core/snapshots/test-interface.md_client.snap index ed99fa7b6d..90711e7bb4 100644 --- a/tests/core/snapshots/test-interface.md_client.snap +++ b/tests/core/snapshots/test-interface.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type B implements IA { a: String diff --git a/tests/core/snapshots/test-interface.md_merged.snap b/tests/core/snapshots/test-interface.md_merged.snap index a501bc8b26..5ffda913b3 100644 --- a/tests/core/snapshots/test-interface.md_merged.snap +++ b/tests/core/snapshots/test-interface.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-invalid-add-field.md_error.snap b/tests/core/snapshots/test-invalid-add-field.md_error.snap index 89c8031f06..79f7d431a0 100644 --- a/tests/core/snapshots/test-invalid-add-field.md_error.snap +++ b/tests/core/snapshots/test-invalid-add-field.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-invalid-query-in-http.md_error.snap b/tests/core/snapshots/test-invalid-query-in-http.md_error.snap index 7d4320c23c..6c5920d4bd 100644 --- a/tests/core/snapshots/test-invalid-query-in-http.md_error.snap +++ b/tests/core/snapshots/test-invalid-query-in-http.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-invalid-server.md_error.snap b/tests/core/snapshots/test-invalid-server.md_error.snap index 07613bc3f8..e2df00654c 100644 --- a/tests/core/snapshots/test-invalid-server.md_error.snap +++ b/tests/core/snapshots/test-invalid-server.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-js-multi-onRequest-handlers.md_0.snap b/tests/core/snapshots/test-js-multi-onRequest-handlers.md_0.snap index a2a02837c3..70f7bba26d 100644 --- a/tests/core/snapshots/test-js-multi-onRequest-handlers.md_0.snap +++ b/tests/core/snapshots/test-js-multi-onRequest-handlers.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-js-multi-onRequest-handlers.md_client.snap b/tests/core/snapshots/test-js-multi-onRequest-handlers.md_client.snap index 72c16c7198..f5da839686 100644 --- a/tests/core/snapshots/test-js-multi-onRequest-handlers.md_client.snap +++ b/tests/core/snapshots/test-js-multi-onRequest-handlers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { bar: String diff --git a/tests/core/snapshots/test-js-multi-onRequest-handlers.md_merged.snap b/tests/core/snapshots/test-js-multi-onRequest-handlers.md_merged.snap index 1a8a1467d8..d517ca727e 100644 --- a/tests/core/snapshots/test-js-multi-onRequest-handlers.md_merged.snap +++ b/tests/core/snapshots/test-js-multi-onRequest-handlers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(onRequest: "foo") @link(src: "test1.js", type: Script) { query: Query diff --git a/tests/core/snapshots/test-js-multiple-scripts.md_error.snap b/tests/core/snapshots/test-js-multiple-scripts.md_error.snap index 8dd40ad345..e31620f228 100644 --- a/tests/core/snapshots/test-js-multiple-scripts.md_error.snap +++ b/tests/core/snapshots/test-js-multiple-scripts.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-js-request-response-2.md_0.snap b/tests/core/snapshots/test-js-request-response-2.md_0.snap index e06b77077f..ea36cdcf19 100644 --- a/tests/core/snapshots/test-js-request-response-2.md_0.snap +++ b/tests/core/snapshots/test-js-request-response-2.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-js-request-response-2.md_client.snap b/tests/core/snapshots/test-js-request-response-2.md_client.snap index 25a6202924..66463bf273 100644 --- a/tests/core/snapshots/test-js-request-response-2.md_client.snap +++ b/tests/core/snapshots/test-js-request-response-2.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { hello: String diff --git a/tests/core/snapshots/test-js-request-response-2.md_merged.snap b/tests/core/snapshots/test-js-request-response-2.md_merged.snap index adc0aea1a2..3dc3fa9b99 100644 --- a/tests/core/snapshots/test-js-request-response-2.md_merged.snap +++ b/tests/core/snapshots/test-js-request-response-2.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(onRequest: "onRequest") @link(src: "test.js", type: Script) { query: Query diff --git a/tests/core/snapshots/test-js-request-response.md_0.snap b/tests/core/snapshots/test-js-request-response.md_0.snap index e5cf278cca..86dae90e60 100644 --- a/tests/core/snapshots/test-js-request-response.md_0.snap +++ b/tests/core/snapshots/test-js-request-response.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-js-request-response.md_client.snap b/tests/core/snapshots/test-js-request-response.md_client.snap index 25a6202924..66463bf273 100644 --- a/tests/core/snapshots/test-js-request-response.md_client.snap +++ b/tests/core/snapshots/test-js-request-response.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { hello: String diff --git a/tests/core/snapshots/test-js-request-response.md_merged.snap b/tests/core/snapshots/test-js-request-response.md_merged.snap index adc0aea1a2..3dc3fa9b99 100644 --- a/tests/core/snapshots/test-js-request-response.md_merged.snap +++ b/tests/core/snapshots/test-js-request-response.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(onRequest: "onRequest") @link(src: "test.js", type: Script) { query: Query diff --git a/tests/core/snapshots/test-lack-resolver.md_error.snap b/tests/core/snapshots/test-lack-resolver.md_error.snap index e3e60e1cbf..b7cb19e404 100644 --- a/tests/core/snapshots/test-lack-resolver.md_error.snap +++ b/tests/core/snapshots/test-lack-resolver.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-link-support.md_client.snap b/tests/core/snapshots/test-link-support.md_client.snap index 4fae1e7ef2..a36079729b 100644 --- a/tests/core/snapshots/test-link-support.md_client.snap +++ b/tests/core/snapshots/test-link-support.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type News { id: Int diff --git a/tests/core/snapshots/test-link-support.md_merged.snap b/tests/core/snapshots/test-link-support.md_merged.snap index 77a0d25bd1..b634ff91a3 100644 --- a/tests/core/snapshots/test-link-support.md_merged.snap +++ b/tests/core/snapshots/test-link-support.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) diff --git a/tests/core/snapshots/test-list-args.md_0.snap b/tests/core/snapshots/test-list-args.md_0.snap index 1bc9bbe17b..25f5659c92 100644 --- a/tests/core/snapshots/test-list-args.md_0.snap +++ b/tests/core/snapshots/test-list-args.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-list-args.md_client.snap b/tests/core/snapshots/test-list-args.md_client.snap index a8cfceb734..efb907356d 100644 --- a/tests/core/snapshots/test-list-args.md_client.snap +++ b/tests/core/snapshots/test-list-args.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { f1(q: [Int!]!): T1 diff --git a/tests/core/snapshots/test-list-args.md_merged.snap b/tests/core/snapshots/test-list-args.md_merged.snap index fc12f058d8..251187ef8d 100644 --- a/tests/core/snapshots/test-list-args.md_merged.snap +++ b/tests/core/snapshots/test-list-args.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(queryValidation: true) @upstream { query: Query diff --git a/tests/core/snapshots/test-merge-batch.md_merged.snap b/tests/core/snapshots/test-merge-batch.md_merged.snap deleted file mode 100644 index 9fbe79d5e4..0000000000 --- a/tests/core/snapshots/test-merge-batch.md_merged.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server @upstream(batch: {delay: 5, headers: ["a", "b", "c"], maxSize: 100}) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} diff --git a/tests/core/snapshots/test-merge-input.md_merged.snap b/tests/core/snapshots/test-merge-input.md_merged.snap index 6e4b03023c..38d084b008 100644 --- a/tests/core/snapshots/test-merge-input.md_merged.snap +++ b/tests/core/snapshots/test-merge-input.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-merge-invalid.md_error.snap b/tests/core/snapshots/test-merge-invalid.md_error.snap index e51fab4b42..d56b499085 100644 --- a/tests/core/snapshots/test-merge-invalid.md_error.snap +++ b/tests/core/snapshots/test-merge-invalid.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-merge-nested.md_merged.snap b/tests/core/snapshots/test-merge-nested.md_merged.snap index 53cfa26fe5..a280778f39 100644 --- a/tests/core/snapshots/test-merge-nested.md_merged.snap +++ b/tests/core/snapshots/test-merge-nested.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-merge-query.md_merged.snap b/tests/core/snapshots/test-merge-query.md_merged.snap deleted file mode 100644 index 6f9a054135..0000000000 --- a/tests/core/snapshots/test-merge-query.md_merged.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server(port: 8000) @upstream(proxy: {url: "http://localhost:3000"}) { - query: Query -} - -type Query { - hello: String @expr(body: "world") - hi: String @expr(body: "world") -} diff --git a/tests/core/snapshots/test-merge-right-with-link-config.md_client.snap b/tests/core/snapshots/test-merge-right-with-link-config.md_client.snap index 20622b2fcc..41407d991a 100644 --- a/tests/core/snapshots/test-merge-right-with-link-config.md_client.snap +++ b/tests/core/snapshots/test-merge-right-with-link-config.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Foo { bar: String 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 a6b105f6d0..43a8b80655 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 @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(allowedHeaders: ["Authorization"]) @link(src: "stripe-types.graphql", type: Config) { query: Query diff --git a/tests/core/snapshots/test-merge-server-sdl.md_client.snap b/tests/core/snapshots/test-merge-server-sdl.md_client.snap index 71177707fd..07c7621583 100644 --- a/tests/core/snapshots/test-merge-server-sdl.md_client.snap +++ b/tests/core/snapshots/test-merge-server-sdl.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { foo: [User] 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 f8f0de135b..cd22df357e 100644 --- a/tests/core/snapshots/test-merge-server-sdl.md_merged.snap +++ b/tests/core/snapshots/test-merge-server-sdl.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { 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 5e2242004a..0cbf042e85 100644 --- a/tests/core/snapshots/test-merge-union.md_merged.snap +++ b/tests/core/snapshots/test-merge-union.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-missing-argument-on-all-resolvers.md_error.snap b/tests/core/snapshots/test-missing-argument-on-all-resolvers.md_error.snap index bd0885307f..7fbc1235a2 100644 --- a/tests/core/snapshots/test-missing-argument-on-all-resolvers.md_error.snap +++ b/tests/core/snapshots/test-missing-argument-on-all-resolvers.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-missing-mutation-resolver.md_error.snap b/tests/core/snapshots/test-missing-mutation-resolver.md_error.snap index dd5c76b19e..741434bdea 100644 --- a/tests/core/snapshots/test-missing-mutation-resolver.md_error.snap +++ b/tests/core/snapshots/test-missing-mutation-resolver.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-missing-query-resolver.md_error.snap b/tests/core/snapshots/test-missing-query-resolver.md_error.snap index f1ee6ca5be..3cdb1249d7 100644 --- a/tests/core/snapshots/test-missing-query-resolver.md_error.snap +++ b/tests/core/snapshots/test-missing-query-resolver.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-missing-root-types.md_error.snap b/tests/core/snapshots/test-missing-root-types.md_error.snap index 60b7f03d34..3b3130afb2 100644 --- a/tests/core/snapshots/test-missing-root-types.md_error.snap +++ b/tests/core/snapshots/test-missing-root-types.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-missing-schema-query.md_error.snap b/tests/core/snapshots/test-missing-schema-query.md_error.snap index 1ef6c7ae5c..3a503a338a 100644 --- a/tests/core/snapshots/test-missing-schema-query.md_error.snap +++ b/tests/core/snapshots/test-missing-schema-query.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-modify.md_client.snap b/tests/core/snapshots/test-modify.md_client.snap index ef63ab86b3..459ef85407 100644 --- a/tests/core/snapshots/test-modify.md_client.snap +++ b/tests/core/snapshots/test-modify.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input Foo { bar: String diff --git a/tests/core/snapshots/test-modify.md_merged.snap b/tests/core/snapshots/test-modify.md_merged.snap index 0d1e56bd20..67ea796b33 100644 --- a/tests/core/snapshots/test-modify.md_merged.snap +++ b/tests/core/snapshots/test-modify.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-multi-interface.md_client.snap b/tests/core/snapshots/test-multi-interface.md_client.snap index 3164ef9e7e..9a2b8c8708 100644 --- a/tests/core/snapshots/test-multi-interface.md_client.snap +++ b/tests/core/snapshots/test-multi-interface.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type B implements IA & IB { a: String diff --git a/tests/core/snapshots/test-multi-interface.md_merged.snap b/tests/core/snapshots/test-multi-interface.md_merged.snap index f02eeafe4b..583c0a5edb 100644 --- a/tests/core/snapshots/test-multi-interface.md_merged.snap +++ b/tests/core/snapshots/test-multi-interface.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-multiple-config-types.md_0.snap b/tests/core/snapshots/test-multiple-config-types.md_0.snap index 1966d10828..b5887500b9 100644 --- a/tests/core/snapshots/test-multiple-config-types.md_0.snap +++ b/tests/core/snapshots/test-multiple-config-types.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-multiple-config-types.md_client.snap b/tests/core/snapshots/test-multiple-config-types.md_client.snap index b4fa7fb1e0..d91e778255 100644 --- a/tests/core/snapshots/test-multiple-config-types.md_client.snap +++ b/tests/core/snapshots/test-multiple-config-types.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input Input { id: Int diff --git a/tests/core/snapshots/test-multiple-config-types.md_merged.snap b/tests/core/snapshots/test-multiple-config-types.md_merged.snap index cec9ceca15..e05036c91a 100644 --- a/tests/core/snapshots/test-multiple-config-types.md_merged.snap +++ b/tests/core/snapshots/test-multiple-config-types.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream @link(id: "types", src: "types.graphql", type: Config) { query: Query diff --git a/tests/core/snapshots/test-nested-input.md_client.snap b/tests/core/snapshots/test-nested-input.md_client.snap index 4987f728f2..90ba2ad5af 100644 --- a/tests/core/snapshots/test-nested-input.md_client.snap +++ b/tests/core/snapshots/test-nested-input.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input A { b: B diff --git a/tests/core/snapshots/test-nested-input.md_merged.snap b/tests/core/snapshots/test-nested-input.md_merged.snap index bc99ec2f52..f1af17927d 100644 --- a/tests/core/snapshots/test-nested-input.md_merged.snap +++ b/tests/core/snapshots/test-nested-input.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-nested-value.md_client.snap b/tests/core/snapshots/test-nested-value.md_client.snap index 57bd37c184..147260b871 100644 --- a/tests/core/snapshots/test-nested-value.md_client.snap +++ b/tests/core/snapshots/test-nested-value.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int diff --git a/tests/core/snapshots/test-nested-value.md_merged.snap b/tests/core/snapshots/test-nested-value.md_merged.snap index dba926a18b..f81545e195 100644 --- a/tests/core/snapshots/test-nested-value.md_merged.snap +++ b/tests/core/snapshots/test-nested-value.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-no-base-url.md_error.snap b/tests/core/snapshots/test-no-base-url.md_error.snap index 7cd87d8050..9de0d45b83 100644 --- a/tests/core/snapshots/test-no-base-url.md_error.snap +++ b/tests/core/snapshots/test-no-base-url.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-null-in-array.md_0.snap b/tests/core/snapshots/test-null-in-array.md_0.snap index 4d68912c6b..ba0d171785 100644 --- a/tests/core/snapshots/test-null-in-array.md_0.snap +++ b/tests/core/snapshots/test-null-in-array.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-null-in-array.md_client.snap b/tests/core/snapshots/test-null-in-array.md_client.snap index 4ca0f268e9..b3915fc9d1 100644 --- a/tests/core/snapshots/test-null-in-array.md_client.snap +++ b/tests/core/snapshots/test-null-in-array.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Company { id: ID 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 e79c3bf609..09c71a8e3f 100644 --- a/tests/core/snapshots/test-null-in-array.md_merged.snap +++ b/tests/core/snapshots/test-null-in-array.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-null-in-object.md_0.snap b/tests/core/snapshots/test-null-in-object.md_0.snap index 4d68912c6b..ba0d171785 100644 --- a/tests/core/snapshots/test-null-in-object.md_0.snap +++ b/tests/core/snapshots/test-null-in-object.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-null-in-object.md_client.snap b/tests/core/snapshots/test-null-in-object.md_client.snap index beb3b12a9a..a5415245d9 100644 --- a/tests/core/snapshots/test-null-in-object.md_client.snap +++ b/tests/core/snapshots/test-null-in-object.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Company { id: ID 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 71358c0856..fca5bf4c96 100644 --- a/tests/core/snapshots/test-null-in-object.md_merged.snap +++ b/tests/core/snapshots/test-null-in-object.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-omit-list.md_client.snap b/tests/core/snapshots/test-omit-list.md_client.snap index b1001b9d44..826d7855e9 100644 --- a/tests/core/snapshots/test-omit-list.md_client.snap +++ b/tests/core/snapshots/test-omit-list.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type B { c: String diff --git a/tests/core/snapshots/test-omit-list.md_merged.snap b/tests/core/snapshots/test-omit-list.md_merged.snap index 45b11d9668..1064d17850 100644 --- a/tests/core/snapshots/test-omit-list.md_merged.snap +++ b/tests/core/snapshots/test-omit-list.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-omit.md_client.snap b/tests/core/snapshots/test-omit.md_client.snap index b1001b9d44..826d7855e9 100644 --- a/tests/core/snapshots/test-omit.md_client.snap +++ b/tests/core/snapshots/test-omit.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type B { c: String diff --git a/tests/core/snapshots/test-omit.md_merged.snap b/tests/core/snapshots/test-omit.md_merged.snap index 3d585c67a6..f6a93ab9fc 100644 --- a/tests/core/snapshots/test-omit.md_merged.snap +++ b/tests/core/snapshots/test-omit.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-on-response-body.md_0.snap b/tests/core/snapshots/test-on-response-body.md_0.snap index 0e379e6c38..bb2c739c1d 100644 --- a/tests/core/snapshots/test-on-response-body.md_0.snap +++ b/tests/core/snapshots/test-on-response-body.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-on-response-body.md_client.snap b/tests/core/snapshots/test-on-response-body.md_client.snap index 8cf0b9181a..c604bcc5ab 100644 --- a/tests/core/snapshots/test-on-response-body.md_client.snap +++ b/tests/core/snapshots/test-on-response-body.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { hello: User! diff --git a/tests/core/snapshots/test-on-response-body.md_merged.snap b/tests/core/snapshots/test-on-response-body.md_merged.snap index 6dfbd8353a..8e6a03e6db 100644 --- a/tests/core/snapshots/test-on-response-body.md_merged.snap +++ b/tests/core/snapshots/test-on-response-body.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream @link(src: "test.js", type: Script) { query: Query diff --git a/tests/core/snapshots/test-optional-key-skip-empty.md_0.snap b/tests/core/snapshots/test-optional-key-skip-empty.md_0.snap index fd8b8ab5a3..434222e7d2 100644 --- a/tests/core/snapshots/test-optional-key-skip-empty.md_0.snap +++ b/tests/core/snapshots/test-optional-key-skip-empty.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-optional-key-skip-empty.md_client.snap b/tests/core/snapshots/test-optional-key-skip-empty.md_client.snap index b6e374918e..e727f179cf 100644 --- a/tests/core/snapshots/test-optional-key-skip-empty.md_client.snap +++ b/tests/core/snapshots/test-optional-key-skip-empty.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { id: Int diff --git a/tests/core/snapshots/test-optional-key-skip-empty.md_merged.snap b/tests/core/snapshots/test-optional-key-skip-empty.md_merged.snap index 33fe93e046..8cef87639a 100644 --- a/tests/core/snapshots/test-optional-key-skip-empty.md_merged.snap +++ b/tests/core/snapshots/test-optional-key-skip-empty.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/test-params-as-body.md_0.snap b/tests/core/snapshots/test-params-as-body.md_0.snap index 79e85dfc9a..ad3d30f02e 100644 --- a/tests/core/snapshots/test-params-as-body.md_0.snap +++ b/tests/core/snapshots/test-params-as-body.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-params-as-body.md_client.snap b/tests/core/snapshots/test-params-as-body.md_client.snap index 28e6b0d379..c35936ada4 100644 --- a/tests/core/snapshots/test-params-as-body.md_client.snap +++ b/tests/core/snapshots/test-params-as-body.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { firstUser(id: Int, name: String): User diff --git a/tests/core/snapshots/test-params-as-body.md_merged.snap b/tests/core/snapshots/test-params-as-body.md_merged.snap index 3dbe617929..72da37e0d5 100644 --- a/tests/core/snapshots/test-params-as-body.md_merged.snap +++ b/tests/core/snapshots/test-params-as-body.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/test-query-documentation.md_client.snap b/tests/core/snapshots/test-query-documentation.md_client.snap index 3de62904ae..f2ecbe533f 100644 --- a/tests/core/snapshots/test-query-documentation.md_client.snap +++ b/tests/core/snapshots/test-query-documentation.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { """ diff --git a/tests/core/snapshots/test-query-documentation.md_merged.snap b/tests/core/snapshots/test-query-documentation.md_merged.snap index fcbdb7fae6..3ff8b266ed 100644 --- a/tests/core/snapshots/test-query-documentation.md_merged.snap +++ b/tests/core/snapshots/test-query-documentation.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-query.md_client.snap b/tests/core/snapshots/test-query.md_client.snap index 893ac9057a..83535d83b5 100644 --- a/tests/core/snapshots/test-query.md_client.snap +++ b/tests/core/snapshots/test-query.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { foo: String diff --git a/tests/core/snapshots/test-query.md_merged.snap b/tests/core/snapshots/test-query.md_merged.snap index 93e8e8a71a..964f29c16d 100644 --- a/tests/core/snapshots/test-query.md_merged.snap +++ b/tests/core/snapshots/test-query.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-ref-other.md_client.snap b/tests/core/snapshots/test-ref-other.md_client.snap index 13bd3067b7..209fd5f468 100644 --- a/tests/core/snapshots/test-ref-other.md_client.snap +++ b/tests/core/snapshots/test-ref-other.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type InPost { get: [Post] diff --git a/tests/core/snapshots/test-ref-other.md_merged.snap b/tests/core/snapshots/test-ref-other.md_merged.snap index 48e7f7cc1d..b68ace1656 100644 --- a/tests/core/snapshots/test-ref-other.md_merged.snap +++ b/tests/core/snapshots/test-ref-other.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/test-required-fields.md_0.snap b/tests/core/snapshots/test-required-fields.md_0.snap index c526e94e7a..66f46413fc 100644 --- a/tests/core/snapshots/test-required-fields.md_0.snap +++ b/tests/core/snapshots/test-required-fields.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_1.snap b/tests/core/snapshots/test-required-fields.md_1.snap index 93309c9793..5c382678e4 100644 --- a/tests/core/snapshots/test-required-fields.md_1.snap +++ b/tests/core/snapshots/test-required-fields.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_10.snap b/tests/core/snapshots/test-required-fields.md_10.snap index 1621f25fbc..7bf48c41d7 100644 --- a/tests/core/snapshots/test-required-fields.md_10.snap +++ b/tests/core/snapshots/test-required-fields.md_10.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_11.snap b/tests/core/snapshots/test-required-fields.md_11.snap index 7cb54826dc..07c1522b94 100644 --- a/tests/core/snapshots/test-required-fields.md_11.snap +++ b/tests/core/snapshots/test-required-fields.md_11.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_12.snap b/tests/core/snapshots/test-required-fields.md_12.snap index b5d4689146..5277a57a05 100644 --- a/tests/core/snapshots/test-required-fields.md_12.snap +++ b/tests/core/snapshots/test-required-fields.md_12.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_13.snap b/tests/core/snapshots/test-required-fields.md_13.snap index 5a2e8949c7..70f6d7932e 100644 --- a/tests/core/snapshots/test-required-fields.md_13.snap +++ b/tests/core/snapshots/test-required-fields.md_13.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_14.snap b/tests/core/snapshots/test-required-fields.md_14.snap index c5e590a3a4..82929e42af 100644 --- a/tests/core/snapshots/test-required-fields.md_14.snap +++ b/tests/core/snapshots/test-required-fields.md_14.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_15.snap b/tests/core/snapshots/test-required-fields.md_15.snap index e96d3c87a0..6299179dff 100644 --- a/tests/core/snapshots/test-required-fields.md_15.snap +++ b/tests/core/snapshots/test-required-fields.md_15.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_16.snap b/tests/core/snapshots/test-required-fields.md_16.snap index f04b340dcd..50a8fe5e9e 100644 --- a/tests/core/snapshots/test-required-fields.md_16.snap +++ b/tests/core/snapshots/test-required-fields.md_16.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_17.snap b/tests/core/snapshots/test-required-fields.md_17.snap index cabdc83aea..55402b20cd 100644 --- a/tests/core/snapshots/test-required-fields.md_17.snap +++ b/tests/core/snapshots/test-required-fields.md_17.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_18.snap b/tests/core/snapshots/test-required-fields.md_18.snap index f3832a962b..97be6ba2f7 100644 --- a/tests/core/snapshots/test-required-fields.md_18.snap +++ b/tests/core/snapshots/test-required-fields.md_18.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_19.snap b/tests/core/snapshots/test-required-fields.md_19.snap index 52b8480df5..7776228c50 100644 --- a/tests/core/snapshots/test-required-fields.md_19.snap +++ b/tests/core/snapshots/test-required-fields.md_19.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_2.snap b/tests/core/snapshots/test-required-fields.md_2.snap index 7f404ec366..2e5bd877f2 100644 --- a/tests/core/snapshots/test-required-fields.md_2.snap +++ b/tests/core/snapshots/test-required-fields.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_20.snap b/tests/core/snapshots/test-required-fields.md_20.snap index 8ec7714e13..d1560ac02d 100644 --- a/tests/core/snapshots/test-required-fields.md_20.snap +++ b/tests/core/snapshots/test-required-fields.md_20.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_21.snap b/tests/core/snapshots/test-required-fields.md_21.snap index 0a7dffb745..c4f767a268 100644 --- a/tests/core/snapshots/test-required-fields.md_21.snap +++ b/tests/core/snapshots/test-required-fields.md_21.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_3.snap b/tests/core/snapshots/test-required-fields.md_3.snap index 635314f4a5..0dde3714c7 100644 --- a/tests/core/snapshots/test-required-fields.md_3.snap +++ b/tests/core/snapshots/test-required-fields.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_4.snap b/tests/core/snapshots/test-required-fields.md_4.snap index 39634a5fb0..aa4bbd0c4a 100644 --- a/tests/core/snapshots/test-required-fields.md_4.snap +++ b/tests/core/snapshots/test-required-fields.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_5.snap b/tests/core/snapshots/test-required-fields.md_5.snap index 9ecc8ec71f..1a7f69912b 100644 --- a/tests/core/snapshots/test-required-fields.md_5.snap +++ b/tests/core/snapshots/test-required-fields.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_6.snap b/tests/core/snapshots/test-required-fields.md_6.snap index 2355e1e2bb..3ee0fb8fc0 100644 --- a/tests/core/snapshots/test-required-fields.md_6.snap +++ b/tests/core/snapshots/test-required-fields.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_7.snap b/tests/core/snapshots/test-required-fields.md_7.snap index 79647f46ac..12de839d46 100644 --- a/tests/core/snapshots/test-required-fields.md_7.snap +++ b/tests/core/snapshots/test-required-fields.md_7.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_8.snap b/tests/core/snapshots/test-required-fields.md_8.snap index d0b7ef5c84..98716d3c5a 100644 --- a/tests/core/snapshots/test-required-fields.md_8.snap +++ b/tests/core/snapshots/test-required-fields.md_8.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_9.snap b/tests/core/snapshots/test-required-fields.md_9.snap index 046718d6d8..0074311326 100644 --- a/tests/core/snapshots/test-required-fields.md_9.snap +++ b/tests/core/snapshots/test-required-fields.md_9.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-required-fields.md_client.snap b/tests/core/snapshots/test-required-fields.md_client.snap index da516ad64a..f4c7890a3c 100644 --- a/tests/core/snapshots/test-required-fields.md_client.snap +++ b/tests/core/snapshots/test-required-fields.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Foo { bar: String! diff --git a/tests/core/snapshots/test-required-fields.md_merged.snap b/tests/core/snapshots/test-required-fields.md_merged.snap index 8bbe4199e1..5cb6c7f4f3 100644 --- a/tests/core/snapshots/test-required-fields.md_merged.snap +++ b/tests/core/snapshots/test-required-fields.md_merged.snap @@ -1,8 +1,9 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- -schema @server(enableJIT: true) @upstream { +schema @server @upstream { 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 deleted file mode 100644 index 11630662de..0000000000 --- a/tests/core/snapshots/test-response-header-merge.md_merged.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server(headers: {custom: [{key: "a", value: "a"}, {key: "a", value: "b"}]}) @upstream { - query: Query -} - -type Query { - user: User @expr(body: {name: "John"}) -} - -type User { - age: Int - name: String -} diff --git a/tests/core/snapshots/test-response-header-value.md_error.snap b/tests/core/snapshots/test-response-header-value.md_error.snap index d319669132..c5275556d7 100644 --- a/tests/core/snapshots/test-response-header-value.md_error.snap +++ b/tests/core/snapshots/test-response-header-value.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-response-headers-multi.md_error.snap b/tests/core/snapshots/test-response-headers-multi.md_error.snap index e7de957c9f..1b3b2c86d8 100644 --- a/tests/core/snapshots/test-response-headers-multi.md_error.snap +++ b/tests/core/snapshots/test-response-headers-multi.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-response-headers-name.md_error.snap b/tests/core/snapshots/test-response-headers-name.md_error.snap index a611958fd3..6bdfd0e23c 100644 --- a/tests/core/snapshots/test-response-headers-name.md_error.snap +++ b/tests/core/snapshots/test-response-headers-name.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-scalars-builtin.md_0.snap b/tests/core/snapshots/test-scalars-builtin.md_0.snap index 62bb903e82..1658c38be8 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_0.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_1.snap b/tests/core/snapshots/test-scalars-builtin.md_1.snap index b514a1c322..11401376dc 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_1.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_2.snap b/tests/core/snapshots/test-scalars-builtin.md_2.snap index 4a94435126..a15ede8ca6 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_2.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_3.snap b/tests/core/snapshots/test-scalars-builtin.md_3.snap index 58ded18820..50bae97d95 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_3.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_4.snap b/tests/core/snapshots/test-scalars-builtin.md_4.snap index b42dfec930..b0b345d96f 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_4.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_5.snap b/tests/core/snapshots/test-scalars-builtin.md_5.snap index f118c465e4..fbba4c9e6e 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_5.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_6.snap b/tests/core/snapshots/test-scalars-builtin.md_6.snap index 75d3e68ca6..cde138dd2f 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_6.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_7.snap b/tests/core/snapshots/test-scalars-builtin.md_7.snap index 5dcfe0cd33..d6228e88e9 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_7.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_7.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_8.snap b/tests/core/snapshots/test-scalars-builtin.md_8.snap index ca92d7d6a2..a0b8bbd508 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_8.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_8.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_9.snap b/tests/core/snapshots/test-scalars-builtin.md_9.snap index 060ab67009..4a205aec18 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_9.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_9.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-builtin.md_client.snap b/tests/core/snapshots/test-scalars-builtin.md_client.snap index 89aecbaf7d..dfd0868801 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_client.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { bool(x: Boolean!): Boolean! diff --git a/tests/core/snapshots/test-scalars-builtin.md_merged.snap b/tests/core/snapshots/test-scalars-builtin.md_merged.snap index f6158dcce3..f279807bdd 100644 --- a/tests/core/snapshots/test-scalars-builtin.md_merged.snap +++ b/tests/core/snapshots/test-scalars-builtin.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "localhost", port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/test-scalars-integers.md_0.snap b/tests/core/snapshots/test-scalars-integers.md_0.snap index 2a25ec8e33..1d6f999e83 100644 --- a/tests/core/snapshots/test-scalars-integers.md_0.snap +++ b/tests/core/snapshots/test-scalars-integers.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_1.snap b/tests/core/snapshots/test-scalars-integers.md_1.snap index 6def729548..76ca444a0e 100644 --- a/tests/core/snapshots/test-scalars-integers.md_1.snap +++ b/tests/core/snapshots/test-scalars-integers.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_10.snap b/tests/core/snapshots/test-scalars-integers.md_10.snap index 182fa51189..81338cb469 100644 --- a/tests/core/snapshots/test-scalars-integers.md_10.snap +++ b/tests/core/snapshots/test-scalars-integers.md_10.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_11.snap b/tests/core/snapshots/test-scalars-integers.md_11.snap index 43cb390a6f..5dbf29fd5f 100644 --- a/tests/core/snapshots/test-scalars-integers.md_11.snap +++ b/tests/core/snapshots/test-scalars-integers.md_11.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_12.snap b/tests/core/snapshots/test-scalars-integers.md_12.snap index c17790102d..2d890fc7b7 100644 --- a/tests/core/snapshots/test-scalars-integers.md_12.snap +++ b/tests/core/snapshots/test-scalars-integers.md_12.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_13.snap b/tests/core/snapshots/test-scalars-integers.md_13.snap index 5ec8943cfd..57d30d3336 100644 --- a/tests/core/snapshots/test-scalars-integers.md_13.snap +++ b/tests/core/snapshots/test-scalars-integers.md_13.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_14.snap b/tests/core/snapshots/test-scalars-integers.md_14.snap index 4cb6dda6c3..7c0699f375 100644 --- a/tests/core/snapshots/test-scalars-integers.md_14.snap +++ b/tests/core/snapshots/test-scalars-integers.md_14.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_15.snap b/tests/core/snapshots/test-scalars-integers.md_15.snap index 3fcc674209..fbfe1907a9 100644 --- a/tests/core/snapshots/test-scalars-integers.md_15.snap +++ b/tests/core/snapshots/test-scalars-integers.md_15.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_16.snap b/tests/core/snapshots/test-scalars-integers.md_16.snap index eff516b2e0..e61443ed9e 100644 --- a/tests/core/snapshots/test-scalars-integers.md_16.snap +++ b/tests/core/snapshots/test-scalars-integers.md_16.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_17.snap b/tests/core/snapshots/test-scalars-integers.md_17.snap index 9f1436b96b..f4fba8d411 100644 --- a/tests/core/snapshots/test-scalars-integers.md_17.snap +++ b/tests/core/snapshots/test-scalars-integers.md_17.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_18.snap b/tests/core/snapshots/test-scalars-integers.md_18.snap index d8d6497ac2..ce2e27d1e2 100644 --- a/tests/core/snapshots/test-scalars-integers.md_18.snap +++ b/tests/core/snapshots/test-scalars-integers.md_18.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_19.snap b/tests/core/snapshots/test-scalars-integers.md_19.snap index 4f8df4c842..84dc4e57ed 100644 --- a/tests/core/snapshots/test-scalars-integers.md_19.snap +++ b/tests/core/snapshots/test-scalars-integers.md_19.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_2.snap b/tests/core/snapshots/test-scalars-integers.md_2.snap index 555aa36411..d22c1dc60c 100644 --- a/tests/core/snapshots/test-scalars-integers.md_2.snap +++ b/tests/core/snapshots/test-scalars-integers.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_3.snap b/tests/core/snapshots/test-scalars-integers.md_3.snap index 5ec8943cfd..57d30d3336 100644 --- a/tests/core/snapshots/test-scalars-integers.md_3.snap +++ b/tests/core/snapshots/test-scalars-integers.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_4.snap b/tests/core/snapshots/test-scalars-integers.md_4.snap index 4cb6dda6c3..7c0699f375 100644 --- a/tests/core/snapshots/test-scalars-integers.md_4.snap +++ b/tests/core/snapshots/test-scalars-integers.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_5.snap b/tests/core/snapshots/test-scalars-integers.md_5.snap index 14eea1b242..3867575fb2 100644 --- a/tests/core/snapshots/test-scalars-integers.md_5.snap +++ b/tests/core/snapshots/test-scalars-integers.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_6.snap b/tests/core/snapshots/test-scalars-integers.md_6.snap index 97668132c8..278d433d8a 100644 --- a/tests/core/snapshots/test-scalars-integers.md_6.snap +++ b/tests/core/snapshots/test-scalars-integers.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_7.snap b/tests/core/snapshots/test-scalars-integers.md_7.snap index 6b11162cea..caeda97cea 100644 --- a/tests/core/snapshots/test-scalars-integers.md_7.snap +++ b/tests/core/snapshots/test-scalars-integers.md_7.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_8.snap b/tests/core/snapshots/test-scalars-integers.md_8.snap index d8d6497ac2..ce2e27d1e2 100644 --- a/tests/core/snapshots/test-scalars-integers.md_8.snap +++ b/tests/core/snapshots/test-scalars-integers.md_8.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_9.snap b/tests/core/snapshots/test-scalars-integers.md_9.snap index 4cb6dda6c3..7c0699f375 100644 --- a/tests/core/snapshots/test-scalars-integers.md_9.snap +++ b/tests/core/snapshots/test-scalars-integers.md_9.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-integers.md_client.snap b/tests/core/snapshots/test-scalars-integers.md_client.snap index fa0535a2d2..a3ebf9ad2b 100644 --- a/tests/core/snapshots/test-scalars-integers.md_client.snap +++ b/tests/core/snapshots/test-scalars-integers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar Int128 diff --git a/tests/core/snapshots/test-scalars-integers.md_merged.snap b/tests/core/snapshots/test-scalars-integers.md_merged.snap index fbaa2637f8..76f051652f 100644 --- a/tests/core/snapshots/test-scalars-integers.md_merged.snap +++ b/tests/core/snapshots/test-scalars-integers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "localhost", port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/test-scalars-validation.md_0.snap b/tests/core/snapshots/test-scalars-validation.md_0.snap index beb99f57f6..d38b516c96 100644 --- a/tests/core/snapshots/test-scalars-validation.md_0.snap +++ b/tests/core/snapshots/test-scalars-validation.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-validation.md_1.snap b/tests/core/snapshots/test-scalars-validation.md_1.snap index 46968e50a8..e7e2a6cfac 100644 --- a/tests/core/snapshots/test-scalars-validation.md_1.snap +++ b/tests/core/snapshots/test-scalars-validation.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars-validation.md_client.snap b/tests/core/snapshots/test-scalars-validation.md_client.snap index 61d4a75ca6..6393b85ced 100644 --- a/tests/core/snapshots/test-scalars-validation.md_client.snap +++ b/tests/core/snapshots/test-scalars-validation.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar Email diff --git a/tests/core/snapshots/test-scalars-validation.md_merged.snap b/tests/core/snapshots/test-scalars-validation.md_merged.snap index 9705a3c67b..e03035e098 100644 --- a/tests/core/snapshots/test-scalars-validation.md_merged.snap +++ b/tests/core/snapshots/test-scalars-validation.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "localhost", port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/test-scalars.md_0.snap b/tests/core/snapshots/test-scalars.md_0.snap index 3eab7453aa..4f57095d00 100644 --- a/tests/core/snapshots/test-scalars.md_0.snap +++ b/tests/core/snapshots/test-scalars.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_1.snap b/tests/core/snapshots/test-scalars.md_1.snap index 500fc09ad1..df4bf26985 100644 --- a/tests/core/snapshots/test-scalars.md_1.snap +++ b/tests/core/snapshots/test-scalars.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_10.snap b/tests/core/snapshots/test-scalars.md_10.snap index 4ab684e59e..25c87102c3 100644 --- a/tests/core/snapshots/test-scalars.md_10.snap +++ b/tests/core/snapshots/test-scalars.md_10.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_11.snap b/tests/core/snapshots/test-scalars.md_11.snap index 22b5ad0dd1..842a7dec7c 100644 --- a/tests/core/snapshots/test-scalars.md_11.snap +++ b/tests/core/snapshots/test-scalars.md_11.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_2.snap b/tests/core/snapshots/test-scalars.md_2.snap index 4f94abe2af..bc4476ab14 100644 --- a/tests/core/snapshots/test-scalars.md_2.snap +++ b/tests/core/snapshots/test-scalars.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_3.snap b/tests/core/snapshots/test-scalars.md_3.snap index e40c6e03cc..08646cea17 100644 --- a/tests/core/snapshots/test-scalars.md_3.snap +++ b/tests/core/snapshots/test-scalars.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_4.snap b/tests/core/snapshots/test-scalars.md_4.snap index 307ade083b..6130c2b004 100644 --- a/tests/core/snapshots/test-scalars.md_4.snap +++ b/tests/core/snapshots/test-scalars.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_5.snap b/tests/core/snapshots/test-scalars.md_5.snap index c8930b71ec..7ec99229ad 100644 --- a/tests/core/snapshots/test-scalars.md_5.snap +++ b/tests/core/snapshots/test-scalars.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_6.snap b/tests/core/snapshots/test-scalars.md_6.snap index f05fab41e1..32d3b73adb 100644 --- a/tests/core/snapshots/test-scalars.md_6.snap +++ b/tests/core/snapshots/test-scalars.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_7.snap b/tests/core/snapshots/test-scalars.md_7.snap index 8b0ea58a37..9a35ae7c6c 100644 --- a/tests/core/snapshots/test-scalars.md_7.snap +++ b/tests/core/snapshots/test-scalars.md_7.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_8.snap b/tests/core/snapshots/test-scalars.md_8.snap index 8b0ea58a37..9a35ae7c6c 100644 --- a/tests/core/snapshots/test-scalars.md_8.snap +++ b/tests/core/snapshots/test-scalars.md_8.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_9.snap b/tests/core/snapshots/test-scalars.md_9.snap index 31a1a3502f..7b20a78331 100644 --- a/tests/core/snapshots/test-scalars.md_9.snap +++ b/tests/core/snapshots/test-scalars.md_9.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-scalars.md_client.snap b/tests/core/snapshots/test-scalars.md_client.snap index 5df81ae1f3..fedae7aed9 100644 --- a/tests/core/snapshots/test-scalars.md_client.snap +++ b/tests/core/snapshots/test-scalars.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- scalar AnyScalar diff --git a/tests/core/snapshots/test-scalars.md_merged.snap b/tests/core/snapshots/test-scalars.md_merged.snap index d9a41eb6d3..5059882fea 100644 --- a/tests/core/snapshots/test-scalars.md_merged.snap +++ b/tests/core/snapshots/test-scalars.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(hostname: "localhost", port: 8000) @upstream { query: Query diff --git a/tests/core/snapshots/test-server-base-types.md_merged.snap b/tests/core/snapshots/test-server-base-types.md_merged.snap deleted file mode 100644 index 28376478fc..0000000000 --- a/tests/core/snapshots/test-server-base-types.md_merged.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server(port: 8000) @upstream(proxy: {url: "http://localhost:3000"}) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} diff --git a/tests/core/snapshots/test-server-vars.md_client.snap b/tests/core/snapshots/test-server-vars.md_client.snap index 893ac9057a..83535d83b5 100644 --- a/tests/core/snapshots/test-server-vars.md_client.snap +++ b/tests/core/snapshots/test-server-vars.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { foo: String diff --git a/tests/core/snapshots/test-server-vars.md_merged.snap b/tests/core/snapshots/test-server-vars.md_merged.snap index c321e56517..9e747b7c71 100644 --- a/tests/core/snapshots/test-server-vars.md_merged.snap +++ b/tests/core/snapshots/test-server-vars.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(vars: [{key: "foo", value: "bar"}]) @upstream { query: Query diff --git a/tests/core/snapshots/test-set-cookie-headers.md_0.snap b/tests/core/snapshots/test-set-cookie-headers.md_0.snap index 3353c44cf4..f1a5e1581c 100644 --- a/tests/core/snapshots/test-set-cookie-headers.md_0.snap +++ b/tests/core/snapshots/test-set-cookie-headers.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-set-cookie-headers.md_client.snap b/tests/core/snapshots/test-set-cookie-headers.md_client.snap index dc89262eb4..ac0a7f491c 100644 --- a/tests/core/snapshots/test-set-cookie-headers.md_client.snap +++ b/tests/core/snapshots/test-set-cookie-headers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User diff --git a/tests/core/snapshots/test-set-cookie-headers.md_merged.snap b/tests/core/snapshots/test-set-cookie-headers.md_merged.snap index 963ab3bb14..4fc810e0d0 100644 --- a/tests/core/snapshots/test-set-cookie-headers.md_merged.snap +++ b/tests/core/snapshots/test-set-cookie-headers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(headers: {setCookies: true}, hostname: "0.0.0.0", port: 8080) @upstream { query: Query diff --git a/tests/core/snapshots/test-static-value.md_0.snap b/tests/core/snapshots/test-static-value.md_0.snap deleted file mode 100644 index a085a7c561..0000000000 --- a/tests/core/snapshots/test-static-value.md_0.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: tests/core/spec.rs -expression: response ---- -{ - "status": 200, - "headers": { - "content-type": "application/json" - }, - "body": { - "data": { - "firstUser": { - "name": "Leanne Graham" - } - } - } -} diff --git a/tests/core/snapshots/test-static-value.md_client.snap b/tests/core/snapshots/test-static-value.md_client.snap deleted file mode 100644 index 2215e476ec..0000000000 --- a/tests/core/snapshots/test-static-value.md_client.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatted ---- -type Query { - firstUser: User -} - -type User { - id: Int - name: String -} - -schema { - query: Query -} diff --git a/tests/core/snapshots/test-static-value.md_merged.snap b/tests/core/snapshots/test-static-value.md_merged.snap deleted file mode 100644 index 8868c6973d..0000000000 --- a/tests/core/snapshots/test-static-value.md_merged.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/core/spec.rs -expression: formatter ---- -schema @server @upstream { - query: Query -} - -type Query { - firstUser: User @http(url: "http://jsonplaceholder.typicode.com/users/1") -} - -type User { - id: Int - name: String -} diff --git a/tests/core/snapshots/test-undefined-query.md_error.snap b/tests/core/snapshots/test-undefined-query.md_error.snap index bb7fe8faa3..69cef16c0f 100644 --- a/tests/core/snapshots/test-undefined-query.md_error.snap +++ b/tests/core/snapshots/test-undefined-query.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/test-union-ambiguous.md_0.snap b/tests/core/snapshots/test-union-ambiguous.md_0.snap index 2f186f034f..710beddaca 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_0.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-ambiguous.md_1.snap b/tests/core/snapshots/test-union-ambiguous.md_1.snap index d26243da59..f5825ffb6b 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_1.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-ambiguous.md_2.snap b/tests/core/snapshots/test-union-ambiguous.md_2.snap index 96120f5e5f..41ca716873 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_2.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-ambiguous.md_3.snap b/tests/core/snapshots/test-union-ambiguous.md_3.snap index 7f53a81beb..be70b71b95 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_3.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-ambiguous.md_4.snap b/tests/core/snapshots/test-union-ambiguous.md_4.snap index bf451fd1dc..db9007ce09 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_4.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-ambiguous.md_5.snap b/tests/core/snapshots/test-union-ambiguous.md_5.snap index 1adef3514b..98aa4f61a2 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_5.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-ambiguous.md_6.snap b/tests/core/snapshots/test-union-ambiguous.md_6.snap index ae8c321583..b2efb013e7 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_6.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_6.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-ambiguous.md_client.snap b/tests/core/snapshots/test-union-ambiguous.md_client.snap index 1ec9ab05a5..827ce1ac1a 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_client.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { bar: String diff --git a/tests/core/snapshots/test-union-ambiguous.md_merged.snap b/tests/core/snapshots/test-union-ambiguous.md_merged.snap index 0aeaeec408..585c8182bc 100644 --- a/tests/core/snapshots/test-union-ambiguous.md_merged.snap +++ b/tests/core/snapshots/test-union-ambiguous.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-union-fieldtype.md_0.snap b/tests/core/snapshots/test-union-fieldtype.md_0.snap index 2f186f034f..710beddaca 100644 --- a/tests/core/snapshots/test-union-fieldtype.md_0.snap +++ b/tests/core/snapshots/test-union-fieldtype.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-fieldtype.md_1.snap b/tests/core/snapshots/test-union-fieldtype.md_1.snap index d26243da59..f5825ffb6b 100644 --- a/tests/core/snapshots/test-union-fieldtype.md_1.snap +++ b/tests/core/snapshots/test-union-fieldtype.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-fieldtype.md_2.snap b/tests/core/snapshots/test-union-fieldtype.md_2.snap index 96120f5e5f..41ca716873 100644 --- a/tests/core/snapshots/test-union-fieldtype.md_2.snap +++ b/tests/core/snapshots/test-union-fieldtype.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-fieldtype.md_3.snap b/tests/core/snapshots/test-union-fieldtype.md_3.snap index 7f53a81beb..be70b71b95 100644 --- a/tests/core/snapshots/test-union-fieldtype.md_3.snap +++ b/tests/core/snapshots/test-union-fieldtype.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-fieldtype.md_4.snap b/tests/core/snapshots/test-union-fieldtype.md_4.snap index 138061d6dd..a131323177 100644 --- a/tests/core/snapshots/test-union-fieldtype.md_4.snap +++ b/tests/core/snapshots/test-union-fieldtype.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-fieldtype.md_5.snap b/tests/core/snapshots/test-union-fieldtype.md_5.snap index 442efd36fc..bd2b798622 100644 --- a/tests/core/snapshots/test-union-fieldtype.md_5.snap +++ b/tests/core/snapshots/test-union-fieldtype.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-fieldtype.md_client.snap b/tests/core/snapshots/test-union-fieldtype.md_client.snap index 894a0c5eee..086bd9d6fb 100644 --- a/tests/core/snapshots/test-union-fieldtype.md_client.snap +++ b/tests/core/snapshots/test-union-fieldtype.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { bar: String! diff --git a/tests/core/snapshots/test-union-fieldtype.md_merged.snap b/tests/core/snapshots/test-union-fieldtype.md_merged.snap index b1a3657093..13628d0617 100644 --- a/tests/core/snapshots/test-union-fieldtype.md_merged.snap +++ b/tests/core/snapshots/test-union-fieldtype.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-union-optional.md_0.snap b/tests/core/snapshots/test-union-optional.md_0.snap index 2e683d4faf..e9bba47086 100644 --- a/tests/core/snapshots/test-union-optional.md_0.snap +++ b/tests/core/snapshots/test-union-optional.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-optional.md_1.snap b/tests/core/snapshots/test-union-optional.md_1.snap index 691cf26ad3..fc3126df12 100644 --- a/tests/core/snapshots/test-union-optional.md_1.snap +++ b/tests/core/snapshots/test-union-optional.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union-optional.md_client.snap b/tests/core/snapshots/test-union-optional.md_client.snap index f6f6d021a8..665dd49c84 100644 --- a/tests/core/snapshots/test-union-optional.md_client.snap +++ b/tests/core/snapshots/test-union-optional.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- union Node = Page | User diff --git a/tests/core/snapshots/test-union-optional.md_merged.snap b/tests/core/snapshots/test-union-optional.md_merged.snap index 534140806b..308b79562d 100644 --- a/tests/core/snapshots/test-union-optional.md_merged.snap +++ b/tests/core/snapshots/test-union-optional.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-union.md_0.snap b/tests/core/snapshots/test-union.md_0.snap index 2f186f034f..710beddaca 100644 --- a/tests/core/snapshots/test-union.md_0.snap +++ b/tests/core/snapshots/test-union.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union.md_1.snap b/tests/core/snapshots/test-union.md_1.snap index d26243da59..f5825ffb6b 100644 --- a/tests/core/snapshots/test-union.md_1.snap +++ b/tests/core/snapshots/test-union.md_1.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union.md_2.snap b/tests/core/snapshots/test-union.md_2.snap index 96120f5e5f..41ca716873 100644 --- a/tests/core/snapshots/test-union.md_2.snap +++ b/tests/core/snapshots/test-union.md_2.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union.md_3.snap b/tests/core/snapshots/test-union.md_3.snap index 7f53a81beb..be70b71b95 100644 --- a/tests/core/snapshots/test-union.md_3.snap +++ b/tests/core/snapshots/test-union.md_3.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union.md_4.snap b/tests/core/snapshots/test-union.md_4.snap index dea0eb5c4c..655cbbd941 100644 --- a/tests/core/snapshots/test-union.md_4.snap +++ b/tests/core/snapshots/test-union.md_4.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union.md_5.snap b/tests/core/snapshots/test-union.md_5.snap index 442efd36fc..bd2b798622 100644 --- a/tests/core/snapshots/test-union.md_5.snap +++ b/tests/core/snapshots/test-union.md_5.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-union.md_client.snap b/tests/core/snapshots/test-union.md_client.snap index 894a0c5eee..086bd9d6fb 100644 --- a/tests/core/snapshots/test-union.md_client.snap +++ b/tests/core/snapshots/test-union.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Bar { bar: String! diff --git a/tests/core/snapshots/test-union.md_merged.snap b/tests/core/snapshots/test-union.md_merged.snap index b1a3657093..13628d0617 100644 --- a/tests/core/snapshots/test-union.md_merged.snap +++ b/tests/core/snapshots/test-union.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/test-upstream-headers.md_0.snap b/tests/core/snapshots/test-upstream-headers.md_0.snap index db824d6b4b..6895d518ad 100644 --- a/tests/core/snapshots/test-upstream-headers.md_0.snap +++ b/tests/core/snapshots/test-upstream-headers.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/test-upstream-headers.md_client.snap b/tests/core/snapshots/test-upstream-headers.md_client.snap index cd159a474a..f66fd5e3ba 100644 --- a/tests/core/snapshots/test-upstream-headers.md_client.snap +++ b/tests/core/snapshots/test-upstream-headers.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { id: Int diff --git a/tests/core/snapshots/test-upstream-headers.md_merged.snap b/tests/core/snapshots/test-upstream-headers.md_merged.snap index 5f295cf41b..9e2217c6c9 100644 --- a/tests/core/snapshots/test-upstream-headers.md_merged.snap +++ b/tests/core/snapshots/test-upstream-headers.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(allowedHeaders: ["X-bar", "x-foo"]) { query: Query diff --git a/tests/core/snapshots/test-upstream.md_client.snap b/tests/core/snapshots/test-upstream.md_client.snap index cf7d4e49b2..cf3e72143e 100644 --- a/tests/core/snapshots/test-upstream.md_client.snap +++ b/tests/core/snapshots/test-upstream.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { hello: String diff --git a/tests/core/snapshots/test-upstream.md_merged.snap b/tests/core/snapshots/test-upstream.md_merged.snap index 7ff7dd576d..608b9a2957 100644 --- a/tests/core/snapshots/test-upstream.md_merged.snap +++ b/tests/core/snapshots/test-upstream.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(proxy: {url: "http://localhost:8085"}) { query: Query diff --git a/tests/core/snapshots/undeclared-type-no-base-url.md_error.snap b/tests/core/snapshots/undeclared-type-no-base-url.md_error.snap index fe591d2f33..15cac99abc 100644 --- a/tests/core/snapshots/undeclared-type-no-base-url.md_error.snap +++ b/tests/core/snapshots/undeclared-type-no-base-url.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/undeclared-type.md_error.snap b/tests/core/snapshots/undeclared-type.md_error.snap index fe591d2f33..15cac99abc 100644 --- a/tests/core/snapshots/undeclared-type.md_error.snap +++ b/tests/core/snapshots/undeclared-type.md_error.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: errors +snapshot_kind: text --- [ { diff --git a/tests/core/snapshots/union-nested-resolver.md_0.snap b/tests/core/snapshots/union-nested-resolver.md_0.snap index d5a48537ba..936998aad7 100644 --- a/tests/core/snapshots/union-nested-resolver.md_0.snap +++ b/tests/core/snapshots/union-nested-resolver.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/union-nested-resolver.md_client.snap b/tests/core/snapshots/union-nested-resolver.md_client.snap index 3a8e8b76c7..f28c7d6e04 100644 --- a/tests/core/snapshots/union-nested-resolver.md_client.snap +++ b/tests/core/snapshots/union-nested-resolver.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Buzz { spam: Spam diff --git a/tests/core/snapshots/union-nested-resolver.md_merged.snap b/tests/core/snapshots/union-nested-resolver.md_merged.snap index 0ad71b5a67..cad916ee6e 100644 --- a/tests/core/snapshots/union-nested-resolver.md_merged.snap +++ b/tests/core/snapshots/union-nested-resolver.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server(port: 8030) @upstream { query: Query diff --git a/tests/core/snapshots/upstream-batching.md_0.snap b/tests/core/snapshots/upstream-batching.md_0.snap index e8bca1fdcc..fe63cd4831 100644 --- a/tests/core/snapshots/upstream-batching.md_0.snap +++ b/tests/core/snapshots/upstream-batching.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/upstream-batching.md_client.snap b/tests/core/snapshots/upstream-batching.md_client.snap index 5e9fd2fa39..455588a80b 100644 --- a/tests/core/snapshots/upstream-batching.md_client.snap +++ b/tests/core/snapshots/upstream-batching.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int): User diff --git a/tests/core/snapshots/upstream-batching.md_merged.snap b/tests/core/snapshots/upstream-batching.md_merged.snap index dba73d283f..ddd433b3ba 100644 --- a/tests/core/snapshots/upstream-batching.md_merged.snap +++ b/tests/core/snapshots/upstream-batching.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream(batch: {delay: 1, headers: [], maxSize: 100}) { query: Query diff --git a/tests/core/snapshots/upstream-fail-request.md_0.snap b/tests/core/snapshots/upstream-fail-request.md_0.snap index 95fd0e3582..e7241f883d 100644 --- a/tests/core/snapshots/upstream-fail-request.md_0.snap +++ b/tests/core/snapshots/upstream-fail-request.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/upstream-fail-request.md_client.snap b/tests/core/snapshots/upstream-fail-request.md_client.snap index 52d67b233a..e7241293e9 100644 --- a/tests/core/snapshots/upstream-fail-request.md_client.snap +++ b/tests/core/snapshots/upstream-fail-request.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user: User diff --git a/tests/core/snapshots/upstream-fail-request.md_merged.snap b/tests/core/snapshots/upstream-fail-request.md_merged.snap index 9a8bef2a99..e498e56248 100644 --- a/tests/core/snapshots/upstream-fail-request.md_merged.snap +++ b/tests/core/snapshots/upstream-fail-request.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/with-args-url.md_0.snap b/tests/core/snapshots/with-args-url.md_0.snap index 13a20b3310..47aa236a6f 100644 --- a/tests/core/snapshots/with-args-url.md_0.snap +++ b/tests/core/snapshots/with-args-url.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/with-args-url.md_client.snap b/tests/core/snapshots/with-args-url.md_client.snap index cbcfe5da06..1b9d4f5438 100644 --- a/tests/core/snapshots/with-args-url.md_client.snap +++ b/tests/core/snapshots/with-args-url.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): User diff --git a/tests/core/snapshots/with-args-url.md_merged.snap b/tests/core/snapshots/with-args-url.md_merged.snap index 69c4cb9235..30e485dda8 100644 --- a/tests/core/snapshots/with-args-url.md_merged.snap +++ b/tests/core/snapshots/with-args-url.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/with-args.md_0.snap b/tests/core/snapshots/with-args.md_0.snap index 47bfa75fff..623f147669 100644 --- a/tests/core/snapshots/with-args.md_0.snap +++ b/tests/core/snapshots/with-args.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/with-args.md_client.snap b/tests/core/snapshots/with-args.md_client.snap index d830867cea..3418dec58d 100644 --- a/tests/core/snapshots/with-args.md_client.snap +++ b/tests/core/snapshots/with-args.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { user(id: Int!): [User] diff --git a/tests/core/snapshots/with-args.md_merged.snap b/tests/core/snapshots/with-args.md_merged.snap index 990055f2aa..77916cb59c 100644 --- a/tests/core/snapshots/with-args.md_merged.snap +++ b/tests/core/snapshots/with-args.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/with-nesting.md_0.snap b/tests/core/snapshots/with-nesting.md_0.snap index 29d1a1dfea..5253f6d607 100644 --- a/tests/core/snapshots/with-nesting.md_0.snap +++ b/tests/core/snapshots/with-nesting.md_0.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: response +snapshot_kind: text --- { "status": 200, diff --git a/tests/core/snapshots/with-nesting.md_client.snap b/tests/core/snapshots/with-nesting.md_client.snap index 30e275ebb1..e04087119d 100644 --- a/tests/core/snapshots/with-nesting.md_client.snap +++ b/tests/core/snapshots/with-nesting.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Post { body: String diff --git a/tests/core/snapshots/with-nesting.md_merged.snap b/tests/core/snapshots/with-nesting.md_merged.snap index 2c33d69af6..83bc1735ae 100644 --- a/tests/core/snapshots/with-nesting.md_merged.snap +++ b/tests/core/snapshots/with-nesting.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/yaml-nested-unions.md_client.snap b/tests/core/snapshots/yaml-nested-unions.md_client.snap index 47713e49b8..61c4959581 100644 --- a/tests/core/snapshots/yaml-nested-unions.md_client.snap +++ b/tests/core/snapshots/yaml-nested-unions.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { testVar0(u: T1Input!): U diff --git a/tests/core/snapshots/yaml-nested-unions.md_merged.snap b/tests/core/snapshots/yaml-nested-unions.md_merged.snap index 0d8adaebdc..ae67c46c85 100644 --- a/tests/core/snapshots/yaml-nested-unions.md_merged.snap +++ b/tests/core/snapshots/yaml-nested-unions.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/yaml-union-in-type.md_client.snap b/tests/core/snapshots/yaml-union-in-type.md_client.snap index 8060a57361..c50fb35781 100644 --- a/tests/core/snapshots/yaml-union-in-type.md_client.snap +++ b/tests/core/snapshots/yaml-union-in-type.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- input NNU__nu0 { new: Boolean diff --git a/tests/core/snapshots/yaml-union-in-type.md_merged.snap b/tests/core/snapshots/yaml-union-in-type.md_merged.snap index 500685a6e2..4b809f3fa5 100644 --- a/tests/core/snapshots/yaml-union-in-type.md_merged.snap +++ b/tests/core/snapshots/yaml-union-in-type.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/snapshots/yaml-union.md_client.snap b/tests/core/snapshots/yaml-union.md_client.snap index c680e386b0..0da7231ecc 100644 --- a/tests/core/snapshots/yaml-union.md_client.snap +++ b/tests/core/snapshots/yaml-union.md_client.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatted +snapshot_kind: text --- type Query { testVar0(u: T1Input!): U diff --git a/tests/core/snapshots/yaml-union.md_merged.snap b/tests/core/snapshots/yaml-union.md_merged.snap index f4fa97e00b..3ddfd33fe8 100644 --- a/tests/core/snapshots/yaml-union.md_merged.snap +++ b/tests/core/snapshots/yaml-union.md_merged.snap @@ -1,6 +1,7 @@ --- source: tests/core/spec.rs expression: formatter +snapshot_kind: text --- schema @server @upstream { query: Query diff --git a/tests/core/spec.rs b/tests/core/spec.rs index 4170bb42bb..56a569da2b 100644 --- a/tests/core/spec.rs +++ b/tests/core/spec.rs @@ -220,10 +220,12 @@ async fn test_spec(spec: ExecutionSpec) { })) }) .and_then(|cfgs| { - cfgs.into_iter() - .fold(Valid::succeed(ConfigModule::default()), |acc, c| { - acc.and_then(|acc| acc.unify(c.clone())) - }) + let mut cfgs = cfgs.into_iter(); + let config_module = cfgs.next().expect("At least one config should be defined"); + + cfgs.fold(Valid::succeed(config_module.clone()), |acc, c| { + acc.and_then(|acc| acc.unify(c.clone())) + }) }) // Apply required transformers to the configuration .and_then(|cfg| cfg.transform(Required)); diff --git a/tests/execution/graphql-datasource-query-directives.md b/tests/execution/graphql-datasource-query-directives.md index f56b4b6a16..e1580c70c3 100644 --- a/tests/execution/graphql-datasource-query-directives.md +++ b/tests/execution/graphql-datasource-query-directives.md @@ -21,7 +21,7 @@ type Query { - request: method: POST url: http://upstream/graphql - textBody: '{ "query": "query { user @cascade(fields: [\\\"id\\\"]) { id @options(paging: false) } }" }' + textBody: '{ "query": "query { user @cascade(fields: [\\\"id\\\"]) { id @options(paging: false) name } }" }' response: status: 200 body: diff --git a/tests/execution/graphql-nested.md b/tests/execution/graphql-nested.md new file mode 100644 index 0000000000..bb9a277611 --- /dev/null +++ b/tests/execution/graphql-nested.md @@ -0,0 +1,71 @@ +# Complicated queries + +```graphql @config +schema @server(port: 8000, hostname: "0.0.0.0") { + query: Query +} + +type Query { + queryNodeA: NodeA @graphQL(url: "http://upstream/graphql", name: "nodeA") +} + +type NodeA { + name: String + nodeB: NodeB + nodeC: NodeC + nodeA: NodeA @modify(name: "child") +} + +type NodeB { + name: String + nodeA: NodeA + nodeC: NodeC +} + +type NodeC { + name: String + nodeA: NodeA + nodeB: NodeB +} +``` + +```yml @mock +- request: + method: POST + url: http://upstream/graphql + textBody: {"query": "query { nodeA { name nodeB { name } nodeC { name } } }"} + expectedHits: 1 + response: + status: 200 + body: + data: + nodeA: + name: nodeA + nodeB: + name: nodeB + nodeC: + name: nodeC + nodeA: + name: nodeA +``` + +```yml @test +- method: POST + url: http://localhost:8080/graphql + body: + query: | + query queryNodeA { + queryNodeA { + name + nodeA { + name + } + nodeB { + name + } + nodeC { + name + } + } + } +``` diff --git a/tests/execution/merge-linked-config.md b/tests/execution/merge-linked-config.md new file mode 100644 index 0000000000..f5de4c41bc --- /dev/null +++ b/tests/execution/merge-linked-config.md @@ -0,0 +1,49 @@ +# Merge linked configs + +Merge should happen only on schema while configurations like schema, upstream, telemetry should be defined only by the root config + +```graphql @file:link-1.graphql +schema @server(port: 3000) @upstream(httpCache: 42, batch: {delay: 22}) { + query: Query +} + +type Foo { + foo: String +} + +type Query { + foo: Foo @http(url: "http://jsonplaceholder.typicode.com/foo") +} +``` + +```graphql @file:link-2.graphql +schema @server(port: 4000) @upstream(httpCache: 33, batch: {delay: 48}) { + query: Query +} + +type Post { + id: Int! + userId: Int! + user: User + @graphQL(url: "http://jsonplaceholder.typicode.com", args: [{key: "id", value: "{{.value.userId}}"}], name: "user") +} + +type Query { + post(id: Int!): Post @http(url: "http://jsonplaceholder.typicode.com/posts/{{.args.id}}") +} + +type User { + id: Int + name: String +} +``` + +```graphql @config +schema + @server(port: 8000) + @upstream(httpCache: 10, batch: {delay: 10}) + @link(src: "link-1.graphql", type: Config) + @link(src: "link-2.graphql", type: Config) { + query: Query +} +``` diff --git a/tests/execution/test-conflict-allowed-headers.md b/tests/execution/test-conflict-allowed-headers.md deleted file mode 100644 index bab99fb9df..0000000000 --- a/tests/execution/test-conflict-allowed-headers.md +++ /dev/null @@ -1,21 +0,0 @@ -# test-conflict-allowed-headers - -```graphql @config -schema @server @upstream(allowedHeaders: ["a", "b", "c"]) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` - -```graphql @config -schema @server @upstream(allowedHeaders: ["b", "c", "d"]) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` diff --git a/tests/execution/test-conflict-vars.md b/tests/execution/test-conflict-vars.md deleted file mode 100644 index e1253cecfe..0000000000 --- a/tests/execution/test-conflict-vars.md +++ /dev/null @@ -1,21 +0,0 @@ -# test-conflict-vars - -```graphql @config -schema @server(vars: [{key: "a", value: "b"}, {key: "c", value: "d"}]) @upstream { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` - -```graphql @config -schema @server(vars: [{key: "a", value: "b"}, {key: "p", value: "q"}]) @upstream { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` diff --git a/tests/execution/test-merge-batch.md b/tests/execution/test-merge-batch.md deleted file mode 100644 index 875b222da7..0000000000 --- a/tests/execution/test-merge-batch.md +++ /dev/null @@ -1,31 +0,0 @@ -# test-merge-batch - -```graphql @config -schema @server @upstream(batch: {delay: 0, maxSize: 1000, headers: ["a", "b"]}) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` - -```graphql @config -schema @server @upstream(batch: {delay: 5, maxSize: 100, headers: ["b", "c"]}) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` - -```graphql @config -schema @server @upstream { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` diff --git a/tests/execution/test-merge-query.md b/tests/execution/test-merge-query.md deleted file mode 100644 index 2ff91c33ba..0000000000 --- a/tests/execution/test-merge-query.md +++ /dev/null @@ -1,21 +0,0 @@ -# test-merge-query - -```graphql @config -schema @server(port: 3000) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` - -```graphql @config -schema @server(port: 8000) @upstream(proxy: {url: "http://localhost:3000"}) { - query: Query -} - -type Query { - hi: String @expr(body: "world") -} -``` diff --git a/tests/execution/test-nested-link.md b/tests/execution/test-nested-link.md deleted file mode 100644 index 19e9ad8fd0..0000000000 --- a/tests/execution/test-nested-link.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -identity: true ---- - -# test-nested-link - -```graphql @file:link-enum.graphql -schema @server @upstream { - query: Query -} - -enum Foo { - BAR - BAZ -} - -type Query { - foo: Foo @http(url: "http://jsonplaceholder.typicode.com/foo") -} -``` - -```graphql @file:graphql-with-link.graphql -schema @server @link(src: "link-enum.graphql", type: Config) { - query: Query -} - -type Post { - id: Int! - userId: Int! - user: User - @graphQL(url: "http://jsonplaceholder.typicode.com", args: [{key: "id", value: "{{.value.userId}}"}], name: "user") -} - -type Query { - post(id: Int!): Post @http(url: "http://jsonplaceholder.typicode.com/posts/{{.args.id}}") -} - -type User { - id: Int - name: String -} -``` - -```graphql @config -schema @server @upstream @link(src: "graphql-with-link.graphql", type: Config) { - query: Query -} -``` diff --git a/tests/execution/test-response-header-merge.md b/tests/execution/test-response-header-merge.md deleted file mode 100644 index 2c7697401e..0000000000 --- a/tests/execution/test-response-header-merge.md +++ /dev/null @@ -1,31 +0,0 @@ -# test-response-header-value - -```graphql @config -schema @server(headers: {custom: [{key: "a", value: "a"}]}) { - query: Query -} - -type User { - name: String - age: Int -} - -type Query { - user: User @expr(body: {name: "John"}) -} -``` - -```graphql @config -schema @server(headers: {custom: [{key: "a", value: "b"}]}) { - query: Query -} - -type User { - name: String - age: Int -} - -type Query { - user: User @expr(body: {name: "John"}) -} -``` diff --git a/tests/execution/test-server-base-types.md b/tests/execution/test-server-base-types.md deleted file mode 100644 index d67c359d14..0000000000 --- a/tests/execution/test-server-base-types.md +++ /dev/null @@ -1,21 +0,0 @@ -# test-server-base-types - -```graphql @config -schema @server(port: 3000) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -``` - -```graphql @config -schema @server(port: 8000) @upstream(proxy: {url: "http://localhost:3000"}) { - query: Query -} - -type Query { - hello: String @expr(body: "world") -} -```