Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue wait for GraphQL responses with http status code 500. #6651

Open
nitzien opened this issue May 24, 2023 · 3 comments
Open

Continue wait for GraphQL responses with http status code 500. #6651

nitzien opened this issue May 24, 2023 · 3 comments
Assignees
Labels
api:graphql Issues related to GraphQL API help wanted Community contributions are welcome.

Comments

@nitzien
Copy link

nitzien commented May 24, 2023

Describe the bug
Continue wait error for GraphQL responses with http status code 500.

To Reproduce
Steps to reproduce the behavior:

  1. Make a graphql query which would take more than 5 seconds (or reduce continueWait time configuration).

Expected behavior
Though, we don't have this documented for graphql. for rest api it is documented to return with 200. Can we please have same http status code for graphql also. https://cube.dev/docs/http-api/rest/#prerequisites-continue-wait

Additional context
From Slack thread- https://cube-js.slack.com/archives/C04NYBJP7RQ/p1684846190185819

@vasilev-alex

@vasilev-alex vasilev-alex self-assigned this May 24, 2023
@igorlukanin igorlukanin added the api:graphql Issues related to GraphQL API label Aug 31, 2023
@igorlukanin
Copy link
Member

It looks like this behavior is caused by the express-graphql library that is used by Cube to implement the GraphQL API:

return graphqlHTTP({
schema,
context: {
req,
apiGateway: this
},
graphiql: getEnv('nodeEnv') !== 'production'
? { headerEditorEnabled: true }
: false,
})(req, res);

Unfortunately, this library is not maintained anymore. Probably, it should be replaced with a similar library first.

@igorlukanin igorlukanin added the help wanted Community contributions are welcome. label Jan 8, 2024
Copy link

github-actions bot commented Jan 8, 2024

If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you.
If this is the first time you are contributing a Pull Request to Cube.js, please check our contribution guidelines.
You can also post any questions while contributing in the #contributors channel in the Cube.js Slack.

@igorlukanin
Copy link
Member

As a non-ideal workaround, I may suggest updating orchestrator_options (https://cube.dev/docs/reference/configuration/config#orchestrator_options) with a bigger continueWaitTimeout or, preferably, using pre-aggregations to speed up queries and eliminate "continue waits" completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:graphql Issues related to GraphQL API help wanted Community contributions are welcome.
Projects
None yet
Development

No branches or pull requests

3 participants