diff --git a/generated/.tailcallrc.graphql b/generated/.tailcallrc.graphql index a598f757e4..9b6705faeb 100644 --- a/generated/.tailcallrc.graphql +++ b/generated/.tailcallrc.graphql @@ -353,7 +353,7 @@ directive @upstream( When set to `true`, it will ensure no HTTP, GRPC, or any other IO call is made more than once within the context of a single GraphQL request. """ - dedupe: Boolean! + dedupe: Boolean """ 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 diff --git a/generated/.tailcallrc.schema.json b/generated/.tailcallrc.schema.json index 8b538b80ba..ac9632287f 100644 --- a/generated/.tailcallrc.schema.json +++ b/generated/.tailcallrc.schema.json @@ -1341,7 +1341,10 @@ }, "dedupe": { "description": "When set to `true`, it will ensure no HTTP, GRPC, or any other IO call is made more than once within the context of a single GraphQL request.", - "type": "boolean" + "type": [ + "boolean", + "null" + ] }, "http2Only": { "description": "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.", diff --git a/src/config/upstream.rs b/src/config/upstream.rs index 32b0366b89..c6520bfa1e 100644 --- a/src/config/upstream.rs +++ b/src/config/upstream.rs @@ -139,7 +139,7 @@ pub struct Upstream { #[serde(default, skip_serializing_if = "is_default")] /// When set to `true`, it will ensure no HTTP, GRPC, or any other IO call /// is made more than once within the context of a single GraphQL request. - pub dedupe: bool, + pub dedupe: Option, } impl Upstream { @@ -193,7 +193,7 @@ impl Upstream { } pub fn get_dedupe(&self) -> bool { - self.dedupe + self.dedupe.unwrap_or(false) } }