{"id":15152649,"url":"https://github.com/marcsteven/graphql-rails","last_synced_at":"2026-02-04T01:38:06.795Z","repository":{"id":185332941,"uuid":"207952583","full_name":"MarcSteven/Graphql-Rails","owner":"MarcSteven","description":"Graphql tutorial in Rails","archived":false,"fork":false,"pushed_at":"2019-09-12T03:12:23.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T13:52:58.135Z","etag":null,"topics":["graphql","rails","rails-api","rails-tutorial"],"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/MarcSteven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-09-12T03:00:07.000Z","updated_at":"2019-09-15T04:53:57.000Z","dependencies_parsed_at":"2023-08-01T14:52:28.653Z","dependency_job_id":null,"html_url":"https://github.com/MarcSteven/Graphql-Rails","commit_stats":null,"previous_names":["marcsteven/graphql-rails"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcSteven%2FGraphql-Rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcSteven%2FGraphql-Rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcSteven%2FGraphql-Rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcSteven%2FGraphql-Rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcSteven","download_url":"https://codeload.github.com/MarcSteven/Graphql-Rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640472,"owners_count":20971558,"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":["graphql","rails","rails-api","rails-tutorial"],"created_at":"2024-09-26T16:20:45.698Z","updated_at":"2026-02-04T01:38:06.761Z","avatar_url":"https://github.com/MarcSteven.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-ruby\n\n## Installation\n\nInstall dependencies:\n\n```\nbundle install\n\nrails db:create\nrails db:migrate\nrails db:seed\n```\n\nStarting the server:\n\n```\nrails server\n```\n\nOpening the application:\n\n```\nopen http://localhost:3000/\n```\n\n## Interesting Files:\n\n- [GraphqlController](https://github.com/howtographql/graphql-ruby/blob/master/app/controllers/graphql_controller.rb) - GraphQL controller (api entry point)\n- [GraphqlTutorialSchema](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/graphql_tutorial_schema.rb) - the schema definition\n- [Mutations](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/types/mutation_type.rb) - root mutations\n- [Queries](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/types/query_type.rb) - root queries\n- [UserType](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/types/user_type.rb) - record type\n- [VoteType](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/types/vote_type.rb) - record type\n- [LinkType](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/types/link_type.rb) - record type\n- [DateTimeType](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/types/date_time_type.rb) - scalar type\n- [LinksSearch](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/resolvers/links_search.rb) - complex search resolver and its [tests](https://github.com/howtographql/graphql-ruby/blob/master/test/graphql/resolvers/links_search_test.rb)\n- [CreateLink](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/resolvers/create_link.rb) - mutation and its [tests](https://github.com/howtographql/graphql-ruby/blob/master/test/graphql/resolvers/create_link_test.rb)\n- [CreateUser](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/resolvers/create_user.rb) - mutation and its [tests](https://github.com/howtographql/graphql-ruby/blob/master/test/graphql/resolvers/create_user_test.rb)\n- [CreateVote](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/resolvers/create_vote.rb) - mutation and its [tests](https://github.com/howtographql/graphql-ruby/blob/master/test/graphql/resolvers/create_vote_test.rb)\n- [SignInUser](https://github.com/howtographql/graphql-ruby/blob/master/app/graphql/resolvers/sign_in_user.rb) - mutation and its [tests](https://github.com/howtographql/graphql-ruby/blob/master/test/graphql/resolvers/sign_in_user_test.rb)\n\n## Sample GraphQL Queries\n\nList first 10 links, containing \"example\":\n\n```graphql\n{\n  allLinks(first: 10, filter: {descriptionContains: \"example\"}) {\n    id\n    url\n    description\n    createdAt\n    postedBy {\n      id\n      name\n    }\n  }\n}\n\n```\n\nCreates new user:\n\n```graphql\nmutation {\n  createUser(\n    name: \"Radoslav Stankov\",\n    authProvider: {\n      email: { email: \"rado@example.com\", password: \"123456\" }\n    }\n  ) {\n    id\n    email\n    name\n  }\n}\n```\n\nCreates new user token:\n\n```graphql\nmutation {\n  signinUser(email: {email: \"rado@example.com\", password: \"123456\"}) {\n    token\n    user {\n      id\n      email\n      name\n    }\n  }\n}\n```\n\nCreates new link:\n\n```graphql\nmutation {\n  createLink(url:\"http://example.com\", description:\"Example\") {\n    id\n    url\n    description\n    postedBy {\n      id\n      name\n    }\n  }\n}\n```\n\nCreates new vote:\n\n```graphql\nmutation {\n  createVote(linkId:\"TGluay0yMQ==\") {\n    user {\n      id\n      name\n    }\n    link {\n      id\n      url\n      description\n    }\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcsteven%2Fgraphql-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcsteven%2Fgraphql-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcsteven%2Fgraphql-rails/lists"}