Hotchocolate: Playground not working if GraphQL path is set

Created on 26 Jun 2019  路  4Comments  路  Source: ChilliCream/hotchocolate

I don't really get the new PlaygroundOptions logic, but the _pathIsSet variable seems to be always false, and therefore the playground is broken when the path is set manually via options.

            app.UseGraphQL("/g");
            app.UsePlayground(new PlaygroundOptions {QueryPath = "/g"});

When the /playground url is accessed in this setup, 404 is returned.

bug

Most helpful comment

This worked for me
app.UsePlayground(new PlaygroundOptions { QueryPath = "/graphql", Path = "/playground" });

All 4 comments

Hi @sgt,

sorry for the wait. There seems to be a copy paste error here.

I will add some tests and fix the options class.

You can follow this here #984

This one is now fixed and will be included into V10 preview 52.

This worked for me
app.UsePlayground(new PlaygroundOptions { QueryPath = "/graphql", Path = "/playground" });

Was this page helpful?
0 / 5 - 0 ratings