You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The program (given below) will freeze at the last line, where I forget to pass the skip parameter in the variables.
It appears that the server answers a message with a 500 error:
Variable "$skip" of required type "Int!" was not provided.'
And since I specified retries=5 and the default retry code _default_retry_codes = (429, 500, 502, 503, 504), requests keeps resending the same query again and again, even though the server gave an answer.
When I disable the retries or exclude 500 from the retry_status_forcelist, gql raises the TransportQueryError immediately.
I expected gql to check both the query along with the variables, but it looks like gql only checks the query with respect to the schema, but doesn't check the variables with respect to the query?
I'm not a graphql expert, so I wonder if a server is supposed to answer a 500 error for such a query? If not, the bug is server-side, but if yes, maybe the _default_retry_codes should not include the 500 code?
System info (please complete the following information):
OS: macos
Python version: 3.8
gql version: v3.5.0b5
graphql-core version: 3.3.0a3
Thanks!
The text was updated successfully, but these errors were encountered:
The 500 http status code means Internal Server Error and usually means that there is a bug or a default in the server itself. It should not be used to report errors in the provided query.
Normally, GraphQL servers are supposed to return errors with a 200 OK status code, and indicate the error in the returned json following the GraphQL spec.
It is not really clear which status codes are supposed to allow a retry, which is why retry_status_forcelist is a parameter of the transport to allow the user to choose.
Describe the bug
Hi,
The program (given below) will freeze at the last line, where I forget to pass the
skip
parameter in the variables.It appears that the server answers a message with a 500 error:
And since I specified
retries=5
and the default retry code_default_retry_codes = (429, 500, 502, 503, 504)
, requests keeps resending the same query again and again, even though the server gave an answer.When I disable the retries or exclude 500 from the
retry_status_forcelist
, gql raises the TransportQueryError immediately.To Reproduce
Code below:
Details
Expected behavior
I'm actually not sure if it's really a bug...
I expected gql to check both the query along with the variables, but it looks like gql only checks the query with respect to the schema, but doesn't check the variables with respect to the query?
I'm not a graphql expert, so I wonder if a server is supposed to answer a 500 error for such a query? If not, the bug is server-side, but if yes, maybe the
_default_retry_codes
should not include the 500 code?System info (please complete the following information):
Thanks!
The text was updated successfully, but these errors were encountered: