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

Add install generators options that were missing in the documentation. #4689

Merged

Conversation

soartec-lab
Copy link
Contributor

Hi, first of all, thank you for making this awesome gem.

When I used the generator, I noticed a discrepancy between the options listed in the documentation and the options that were actually enabled.

This PR adds the following to the documentation, which are valid options for the current generator:

  • directory
  • skip-mutation-root-type
  • api

current excute resule

$ pwd
spec/dummy

$ bundle exec rails g graphql:install --help

Usage:
  bin/rails generate graphql:install [options]

Options:
  [--skip-namespace], [--no-skip-namespace]                    # Skip namespace (affects only isolated engines)
                                                               # Default: false
  [--skip-collision-check], [--no-skip-collision-check]        # Skip collision check
                                                               # Default: false
  [--directory=DIRECTORY]                                      # Directory where generated files should be saved
                                                               # Default: app/graphql
  [--schema=SCHEMA]                                            # Name for the schema constant (default: {app_name}Schema)
  [--skip-keeps], [--no-skip-keeps]                            # Skip .keep files for source control
                                                               # Default: false
  [--skip-graphiql], [--no-skip-graphiql]                      # Skip graphiql-rails installation
                                                               # Default: false
  [--skip-mutation-root-type], [--no-skip-mutation-root-type]  # Skip creation of the mutation root type
                                                               # Default: false
  [--relay], [--no-relay]                                      # Include installation of Relay conventions (nodes, connections, edges)
                                                               # Default: true
  [--batch], [--no-batch]                                      # Include GraphQL::Batch installation
                                                               # Default: false
  [--playground], [--no-playground]                            # Use GraphQL Playground over Graphiql as IDE
                                                               # Default: false
  [--api], [--no-api]                                          # Preconfigure smaller stack for API only apps
                                                               # Default: false

Runtime options:
  -f, [--force]                    # Overwrite files that already exist
  -p, [--pretend], [--no-pretend]  # Run but do not make any changes
  -q, [--quiet], [--no-quiet]      # Suppress status output
  -s, [--skip], [--no-skip]        # Skip files that already exist

Install GraphQL folder structure and boilerplate code

Generator souce code

https://github.com/rmosolgo/graphql-ruby/blob/master/lib/generators/graphql/install_generator.rb

`directory`, `skip-mutation-root-type`, and `api` options
@rmosolgo
Copy link
Owner

Thanks for adding these!

@rmosolgo rmosolgo merged commit 4fa1b8c into rmosolgo:master Oct 31, 2023
12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants