aerogear / create-graphql

Command-line utility to build production-ready servers with GraphQL.
MIT License
440 stars 38 forks source link

Read existing 'schema.json' to serve querys/mutations #12

Open femesq opened 7 years ago

femesq commented 7 years ago

If we could read an existing schema.json file, for creating the types, queries and mutations allowed by the server, it would be great for frontend development...

Another improvement would be generating "Loren Ipsun"-style data for each type.

This is specially useful for other backend languages/frameworks (Flask, Django, Rails, etc) that generates schema.json file.

sibelius commented 7 years ago

maybe this could be useful: https://gist.github.com/voodooattack/ce5f0afb5515ab5a153e535ac20698da

lucasbento commented 7 years ago

@femesq: awesome idea, was just thinking about using it also for front-end development, creating mutations from scratch is still a pain in the ass.

lucasbento commented 7 years ago

How do you guys suggest that we identify if the CLI is running on a front-end or back-end project?

We may use the .graphqlrc config file but I feel that there may be a better way.

sibelius commented 7 years ago

this one could be helpful: https://github.com/apollostack/apollo-codegen