{"id":13879682,"url":"https://github.com/maxcoto/graphoid","last_synced_at":"2025-10-27T18:30:22.318Z","repository":{"id":39873883,"uuid":"180687793","full_name":"maxcoto/graphoid","owner":"maxcoto","description":"Instant GraphQL REST-API for Rails from ActiveRecord or Mongoid models https://maxcoto.github.io/graphoid/","archived":false,"fork":false,"pushed_at":"2023-01-20T15:30:55.000Z","size":10301,"stargazers_count":36,"open_issues_count":39,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T07:31:38.077Z","etag":null,"topics":["activerecord","graphiql","graphoid","graphql","graphql-api","graphql-rails","graphql-ruby","mongoid","rails","rest","rest-api","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxcoto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-11T01:02:27.000Z","updated_at":"2024-07-27T12:06:34.000Z","dependencies_parsed_at":"2023-01-28T19:01:02.604Z","dependency_job_id":null,"html_url":"https://github.com/maxcoto/graphoid","commit_stats":null,"previous_names":["maxiperezc/graphoid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcoto%2Fgraphoid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcoto%2Fgraphoid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcoto%2Fgraphoid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcoto%2Fgraphoid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxcoto","download_url":"https://codeload.github.com/maxcoto/graphoid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238536011,"owners_count":19488638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activerecord","graphiql","graphoid","graphql","graphql-api","graphql-rails","graphql-ruby","mongoid","rails","rest","rest-api","ruby"],"created_at":"2024-08-06T08:02:28.849Z","updated_at":"2025-10-27T18:30:16.222Z","avatar_url":"https://github.com/maxcoto.png","language":"Ruby","readme":"\n\u003cimg src=\"https://cl.ly/aeaacddab2e2/graphoid.png\" height=\"150\" alt=\"graphoid\"/\u003e\n\n[![Build Status](https://travis-ci.org/maxiperezc/graphoid.svg?branch=master)](https://travis-ci.org/maxiperezc/graphoid)\n[![Gem Version](https://badge.fury.io/rb/graphoid.svg)](https://rubygems.org/gems/graphoid)\n[![Maintainability](https://api.codeclimate.com/v1/badges/96505308310ca4e7e241/maintainability)](https://codeclimate.com/github/maxiperezc/graphoid/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/96505308310ca4e7e241/test_coverage)](https://codeclimate.com/github/maxiperezc/graphoid/test_coverage)\n\nGenerates a full GraphQL API using introspection of Mongoid or ActiveRecord models.\n\n## API Dodocumentation\nThe [API Documentation](https://maxcoto.github.io/graphoid/) that displays how to use the queries and mutations that Graphoid automatically generates.\n\n\n## Dependency\nThis gem depends on [the GraphQL gem](https://github.com/rmosolgo/graphql-ruby).\nPlease install that gem first before continuing\n\n## Installation\nAdd this line to your Gemfile:\n\n```ruby\ngem 'graphoid'\n```\n\n```bash\n$ bundle install\n```\n\n## Database\nCreate the file `config/initializers/graphoid.rb`\nAnd configure the database you want to use in it (:mongoid or :active_record)\n\n```ruby\nGraphoid.configure do |config|\n  config.driver = :mongoid\nend\n```\n\n## Usage\nYou can determine which models will be visible in the API by including the Graphoid Queries and Mutations concerns\n\n```ruby\nclass Person\n  include Graphoid::Queries\n  include Graphoid::Mutations\nend\n```\n\n## Examples\nYou can find an example that uses ActiveRecord in the [Tester AR folder](https://github.com/maxiperezc/graphoid/tree/master/spec/tester_ar)  \nAnd an example with Mongoid in the [Tester Mongo folder](https://github.com/maxiperezc/graphoid/tree/master/spec/tester_mongo)  \nIn this same repository.\n\n\n\n## Contributing\n- Live Reload\n- Aggregations\n- Permissions on fields\n- Relation with aliases tests\n- Write division for \"every\" in Mongoid and AR\n- Sort top level models by association values\n- Filter by Array or Hash.\n- has_one_through implementation\n- has_many_selves tests\n- has_and_belongs_to_many_selves tests\n- Embedded::Many filtering implementation\n- Embedded::One filtering with OR/AND\n\n\n## Testing\n```bash\n$ DRIVER=ar DEBUG=true bundle exec rspec\n$ DRIVER=mongo DEBUG=true bundle exec rspec\n```\n\n## Thank You !!\n[Ryan Yeske](https://github.com/rcy) for the whole idea and for validating that metaprogramming this was possible.\n\n[Andres Rafael](https://github.com/aandresrafael) for working so hard on connecting the gem on the frontend and finding its failures.\n\n## License\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxcoto%2Fgraphoid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxcoto%2Fgraphoid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxcoto%2Fgraphoid/lists"}