Package 'graphql'

Title: A GraphQL Query Parser
Description: Bindings to the 'libgraphqlparser' C++ library. Parses GraphQL <https://graphql.org> syntax and exports the AST in JSON format.
Authors: Jeroen Ooms [cre, aut], Barret Schloerke [ctb], Scott Wolchok [ctb], Facebook, Inc [aut, cph] (libgraphqlparser C++ library)
Maintainer: Jeroen Ooms <[email protected]>
License: MIT + file LICENSE
Version: 1.5.2
Built: 2024-11-02 05:58:26 UTC
Source: https://github.com/ropensci/graphql

Help Index


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)