Type: Package
Title: A GraphQL Query Parser
Version: 1.5.3
Description: Bindings to the 'libgraphqlparser' C++ library. Parses GraphQL https://graphql.org syntax and exports the AST in JSON format.
License: MIT + file LICENSE
Encoding: UTF-8
URL: https://docs.ropensci.org/graphql/ https://ropensci.r-universe.dev/graphql
BugReports: https://github.com/ropensci/graphql/issues
LinkingTo: Rcpp
Imports: Rcpp (≥ 0.12.12), jsonlite
Suggests: testthat
RoxygenNote: 6.0.1
NeedsCompilation: yes
Packaged: 2025-03-17 21:13:53 UTC; jeroen
Author: Jeroen Ooms [cre, aut], Barret Schloerke [ctb], Scott Wolchok [ctb], Facebook, Inc [aut, cph] (libgraphqlparser C++ library)
Maintainer: Jeroen Ooms <jeroenooms@gmail.com>
Repository: CRAN
Date/Publication: 2025-03-17 21:40:11 UTC

Dump GraphQL Queries to JSON

Description

Parses GraphQL queries and exports the AST in JSON format.

Usage

graphql2json(input, parse_schema = FALSE)

Arguments

input

a string with graphql syntax

parse_schema

boolean to enable schema definition parsing

Examples

graphql2json("{ field(complex: { a: { b: [ $var ] } }) }")
graphql2json("schema { query: QueryType }", TRUE)