Skip to content

Commit

Permalink
Add argument for ExecutionConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou committed Jun 17, 2024
1 parent 78725c9 commit 74bc787
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions adapters/zio-http/src/main/scala/caliban/ZHttpAdapter.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package caliban

import caliban.Configurator.ExecutionConfiguration
import caliban.ws.WebSocketHooks
import zio.Duration
import zio.http.{ WebSocketConfig => ZWebSocketConfig, _ }
Expand All @@ -10,8 +11,11 @@ import zio.http.{ WebSocketConfig => ZWebSocketConfig, _ }
)
object ZHttpAdapter {

def makeHttpService[R, E](interpreter: GraphQLInterpreter[R, E]): RequestHandler[R, Nothing] =
QuickAdapter(interpreter).handlers.api
def makeHttpService[R, E](
interpreter: GraphQLInterpreter[R, E],
config: ExecutionConfiguration = ExecutionConfiguration()
): RequestHandler[R, Nothing] =
QuickAdapter(interpreter).configure(config).handlers.api

def makeWebSocketService[R, E](
interpreter: GraphQLInterpreter[R, E],
Expand Down

0 comments on commit 74bc787

Please sign in to comment.