Skip to content

Commit

Permalink
drop check id flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddOnTop committed May 3, 2024
1 parent df6ffb8 commit dedcb4b
Show file tree
Hide file tree
Showing 171 changed files with 401 additions and 226 deletions.
1 change: 0 additions & 1 deletion generated/.tailcallrc.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
"minimum": 0.0
},
"headers": {
"default": [],
"type": "array",
"items": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/generator/from_proto.rs
expression: result
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/generator/from_proto.rs
expression: result
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/generator/from_proto.rs
expression: result
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: src/generator/from_proto.rs
expression: config
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
5 changes: 0 additions & 5 deletions tests/core/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ impl ExecutionSpec {
let mut files: BTreeMap<String, String> = BTreeMap::new();
let mut test: Option<Vec<APIRequest>> = None;
let mut runner: Option<Annotation> = None;
let mut check_identity = false;
let mut sdl_error = false;

while let Some(node) = children.next() {
Expand Down Expand Up @@ -89,8 +88,6 @@ impl ExecutionSpec {
let split = expect.value.splitn(2, ':').collect::<Vec<&str>>();
match split[..] {
[a, b] => {
check_identity =
a.contains("check_identity") && b.ends_with("true");
sdl_error = a.contains("expect_validation_error")
&& b.ends_with("true");
}
Expand Down Expand Up @@ -260,8 +257,6 @@ impl ExecutionSpec {
files,

runner,

check_identity,
sdl_error,
};

Expand Down
1 change: 0 additions & 1 deletion tests/core/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub struct ExecutionSpec {
// Annotations for the runner
pub runner: Option<Annotation>,

pub check_identity: bool,
pub sdl_error: bool,
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/add-field-index-list.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/add-field-many-list.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/add-field-many.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/add-field-modify.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/add-field-with-modify.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/add-field.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/apollo-tracing.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(hostname: "0.0.0.0", port: 8000) @upstream {
schema @server(hostname: "0.0.0.0", port: 8000) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/auth-basic.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(port: 8000) @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) {
schema @server(port: 8000) @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) {
query: Query
mutation: Mutation
}
Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/auth-jwt.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(port: 8000) @upstream @link(id: "jwks", src: "jwks.json", type: Jwks) {
schema @server(port: 8000) @link(id: "jwks", src: "jwks.json", type: Jwks) {
query: Query
mutation: Mutation
}
Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/auth.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) @link(id: "jwks", src: "jwks.json", type: Jwks) {
schema @link(id: "htpasswd", src: ".htpasswd", type: Htpasswd) @link(id: "jwks", src: "jwks.json", type: Jwks) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/batching-default.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 10, headers: []}, httpCache: true) {
schema @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 10}, httpCache: true) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/batching-disabled.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 0, headers: [], maxSize: 100}, httpCache: true) {
schema @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 0, maxSize: 100}, httpCache: true) {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: true) {
schema @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/batching-group-by.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: true) {
schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/batching-post.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, headers: [], maxSize: 1000}, httpCache: true) {
schema @server(port: 8000, queryValidation: false) @upstream(baseURL: "http://jsonplaceholder.typicode.com", batch: {delay: 1, maxSize: 1000}, httpCache: true) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/batching.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(batchRequests: true) @upstream {
schema @server(batchRequests: true) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/cache-control.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(headers: {cacheControl: true}) @upstream {
schema @server(headers: {cacheControl: true}) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/caching-collision.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) {
schema @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/caching.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) {
schema @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/call-mutation.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") {
schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") {
query: Query
mutation: Mutation
}
Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/cors-allow-cred-false.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(headers: {cors: {allowHeaders: ["Authorization"], allowMethods: ["POST", "OPTIONS"], allowOrigins: ["abc.com", "xyz.com"], allowPrivateNetwork: true, maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) {
schema @server(headers: {cors: {allowHeaders: ["Authorization"], allowMethods: ["POST", "OPTIONS"], allowOrigins: ["abc.com", "xyz.com"], allowPrivateNetwork: true, maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/cors-allow-cred-true.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) {
schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/cors-allow-cred-vary.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, headers: [], maxSize: 1000}) {
schema @server(headers: {cors: {allowCredentials: true, allowMethods: ["OPTIONS", "POST", "GET"], allowOrigins: ["abc.com", "xyz.com"], exposeHeaders: [""], maxAge: 23, vary: ["origin", "access-control-request-method", "access-control-request-headers"]}}) @upstream(baseURL: "http://example.com", batch: {delay: 1, maxSize: 1000}) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/custom-headers.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(headers: {custom: [{key: "x-id", value: "1"}, {key: "x-name", value: "John Doe"}]}) @upstream {
schema @server(headers: {custom: [{key: "x-id", value: "1"}, {key: "x-name", value: "John Doe"}]}) {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/env-value.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") {
schema @upstream(baseURL: "http://jsonplaceholder.typicode.com") {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/experimental-headers.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(headers: {experimental: ["X-experimental", "x-tailcall"]}) @upstream {
schema @server(headers: {experimental: ["X-experimental", "x-tailcall"]}) {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(batch: {delay: 1, headers: []}) {
schema @upstream(batch: {delay: 1}) {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream(batch: {delay: 1, headers: []}) {
schema @upstream(batch: {delay: 1}) {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
mutation: Mutation
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server @upstream {
schema {
query: Query
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/grpc-batch.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/core/spec.rs
expression: merged
---
schema @server(port: 8000) @upstream(batch: {delay: 10, headers: []}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) {
schema @server(port: 8000) @upstream(batch: {delay: 10}, httpCache: true) @link(id: "news", src: "news.proto", type: Protobuf) {
query: Query
}

Expand Down
Loading

0 comments on commit dedcb4b

Please sign in to comment.