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

Some best practices, code organization advices #1836

Closed
nleo opened this issue Sep 5, 2018 · 3 comments
Closed

Some best practices, code organization advices #1836

nleo opened this issue Sep 5, 2018 · 3 comments

Comments

@nleo
Copy link

nleo commented Sep 5, 2018

I'm looking for something like http://docs.ansible.com/ansible/latest/playbooks_best_practices.html but for graphql-ruby

For example I have a lot standard CRUD actions

CRUD
CRUD

Now I'm putting them mostly into two files Types::Mutation & Types::Query and mutation.rb now have almost 200 lines.

Ideally I want organization like standard rails controller. Put in one file actions (create update delete show index) for one resource.

@hjJunior
Copy link

I'm starting in ruby, I saw this, but I don't know how I can improve the structure to be more clean instead use all of this in two files (mutations and queries)

@daemonsy
Copy link
Contributor

daemonsy commented Jul 3, 2019

Hi, I'm closing this issue because it seems like there isn't any more activity.

A big query_type.rb file is a problem I have too, but there are some teammates who appreciate everything in one place too.

Anyhow, feel free to reopen this issue or discuss this more in https://graphql.slack.com #ruby.

@daemonsy daemonsy closed this as completed Jul 3, 2019
@daemonsy
Copy link
Contributor

daemonsy commented Jul 3, 2019

Refer to #1825 for some information about splitting the query type.

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

No branches or pull requests

3 participants