From e2ff051c5c8f912a46e32da602d1119dceeffe8b Mon Sep 17 00:00:00 2001 From: "Valber M. Silva de Souza" Date: Sun, 15 Sep 2024 22:10:23 +0200 Subject: [PATCH] Updating .Server.AspNetCore's README.md according to newest code (#496) --- src/FSharp.Data.GraphQL.Server.AspNetCore/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FSharp.Data.GraphQL.Server.AspNetCore/README.md b/src/FSharp.Data.GraphQL.Server.AspNetCore/README.md index 48019e625..09940e0ef 100644 --- a/src/FSharp.Data.GraphQL.Server.AspNetCore/README.md +++ b/src/FSharp.Data.GraphQL.Server.AspNetCore/README.md @@ -29,10 +29,10 @@ type Startup private () = member _.ConfigureServices(services: IServiceCollection) = services.AddGiraffe() - .AddGraphQLOptions( // STEP 1: Setting the options - Schema.executor, // --> Schema.executor is defined by you somewhere else (in another file) + .AddGraphQL( // STEP 1: Setting the options + Schema.executor, // --> Schema.executor is defined by yourself somewhere else (in another file) rootFactory, - "/ws" // --> endpoint for websocket connections + "/ws" // --> endpoint for websocket connections (optional. Default value: "/ws") ) |> ignore @@ -62,7 +62,7 @@ In your schema, you'll want to define a subscription, like in (example taken fro RootType, PlanetType, "Watches to see if a planet is a moon.", - [ Define.Input("id", String) ], + [ Define.Input("id", StringType) ], (fun ctx _ p -> if ctx.Arg("id") = p.Id then Some p else None)) ]) ``` @@ -77,7 +77,7 @@ Don't forget to notify subscribers about new values: "setMoon", Nullable PlanetType, "Defines if a planet is actually a moon or not.", - [ Define.Input("id", String); Define.Input("isMoon", Boolean) ], + [ Define.Input("id", StringType); Define.Input("isMoon", BooleanType) ], fun ctx _ -> getPlanet (ctx.Arg("id")) |> Option.map (fun x ->