Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gh_gql

A simple interface for the GitHub GraphQL API v4.


Description

See more about the GraphQL API here: https://docs.github.com/graphql

Usage

gh_gql(query, ...)

Arguments

query

The GraphQL query, as a string.

...

Name-value pairs giving API parameters. Will be matched into endpoint placeholders, sent as query parameters in GET requests, and as a JSON body of POST requests. If there is only one unnamed parameter, and it is a raw vector, then it will not be JSON encoded, but sent as raw data, as is. This can be used for example to add assets to releases. Named NULL values are silently dropped. For GET requests, named NA values trigger an error. For other methods, named NA values are included in the body of the request, as JSON null.

Details

Note: pagination and the .limit argument does not work currently, as pagination in the GraphQL API is different from the v3 API. If you need pagination with GraphQL, you'll need to do that manually.

See Also

gh() for the GitHub v3 API.

Examples

gh_gql("query { viewer { login }}")

gh

'GitHub' 'API'

v1.3.0
MIT + file LICENSE
Authors
Gábor Csárdi [cre, ctb], Jennifer Bryan [aut], Hadley Wickham [aut], RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.