https://github.com/ropensci/graphql
Bindings to libgraphqlparser for R
https://github.com/ropensci/graphql
graphql libgraphql r r-package rstats
Last synced: 3 months ago
JSON representation
Bindings to libgraphqlparser for R
- Host: GitHub
- URL: https://github.com/ropensci/graphql
- Owner: ropensci
- License: other
- Created: 2016-09-15T17:32:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T17:50:38.000Z (7 months ago)
- Last Synced: 2024-10-02T08:41:56.221Z (6 months ago)
- Topics: graphql, libgraphql, r, r-package, rstats
- Language: C++
- Homepage: https://docs.ropensci.org/graphql
- Size: 393 KB
- Stars: 38
- Watchers: 8
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - ropensci/graphql - Bindings to libgraphqlparser for R (C++)
README
# graphql
> Bindings to the 'libgraphqlparser' C++ library. Parses GraphQL syntax
and exports the AST in JSON format.[](https://www.repostatus.org/#active)
[](https://cran.r-project.org/package=graphql)
[](https://cran.r-project.org/package=graphql)
[](https://github.com/ropensci/graphql)## Hello World
Simple example
```r
> graphql2json("schema { query: QueryType }", parse_schema = TRUE)
```
```
{"kind":"Document","loc":{"start": {"line": 1,"column":1}, "end": {"line":1,"column":28}},"definitions":[{"kind":"SchemaDefinition","loc":{"start": {"line": 1,"column":1}, "end": {"line":1,"column":28}},"directives":null,"operationTypes":[{"kind":"OperationTypeDefinition","loc":{"start": {"line": 1,"column":10}, "end": {"line":1,"column":26}},"operation":"query","type":{"kind":"NamedType","loc":{"start": {"line": 1,"column":17}, "end": {"line":1,"column":26}},"name":{"kind":"Name","loc":{"start": {"line": 1,"column":17}, "end": {"line":1,"column":26}},"value":"QueryType"}}}]}]}
```