Skip to content

Commit

Permalink
qe: --enable-playground automatically enables graphql protocol (#4711)
Browse files Browse the repository at this point in the history
If protocol is not specified explicitly and `--enable-playground` flag
is used, engine will default to GraphQL instead of JSON.

Close #4679

Co-authored-by: Joël Galeran <[email protected]>
  • Loading branch information
Serhii Tatarintsev and Jolg42 authored Feb 9, 2024
1 parent 925d1bf commit 32c59b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion query-engine/query-engine/src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,13 @@ impl PrismaOpt {
self.engine_protocol
.as_ref()
.map(EngineProtocol::from)
.unwrap_or(EngineProtocol::Json)
.unwrap_or_else(|| {
if self.enable_playground {
EngineProtocol::Graphql
} else {
EngineProtocol::Json
}
})
}
}

Expand Down

0 comments on commit 32c59b7

Please sign in to comment.