Are there any tools to dynamically generate graphQl schema string?

前端 未结 2 797
时光说笑
时光说笑 2021-02-10 03:04

I will have JSON from a CMS and using the JSON I want to be able to programmatically write a graphQl schema. Without needing to write the string directly.

Are there any

2条回答
  •  梦毁少年i
    2021-02-10 03:07

    The json-graphql-server project does that: Take a data JSON as input, infer types and fields from the data, write a schema containing types, queries and mutations, and start a GraphQL server schema based on that.

    https://github.com/marmelab/json-graphql-server

    I know of another tool that does just the JSON to schema part, but it does not generate queries or mutations:

    https://github.com/aweary/json-to-graphql

提交回复
热议问题