From 8ef3f8508d575a436e2698239e5effc26351fb70 Mon Sep 17 00:00:00 2001 From: Gustavo Inacio Date: Wed, 27 Mar 2024 13:20:04 -0300 Subject: [PATCH] fix: if object is not sql return ok with prefeched Fix STU-214 Signed-off-by: Gustavo Inacio --- graphql/src/store/resolver.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/graphql/src/store/resolver.rs b/graphql/src/store/resolver.rs index e3efbadb4f0..249b8d9865b 100644 --- a/graphql/src/store/resolver.rs +++ b/graphql/src/store/resolver.rs @@ -291,14 +291,15 @@ impl StoreResolver { field: &a::Field, object_type: &QueryableType<'_>, ) -> Result<(Option, Option), QueryExecutionError> { + if !object_type.is_sql() { + return Ok((prefetched_object, None)); + } + if !ENV_VARS.graphql.enable_sql_service { return Err(QueryExecutionError::NotSupported( "SQL service is not enabled".into(), )); } - if !object_type.is_sql() { - return Ok((prefetched_object, None)); - } let input = field .argument_value("input")