Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
femesq opened this issue Dec 6, 2016 · 4 comments
Open

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

femesq opened this issue Dec 6, 2016 · 4 comments

Comments

@femesq
Copy link

femesq commented Dec 6, 2016

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
Copy link
Collaborator

sibelius commented Dec 6, 2016

@lucasbento
Copy link
Collaborator

@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
Copy link
Collaborator

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
Copy link
Collaborator

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

sibelius added a commit that referenced this issue Jan 4, 2017
Add.js.template - simple screen with a form with all input fields
of the mutation from schema.json, it commit mutation onSubmit

AddMutation.js.template - simple add mutation template

Edit.js.template - simple screen with a form to edit a graphql object type

EditMutation.js.template - simple edit mutation template

List.js.template - list of objects from relay

View.js.template - tabbed detail view of graphql object type

WIP of #12
sibelius added a commit that referenced this issue Feb 6, 2017
Add.js.template - simple screen with a form with all input fields
of the mutation from schema.json, it commit mutation onSubmit

AddMutation.js.template - simple add mutation template

Edit.js.template - simple screen with a form to edit a graphql object type

EditMutation.js.template - simple edit mutation template

List.js.template - list of objects from relay

View.js.template - tabbed detail view of graphql object type

WIP of #12
sibelius added a commit that referenced this issue Feb 6, 2017
Add.js.template - simple screen with a form with all input fields
of the mutation from schema.json, it commit mutation onSubmit

AddMutation.js.template - simple add mutation template

Edit.js.template - simple screen with a form to edit a graphql object type

EditMutation.js.template - simple edit mutation template

List.js.template - list of objects from relay

View.js.template - tabbed detail view of graphql object type

WIP of #12
sibelius added a commit that referenced this issue Feb 6, 2017
Add.js.template - simple screen with a form with all input fields
of the mutation from schema.json, it commit mutation onSubmit

AddMutation.js.template - simple add mutation template

Edit.js.template - simple screen with a form to edit a graphql object type

EditMutation.js.template - simple edit mutation template

List.js.template - list of objects from relay

View.js.template - tabbed detail view of graphql object type

WIP of #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants