Skip to content

Commit e2ff051

Browse files
authored
Updating .Server.AspNetCore's README.md according to newest code (#496)
1 parent e475f15 commit e2ff051

File tree

1 file changed

+5
-5
lines changed
  • src/FSharp.Data.GraphQL.Server.AspNetCore

1 file changed

+5
-5
lines changed

src/FSharp.Data.GraphQL.Server.AspNetCore/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ type Startup private () =
2929
3030
member _.ConfigureServices(services: IServiceCollection) =
3131
services.AddGiraffe()
32-
.AddGraphQLOptions<Root>( // STEP 1: Setting the options
33-
Schema.executor, // --> Schema.executor is defined by you somewhere else (in another file)
32+
.AddGraphQL<Root>( // STEP 1: Setting the options
33+
Schema.executor, // --> Schema.executor is defined by yourself somewhere else (in another file)
3434
rootFactory,
35-
"/ws" // --> endpoint for websocket connections
35+
"/ws" // --> endpoint for websocket connections (optional. Default value: "/ws")
3636
)
3737
|> ignore
3838
@@ -62,7 +62,7 @@ In your schema, you'll want to define a subscription, like in (example taken fro
6262
RootType,
6363
PlanetType,
6464
"Watches to see if a planet is a moon.",
65-
[ Define.Input("id", String) ],
65+
[ Define.Input("id", StringType) ],
6666
(fun ctx _ p -> if ctx.Arg("id") = p.Id then Some p else None)) ])
6767
```
6868

@@ -77,7 +77,7 @@ Don't forget to notify subscribers about new values:
7777
"setMoon",
7878
Nullable PlanetType,
7979
"Defines if a planet is actually a moon or not.",
80-
[ Define.Input("id", String); Define.Input("isMoon", Boolean) ],
80+
[ Define.Input("id", StringType); Define.Input("isMoon", BooleanType) ],
8181
fun ctx _ ->
8282
getPlanet (ctx.Arg("id"))
8383
|> Option.map (fun x ->

0 commit comments

Comments
 (0)