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

Calling GraphQL endpoint throws exception on API limit checks #19

Open
nikemeal opened this issue Nov 14, 2018 · 0 comments
Open

Calling GraphQL endpoint throws exception on API limit checks #19

nikemeal opened this issue Nov 14, 2018 · 0 comments

Comments

@nikemeal
Copy link

When calling the GraphQL endpoint (/admin/graphql.json) it'll throw an exception when trying to work out the number of API calls made/left in Client.php on the first line of this function:
protected function setCallLimitParams() { $limit_parts = explode('/', $this->last_response->getHeader(self::CALL_LIMIT_HEADER)[0]); $this->call_limit = $limit_parts[0]; $this->call_bucket = $limit_parts[1]; }
with the error

Undefined offset: 0
due to the way GraphQL returns data.
Commenting out the checks for API limits allows it to work, but then means call rate limiting is redundant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant