Skip to content

Commit

Permalink
Installed Altair and GraphiQL to sample projects
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri committed May 7, 2024
1 parent 7b22ff4 commit 25dd218
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
<PackageReference Update="EntityFramework" Version="1.*" />
<PackageReference Update="FSharp.Data.TypeProviders" Version="1.*" />
<PackageReference Update="Giraffe" Version="6.*" />
<PackageReference Update="GraphQL.Server.Ui.Altair" Version="7.*" />
<PackageReference Update="GraphQL.Server.Ui.GraphiQL" Version="7.*" />
<PackageReference Update="GraphQL.Server.Ui.Playground" Version="7.*" />
<PackageReference Update="GraphQL.Server.Ui.Voyager" Version="7.*" />
<PackageReference Update="HotChocolate.AspNetCore" Version="13.*" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

<ItemGroup>
<PackageReference Include="FsToolkit.ErrorHandling.TaskResult" />
<PackageReference Include="GraphQL.Server.Ui.Altair" />
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" />
<PackageReference Include="GraphQL.Server.Ui.Playground" />
<PackageReference Include="GraphQL.Server.Ui.Voyager" />
<PackageReference Include="HotChocolate.AspNetCore" />
Expand Down
6 changes: 4 additions & 2 deletions samples/chat-app/server/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ let main args =
let app = builder.Build ()

if app.Environment.IsDevelopment () then
app.UseGraphQLPlayground ("/playground") |> ignore
app.UseGraphQLVoyager ("/voyager") |> ignore
app.UseGraphQLAltair "/altair" |> ignore
app.UseGraphQLGraphiQL "/graphiql" |> ignore
app.UseGraphQLPlayground "/playground" |> ignore
app.UseGraphQLVoyager "/voyager" |> ignore
app.UseRouting () |> ignore
app.UseEndpoints (fun endpoints -> endpoints.MapBananaCakePop (PathString "/cakePop") |> ignore)
|> ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

<ItemGroup Label="PackageReferences">
<PackageReference Include="FsToolkit.ErrorHandling.TaskResult" />
<PackageReference Include="GraphQL.Server.Ui.Altair" />
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" />
<PackageReference Include="GraphQL.Server.Ui.Playground" />
<PackageReference Include="GraphQL.Server.Ui.Voyager" />
<PackageReference Include="HotChocolate.AspNetCore" />
Expand Down
6 changes: 4 additions & 2 deletions samples/star-wars-api/Startup.fs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ type Startup private () =
clearResponse >=> setStatusCode 500

if env.IsDevelopment () then
app.UseGraphQLPlayground ("/playground") |> ignore
app.UseGraphQLVoyager ("/voyager") |> ignore
app.UseGraphQLAltair "/altair" |> ignore
app.UseGraphQLGraphiQL "/graphiql" |> ignore
app.UseGraphQLPlayground "/playground" |> ignore
app.UseGraphQLVoyager "/voyager" |> ignore
app.UseRouting () |> ignore
app.UseEndpoints (fun endpoints -> endpoints.MapBananaCakePop (PathString "/cakePop") |> ignore)
|> ignore
Expand Down

0 comments on commit 25dd218

Please sign in to comment.