docs: make it clear in the docs that write_delay_ms affects graphql calls #2386
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While trying to make the
github_organization
datasource faster I noticed that each call to the GraphQL API was heavily throttled, with the provider sleeping exactly 1s in between each call. Doing some digging I've come to the conclusion that thewrite_delay_ms
setting in the provider is the cause, which I've also confirmed by simply changing its value and testing. After some digging it turns out that GraphQL API:s usually usePOST
requests under the hood. The GitHub GraphQL client is no different.There probably is a case to be made for separating the settings for the REST and CodeQL API:s, as they are currently both using the value from
write_delay_ms
. I'll leave that as future work though, as both of these are using the same HTTP client under the hood, and I have no idea if breaking that apart could have some unforeseen consequences. Documenting the behavior is a step forward at least!Before the change?
After the change?
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!