Skip to content

Commit

Permalink
made facet query string optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhayhurst committed Jun 20, 2024
1 parent 9e20dc5 commit 97c8037
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/models/GQLSchema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ object GQLSchema {
"facets",
searchFacetsResultsGQLImp,
description = Some("Search facets"),
arguments = queryString :: entityNames :: pageArg :: Nil,
arguments = optQueryString :: entityNames :: pageArg :: Nil,
resolve = ctx => {
val queryString = ctx.arg(optQueryString).getOrElse("")
val entities = ctx.arg(entityNames).getOrElse(Seq.empty)
ctx.ctx.searchFacets(ctx.arg(queryString), ctx.arg(pageArg), entities)
ctx.ctx.searchFacets(queryString, ctx.arg(pageArg), entities)
}
),
Field(
Expand Down

0 comments on commit 97c8037

Please sign in to comment.