Skip to content

Commit b166b99

Browse files
committed
Renamed GraphQLRequest to GraphQLRequestHandler
1 parent 9f9f08e commit b166b99

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

src/FSharp.Data.GraphQL.Server.AspNetCore/FSharp.Data.GraphQL.Server.AspNetCore.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<Compile Include="GraphQLWebsocketMiddleware.fs" />
2424
<Compile Include="Parser.fs" />
2525
<Compile Include="HttpContext.fs" />
26-
<Compile Include="GraphQLRequest.fs" />
26+
<Compile Include="GraphQLRequestHandler.fs" />
2727
<Compile Include="StartupExtensions.fs" />
2828
</ItemGroup>
2929

src/FSharp.Data.GraphQL.Server.AspNetCore/GraphQLRequest.fs renamed to src/FSharp.Data.GraphQL.Server.AspNetCore/GraphQLRequestHandler.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ open FsToolkit.ErrorHandling
1515
open FSharp.Data.GraphQL.Server
1616

1717
/// Provides logic to parse and execute GraphQL request
18-
type GraphQLRequest<'Root> (
18+
type GraphQLRequestHandler<'Root> (
1919
httpContextAccessor : IHttpContextAccessor,
2020
options : IOptionsMonitor<GraphQLOptions<'Root>>,
21-
logger : ILogger<GraphQLRequest<'Root>>
21+
logger : ILogger<GraphQLRequestHandler<'Root>>
2222
) =
2323

2424
let ctx = httpContextAccessor.HttpContext

src/FSharp.Data.GraphQL.Server.AspNetCore/StartupExtensions.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module ServiceCollectionExtensions =
8484
}
8585
)
8686
.AddHttpContextAccessor()
87-
.AddScoped<GraphQLRequest<'Root>>()
87+
.AddScoped<GraphQLRequestHandler<'Root>>()
8888

8989
/// <summary>
9090
/// Adds GraphQL options and services to the service collection. Requires an executor instance to be provided.

src/FSharp.Data.GraphQL.Server.Giraffe/HttpHandlers.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module HttpHandlers =
2828

2929
let private handleGraphQL<'Root> (next : HttpFunc) (ctx : HttpContext) =
3030

31-
let request = ctx.RequestServices.GetRequiredService<GraphQLRequest<'Root>>()
31+
let request = ctx.RequestServices.GetRequiredService<GraphQLRequestHandler<'Root>>()
3232
request.HandleAsync () |> ofTaskIResult2 ctx
3333

3434
let graphQL<'Root> : HttpHandler = choose [ POST; GET ] >=> handleGraphQL<'Root>

src/FSharp.Data.GraphQL.Server.Oxpecker/HttpEndpoints.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module HttpEndpoints =
1919

2020
let private handleGraphQL<'Root> (ctx : HttpContext) : Task =
2121

22-
let request = ctx.RequestServices.GetRequiredService<GraphQLRequest<'Root>>()
22+
let request = ctx.RequestServices.GetRequiredService<GraphQLRequestHandler<'Root>>()
2323
request.HandleAsync () |> writeIResult2 ctx
2424

2525
let graphQL<'Root> (route, [<Optional>] configure) : Endpoint = SimpleEndpoint(Verbs [HttpVerb.GET; HttpVerb.POST], route, handleGraphQL<'Root>, configure)

src/FSharp.Data.GraphQL.Server/TypeSystem.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ type ResolveFieldContext with
1414
match Map.tryFind name x.Args with
1515
| Some found -> downcast found
1616
| None -> raise (GQLMessageException $"Argument '%s{name}' was not provided within context of a field '%s{x.ExecutionInfo.Identifier}'. Check if it was supplied within GraphQL query.")
17-

0 commit comments

Comments
 (0)