Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-rails-schemaker

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-rails-schemaker

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

graphql-rails-schemaker

A rake task to interactive create a GraphQL Schema for Rails Models.

To generate a base schema:

  • Run "rails graphql:generate"
  • When prompted, enter "c" or "s" for camel case or snake case output respectively.
  • Follow the prompts to generate the schema.

Word of Caution

This tool is designed to facilitate setup of a GraphQL Schema in Rails 5 Application. It has not been tested in any prior verison of Rails. This task will not run it if detects a previous setup @ ./app/graph/schema.rb It will overwrite any files in ./app/graph/ if no schema.rb exists.

GraphQL Rails Schemaker is not a one-size-fits all solution. It will create a "base" schema including object types and sub-type dependencies from all models existing in the Rails application. It has been designed to formulate a generic schema to fit a wide variety of applications with support for associations.

Do not run this in production environments.

Todo

  • Generate Enum and Union Types
  • Add Input Type templates
  • Add Mutation Type templates
  • Integration with graphql-rails-resolver (if installed)

Needs Help

The object_type.rb template is large and cumbersome. The Todo above is planned for action. If you would like to handle any of the above, please file a pull request and add your name to the credits list.

Credits

Cole Turner (http://cole.codes/)

FAQs

Package last updated on 31 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc