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

bug: Sometimes DGS_GRAPHQL_PATH is not set and it breaks the GraphiQL forcing me to redeploy the app

Open ghost opened this issue 2 years ago • 3 comments

Please read our contributor guide before creating an issue.

Expected behavior

When I use the GraphiQL it should work

Actual behavior

Sometimes, when I try to use the GraphiQL (Graphical Interface Web of GraphQL) it doesn't work. When I watch the network tab it says /graphiql/%3CDGS_GRAPHQL_PATH%3E:1 Failed to load resource: the server responded with a status of 404 () Also when I try to perform a query or mutation I get this: POST https://mysite.com/graphiql/%3CDGS_GRAPHQL_PATH%3E 404

Steps to reproduce

I cannot reproduce 100% of the times, I think it's related with some order of execution or concurrency, because sometimes it happens and sometimes it's not. I'm deploying my application in an Elastic Beanstalk in AWS using CloudFormation for the infrastructure. In localhost I couldn't reproduce it. Until I not redeploy the app the problem continue there.

I'm using 5.0.5 version. It always happened with any version. I'm having this problem from time to time from the past year.

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

ghost avatar Jul 06 '22 10:07 ghost

I'm facing the same issue here, but the problem disappears after a while even without redeploying. I'm using 4.10.2 version.

gabrielkirsten avatar Jul 06 '22 17:07 gabrielkirsten

hi all, I've just created this MR to fix this issue. I also created this repo to reproduce the incident.

Cheers.

ClaudenirFreitas avatar Jul 24 '22 21:07 ClaudenirFreitas

I created #1183 to fix the intermittent DGS_GRAPHQL_PATH issue. One workaround for now is to disable Spring's static resource handling:

spring:
  web:
    resources:
      add-mappings: false

foo4u avatar Aug 16 '22 19:08 foo4u