dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

bug: config dgs.graphql.graphiql.path not working

Open brianlschultz1969 opened this issue 4 years ago • 5 comments

Expected behavior

Changing the config "dgs.graphql.graphiql.path" should change graphiql endpoint

Changing to something like: dgs.graphql.graphiql.path: /personalize/graphiql

Should allow access like: http://localhost:8080/personalize/graphiql/

Actual behavior

The default config value (/graphiql) is always used http://localhost:8080/graphiql/

Steps to reproduce

  1. Add config to application.yml: dgs.graphql.graphiql.path: /personalize/graphiql
  2. Restart application
  3. Open browser - enter url http://localhost:8080/personalize/graphiql/
  4. Get a 404 error

Note: A test case would be highly appreciated, but we understand that's not always possible

brianlschultz1969 avatar Jun 30 '21 17:06 brianlschultz1969

Looks like this is related to me using the webflux package - com.netflix.graphql.dgs:graphql-dgs-webflux-starter

Looks like the DgsWebfluxConfigurationProperties does not contains the graphiql config like the DgsWebMvcConfigurationProperties does

brianlschultz1969 avatar Jun 30 '21 19:06 brianlschultz1969

It's not working when you configure the WebFlux base path as well: spring.webflux.base-path: some-path.

Can we append the path to the configuration as you are doing for the WebMvc, or am I missing some important detail?

mdecastilho avatar Jul 26 '21 14:07 mdecastilho

I just tried that but it ends up having another side effect.

spring.webflux.base-path: /personalize

The graphiql path now works with new url (i.e. http://localhost:8080/personalize/graphiql/index.html)

But now the graphiql is trying to call itself instead of "graphql" when submitting requests from the graphiql UI and I get 404 not found

Very odd.

brianlschultz1969 avatar Jul 26 '21 15:07 brianlschultz1969

has this issue been fixed? i am unable to access "/graphiql" when i change dep from com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter to com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure along with platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:4.8.0")

jessepinkman9900 avatar Oct 10 '21 12:10 jessepinkman9900

Is this issue fixed ?

Not able to access /graphql & /graphiql endpoints.

pj28105 avatar Oct 09 '22 12:10 pj28105