{"id":27950684,"url":"https://github.com/rodrigo-kelven/fastapi_graphql","last_synced_at":"2026-04-05T08:34:23.420Z","repository":{"id":278844392,"uuid":"936949789","full_name":"Rodrigo-Kelven/FastAPI_GraphQL","owner":"Rodrigo-Kelven","description":"Este projeto é uma API GraphQL simples construída com FastAPI e Strawberry, duas ferramentas poderosas do ecossistema Python. A API permite que os usuários consultem uma lista de itens, cada um contendo um ID, username, fullName, email, role, hashedPassword, disabled, verified, createdAt.","archived":false,"fork":false,"pushed_at":"2025-04-11T02:19:28.000Z","size":25603,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T21:24:13.547Z","etag":null,"topics":["docker","fas","graphql","mon","python3","redis","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Rodrigo-Kelven.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":"2025-02-22T01:42:57.000Z","updated_at":"2025-04-13T01:22:39.000Z","dependencies_parsed_at":"2025-05-07T16:15:25.340Z","dependency_job_id":"e0579cb5-d57b-4ff4-841c-fc391e69c015","html_url":"https://github.com/Rodrigo-Kelven/FastAPI_GraphQL","commit_stats":null,"previous_names":["rodrigo-kelven/fastapi_graphql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rodrigo-Kelven/FastAPI_GraphQL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rodrigo-Kelven%2FFastAPI_GraphQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rodrigo-Kelven%2FFastAPI_GraphQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rodrigo-Kelven%2FFastAPI_GraphQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rodrigo-Kelven%2FFastAPI_GraphQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rodrigo-Kelven","download_url":"https://codeload.github.com/Rodrigo-Kelven/FastAPI_GraphQL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rodrigo-Kelven%2FFastAPI_GraphQL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31430009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"last_error":"SSL_read: 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":["docker","fas","graphql","mon","python3","redis","sqlite"],"created_at":"2025-05-07T16:15:22.248Z","updated_at":"2026-04-05T08:34:23.393Z","avatar_url":"https://github.com/Rodrigo-Kelven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# FastAPI and GraphQL\n\n## API GraphQL com FastAPI e Strawberry\n![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54) \n![FastAPI](https://img.shields.io/badge/FastAPI-%23FF4F00.svg?style=for-the-badge\u0026logo=fastapi\u0026logoColor=white)\n![GraphQL](https://img.shields.io/badge/GraphQL-%23E10098.svg?style=for-the-badge\u0026logo=graphql\u0026logoColor=white)\n![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white) \n![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge\u0026logo=redis\u0026logoColor=white)\n![SQLite](https://img.shields.io/badge/sqlite-%2307405e.svg?style=for-the-badge\u0026logo=sqlite\u0026logoColor=white)\n![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white) \n\n\n\n Este projeto é uma API GraphQL simples construída com FastAPI e Strawberry, duas ferramentas poderosas do ecossistema Python. A API permite que os usuários consultem uma lista de itens, cada um contendo um ID, username, fullName, email, role, hashedPassword, disabled, verified, createdAt.\n\n## Sobre GraphQL\n O GraphQL é uma linguagem de consulta para APIs que oferece flexibilidade ao cliente, permitindo solicitar exatamente os dados necessários. Diferentemente do REST, onde múltiplas rotas são usadas para diferentes recursos, o GraphQL utiliza uma única rota que pode retornar diversos tipos de dados, otimizando a comunicação entre cliente e servidor.\n\n## Sobre Strawberry\n\nStrawberry é uma biblioteca de GraphQL para Python que utiliza anotações de tipo para criar APIs de maneira intuitiva e moderna. Ela se integra perfeitamente com o FastAPI, permitindo criar endpoints GraphQL com facilidade. O principal componente utilizado é o GraphQLRouter, que serve como ponto de entrada para as consultas GraphQL.\n\n## Benefícios do Projeto\n\n  - Flexibilidade: Clientes podem consultar apenas os dados necessários, reduzindo o tráfego de rede.\n  - Simplicidade: Com Strawberry e FastAPI, a configuração da API é direta e eficiente.\n  - Escalabilidade: A estrutura GraphQL facilita a adição de novos tipos de dados sem alterar a lógica existente.\n\n\n### Versão: 1.2.14\n\n#### Para mais informações sobre: \n* https://www.redhat.com/pt-br/topics/api/what-is-graphql\n* https://graphql.org/learn/\n\n\n## Tecnologias Utilizadas\n\n- [FastAPI](https://fastapi.tiangolo.com/): Um framework moderno e rápido para construir APIs com Python.\n- [Strawberry](https://strawberry.rocks/): Uma biblioteca para criar APIs GraphQL em Python.\n- [Uvicorn](https://www.uvicorn.org/): Um servidor ASGI para rodar a aplicação.\n\n## Pré-requisitos\n\nAntes de começar, você precisa ter o Python 3.7 ou superior instalado em sua máquina. Você também deve ter o `pip` para instalar as dependências.\n\n## Instalação\n```bash\n  git clone https://github.com/Rodrigo-Kelven/FastAPI_GraphQL\n  cd FastAPI_GraphQL\n  pip install -r requirements.txt\n```\n\n## Usando via docker\n```bash\n  docker build -t api_graphql .\n  docker run -p 8000:8000 api_graphql\n```\n\n### Usando a API\n\n#### A API GraphQL pode ser acessada em http://127.0.0.1:8000/api/v1/graphql. Você pode usar a interface GraphQL para fazer consultas.\n\n -h## Exemplo de Consulta\n\n#### Para obter todos os itens, você pode usar a seguinte consulta:\n\n```bash\n{\n  allUsers {\n    id\n    username\n    fullName\n    email\n    role\n    hashedPassword\n    disabled\n    verified\n    createdAt    \n  }\n}\n```\n## Resposta Esperada\n\n#### A resposta para a consulta acima será semelhante a:\n\n```bash\n{\n  \"data\": {\n    \"allUsers\": [\n      {\n        \"id\": \"61476a49-6f68-4ba0-998f-07196de68abe\",\n        \"username\": \"string\",\n        \"fullName\": \"string\",\n        \"email\": \"user@example.com\",\n        \"role\": \"Role.admin\",\n        \"hashedPassword\": \"$2b$12$SjQvK5W9nE5UW9PnDsMRxOXqaKVG8.GRqtVIL/5ZeiAV33c5SV2M.\",\n        \"disabled\": false,\n        \"verified\": 0,\n        \"createdAt\": \"2025-03-10T02:22:27\"\n      }\n    ]\n  }\n}\n```\n\n# Contribuições\nContribuições são bem-vindas! Se você tiver sugestões ou melhorias, sinta-se à vontade para abrir um issue ou enviar um pull request.;)\n\n## Autores\n- [@Rodrigo_Kelven](https://github.com/Rodrigo-Kelven)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigo-kelven%2Ffastapi_graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodrigo-kelven%2Ffastapi_graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigo-kelven%2Ffastapi_graphql/lists"}