create-graphql icon indicating copy to clipboard operation
create-graphql copied to clipboard

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

Open femesq opened this issue 8 years ago • 4 comments

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.

femesq avatar Dec 06 '16 17:12 femesq

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

sibelius avatar Dec 06 '16 17:12 sibelius

@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 avatar Dec 06 '16 17:12 lucasbento

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.

lucasbento avatar Dec 09 '16 23:12 lucasbento

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

sibelius avatar Dec 20 '16 10:12 sibelius