Add --retry <num> option with default 3 times and --retry-delay <seconds> with default 5 seconds.
Pass these options via graphql.Config.
Log with INFO level on retry.
❓Unify all GraphQL requests to a single function
Example:
(Pdb) p response.content
b'\n<html><head>\n<meta http-equiv="content-type" content="text/html;charset=utf-8">\n<title>502 Server Error</title>\n</head>\n<body text=#000000 bgcolor=#ffffff>\n<h1>Error: Server Error</h1>\n<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>\n<h2></h2>\n</body></html>\n'
(Pdb) p response.status_code
502
--retry <num>
option with default 3 times and--retry-delay <seconds>
with default 5 seconds.graphql.Config
.Example: