Something went wrong. Try again.
GitHub GraphQL client whose answers are kept in a raw store
Something went wrong. Try again.
ocaml-github-query dune-project
1.4 kB · 40 lines
at main
1234567891011121314151617181920212223242526272829303132333435363738394041(lang dune 3.21)(using mdx 0.4)(name github-query)(generate_opam_files true)(implicit_transitive_deps false)(license ISC)(authors "Thomas Gazagnaire <thomas@gazagnaire.org>")(maintainers "Thomas Gazagnaire <thomas@gazagnaire.org>")(source (tangled gazagnaire.org/ocaml-github-query))
(package (name github-query) (synopsis "GitHub GraphQL and REST client whose answers are kept in a cas store") (tags (org:blacksun network-programming http area:10003051)) (description "Github_query sends GraphQL queries to GitHub and keeps every answer in a cas-store, keyed by the canonical query text, its variables and the principal asking. It selects GitHub's rate limit with every query and strips it from the stored answer, paces every process sharing a store and a token on one budget, honours Retry-After and X-RateLimit-Reset, retries server errors with bounded exponential backoff, halves aliased batches that exceed GitHub's resource limits, and probes many repositories a query for their latest activity. Its REST client follows Link header pagination and revalidates stored pages with their ETag, on the same store and budgets.") (depends hermetic (ocaml (>= 5.2)) cas-store cas cas-eio nox-json eio requests requests-eio ptime fmt logs (alcotest :with-test) (alcobar :with-test) (mdx :with-test)))