-
Notifications
You must be signed in to change notification settings - Fork 72
/
GraphQLOptions.fs
32 lines (26 loc) · 1018 Bytes
/
GraphQLOptions.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace FSharp.Data.GraphQL.Server.AspNetCore
open FSharp.Data.GraphQL
open System
open System.Text.Json
open System.Threading.Tasks
open Microsoft.AspNetCore.Http
type PingHandler = IServiceProvider -> JsonDocument voption -> Task<JsonDocument voption>
type GraphQLTransportWSOptions = {
EndpointUrl : string
ConnectionInitTimeoutInMs : int
CustomPingHandler : PingHandler voption
}
type IGraphQLOptions =
abstract member SerializerOptions : JsonSerializerOptions
abstract member WebsocketOptions : GraphQLTransportWSOptions
type GraphQLOptions<'Root> = {
SchemaExecutor : Executor<'Root>
RootFactory : HttpContext -> 'Root
/// The minimum rented array size to read a message from WebSocket
ReadBufferSize : int
SerializerOptions : JsonSerializerOptions
WebsocketOptions : GraphQLTransportWSOptions
} with
interface IGraphQLOptions with
member this.SerializerOptions = this.SerializerOptions
member this.WebsocketOptions = this.WebsocketOptions