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/
- Host: GitHub
- URL: https://github.com/luojilab/json2graphql
- Owner: luojilab
- License: mit
- Created: 2019-01-28T09:53:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-29T14:34:44.000Z (almost 7 years ago)
- Last Synced: 2025-02-01T07:31:42.079Z (over 1 year ago)
- Topics: code-generator, graphql, graphql-schema, json-to-graphql
- Language: Go
- Homepage:
- Size: 128 KB
- Stars: 21
- Watchers: 8
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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