{"id":23248522,"url":"https://github.com/raulpe7eira/food-diary","last_synced_at":"2026-05-07T02:33:11.396Z","repository":{"id":130731015,"uuid":"492339181","full_name":"raulpe7eira/food-diary","owner":"raulpe7eira","description":"ignite - module: elixir and graphql with absinthe from rocketseat by Rafael Camarda","archived":false,"fork":false,"pushed_at":"2024-02-18T23:48:23.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T05:22:31.609Z","etag":null,"topics":["absinthe","course","ecto","elixir","graphql","ignite","learn","phoenix","postgresql","rocketseat"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":false,"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/raulpe7eira.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":"2022-05-14T22:38:31.000Z","updated_at":"2024-11-21T13:05:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"43ff31c9-f09a-4eb3-9a75-916c8028b1bc","html_url":"https://github.com/raulpe7eira/food-diary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/raulpe7eira/food-diary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Ffood-diary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Ffood-diary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Ffood-diary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Ffood-diary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raulpe7eira","download_url":"https://codeload.github.com/raulpe7eira/food-diary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Ffood-diary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32720138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","course","ecto","elixir","graphql","ignite","learn","phoenix","postgresql","rocketseat"],"created_at":"2024-12-19T08:14:08.381Z","updated_at":"2026-05-07T02:33:11.353Z","avatar_url":"https://github.com/raulpe7eira.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FoodDiary API\n\nThis repository is the code corresponding to the [Rocketseat - Ignite, Module: Elixir and GraphQL with Absinthe](https://app.rocketseat.com.br/node/elixir-e-graphql-com-absinthe-2022) lab by Rafael Camarda.\n\n\u003e The project simulates a Food Diary management API that allows to register users and meals with GraphQL.\n\n## Previous installations\n\n**Database**, we recommends install [PostgreSQL](https://www.postgresql.org/) with [Docker](https://hub.docker.com/_/postgres). After that, sets connection configuration at:\n\n- `config/dev.exs`\n- `config/test.exs`\n\n## Gets dependencies, setups database, tests, coverages, reports and starts application\n\n```bash\ncd food-diary\nmix deps.get\nmix ecto.setup\nmix test\nmix test --cover\nmix phx.server\n```\n\n## How to use?\n\n```bash\n# provides resources graphql\ncurl -X POST 'http://localhost:4000/api/graphql'\n\n# provides resources graphql with web development interface\ncurl -X POST 'http://localhost:4000/api/graphiql'\n```\n\n### Resources GraphQL\n\n```bash\n# retrieves user\nquery {\n  user(id: 1) {\n    email\n    name\n  }\n}\n\n# creates user\nmutation {\n  createUser(input: {\n    email: \"fulano@mail.com\",\n    name: \"Fulano\"\n  }) {\n    id\n  }\n}\n\n# creates meal\nmutation {\n  createMeal(input: {\n    userId: 3,\n    description: \"Pizza\",\n    calories: 370.50,\n    category: FOOD\n  }) {\n    id\n  }\n}\n\n# listens new meal\nsubscription {\n  newMeal {\n    description\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpe7eira%2Ffood-diary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraulpe7eira%2Ffood-diary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpe7eira%2Ffood-diary/lists"}