Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FingerLiu/json2graphql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A script to generate graphql schema from json.

Usage

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

go run main.go -i example.json

TODO

  • build it as a web service that render schema on the fly like 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 and auto generate resolver

About

Help you to convert json to graphql schema effortlessly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%