Learn R Programming

meetupr (version 0.3.1)

meetupr_query: Execute GraphQL query

Description

This function executes a GraphQL query with the provided variables. It validates the variables, constructs the request, and handles any errors returned by the GraphQL API.

Usage

meetupr_query(graphql, ..., .envir = parent.frame())

Value

The response from the GraphQL API as a list.

Arguments

graphql

GraphQL query string

...

Variables to pass to query

.envir

Environment for error handling

Examples

Run this code
if (FALSE) {
query <- "
query GetUser($id: ID!) {
 user(id: $id) {
  id
 name
}
}"
meetupr_query(graphql = query, id = "12345")
}

Run the code above in your browser using DataLab