An open API service indexing awesome lists of open source software.

https://github.com/luojilab/json2graphql

Help you to convert json to graphql schema effortlessly. https://luojilab.github.io/json2graphql/
https://github.com/luojilab/json2graphql

code-generator graphql graphql-schema json-to-graphql

Last synced: 7 months ago
JSON representation

Help you to convert json to graphql schema effortlessly. https://luojilab.github.io/json2graphql/

Awesome Lists containing this project

README

          

A tool to generate graphql schema from json.

# Usage
```bash
go run main.go -h
```

NAME:
inspect - generate a graphql schema based on json

USAGE:
main [global options] command [command options] [arguments...]

DESCRIPTION:
inspect json and generate draft schema.graphql

COMMANDS:
inspect generate a graphql schema based on json
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--verbose, -v show logs
--input value, -i value the json filename
--output value, -o value the target filename to store generated schema
--help, -h show help

# Example

```bash
go run main.go -i example.json
```
# Live Demo

https://luojilab.github.io/json2graphql/

# TODO

- [x] build it as a web service that render schema on the fly like [json.cn](https://json.cn)
- [ ] support to read from multi json files.
- [ ] get input from http request rather than local file.
- [ ] integrate with graphql server frameworks like [gqlgen](https://github.com/99designs/gqlgen) and auto generate resolver