Skip to content

Commit

Permalink
fix: if object is not sql return ok with prefeched
Browse files Browse the repository at this point in the history
Fix STU-214

Signed-off-by: Gustavo Inacio <[email protected]>
  • Loading branch information
gusinacio committed Mar 27, 2024
1 parent 74e12bd commit 8ef3f85
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions graphql/src/store/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,15 @@ impl StoreResolver {
field: &a::Field,
object_type: &QueryableType<'_>,
) -> Result<(Option<r::Value>, Option<r::Value>), 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")
Expand Down

0 comments on commit 8ef3f85

Please sign in to comment.