inst/ignore/query.R

#' Query Github using GraphQL
#'
#' @keywords internal
#' @param query (character) a GraphQL query
#' @param ... Curl options passed to \code{\link[httr]{GET}}
#' @return a list or tibble if possible
#' @references \url{https://developer.github.com/early-access/graphql/}
#' @template query_egs
ql <- function(query, ...) {
  jsonlite::fromJSON(cont(
    gh_POST(gsub("\n", "", query), ...)
  ))
}

Try the ghql package in your browser

Any scripts or data that you put into this service are public.

ghql documentation built on March 26, 2020, 6:26 p.m.