{"id":27335202,"url":"https://github.com/jcelliott/unicorn","last_synced_at":"2026-05-15T23:10:54.307Z","repository":{"id":146384976,"uuid":"143499186","full_name":"jcelliott/unicorn","owner":"jcelliott","description":"Example GraphQL API with Absinthe","archived":false,"fork":false,"pushed_at":"2018-08-07T15:21:49.000Z","size":113,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-12T14:51:46.704Z","etag":null,"topics":["absinthe","elixir","graphql"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcelliott.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-04T05:02:17.000Z","updated_at":"2020-06-25T19:57:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"6bdb5341-75b3-46ac-8cf4-4e482762ffa0","html_url":"https://github.com/jcelliott/unicorn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcelliott%2Funicorn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcelliott%2Funicorn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcelliott%2Funicorn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcelliott%2Funicorn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcelliott","download_url":"https://codeload.github.com/jcelliott/unicorn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcelliott%2Funicorn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259147153,"owners_count":22812379,"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":["absinthe","elixir","graphql"],"created_at":"2025-04-12T14:47:22.781Z","updated_at":"2026-05-15T23:10:49.285Z","avatar_url":"https://github.com/jcelliott.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unicorn\n\nTo start your Phoenix server:\n\n  * Install dependencies with `mix deps.get`\n  * Create and migrate your database with `mix ecto.create \u0026\u0026 mix ecto.migrate`\n  * Install Node.js dependencies with `cd assets \u0026\u0026 npm install`\n  * Start Phoenix endpoint with `mix phx.server`\n\nNow you can visit [`localhost:4000`](http://localhost:4000) from your browser.\n\nReady to run in production? Please [check our deployment guides](http://www.phoenixframework.org/docs/deployment).\n\n## Learn more\n\n  * Official website: http://www.phoenixframework.org/\n  * Guides: http://phoenixframework.org/docs/overview\n  * Docs: https://hexdocs.pm/phoenix\n  * Mailing list: http://groups.google.com/group/phoenix-talk\n  * Source: https://github.com/phoenixframework/phoenix\n\n# Example queries:\n\n### Get top three users\n\n```graphql\nquery {\n  users(sortBy: \"money\", limit: 3) {\n    id\n    username\n    money\n    revenueRate\n  }\n}\n```\n\n### Create a new user\n\n```graphql\nmutation {\n  createUser(username: \"somebody\") {\n    user {\n      username\n      id\n    }\n  }\n}\n```\n\n### Add \"auth\" in header:\n\n    {\"CurrentUserId\": \"cced5bf9-a2cf-49a3-9278-ffce7a7db27a\"}\n\n### Get the current user\n\n```graphql\nquery {\n  viewer {\n    username\n    money\n    revenueRate\n    expenseRate\n  }\n}\n```\n\n### List available purchases\n\n```graphql\nquery {\n  purchases {\n    type\n    name\n    cost\n    codeRate\n    revenueRate\n    expenseRate\n  }\n}\n```\n\n### Hire an employee\n\n```graphql\nmutation {\n  purchase(purchase: {type: \"employee\", name: \"dev_intern\"}) {\n    user {\n      username\n    \temployees {\n     \t hacker\n    \t}\n    }\n  }\n}\n```\n\n### Release your product on the world\n\n```graphql\nmutation {\n  release {\n    user {\n      username\n      revenueRate\n      money\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcelliott%2Funicorn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcelliott%2Funicorn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcelliott%2Funicorn/lists"}