{"id":13500675,"url":"https://github.com/lucasbento/graphql-correios","last_synced_at":"2025-03-21T07:31:09.783Z","repository":{"id":71333441,"uuid":"69804507","full_name":"lucasbento/graphql-correios","owner":"lucasbento","description":"✉️  Interact with Brazil's post-office through GraphQL!","archived":false,"fork":false,"pushed_at":"2017-01-10T10:33:04.000Z","size":41,"stargazers_count":59,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T07:07:51.742Z","etag":null,"topics":["brasil","correios","correios-api","frete","graphql","graphql-correios"],"latest_commit_sha":null,"homepage":"https://graphql-correios-buhpxhxlyr.now.sh/","language":"JavaScript","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/lucasbento.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}},"created_at":"2016-10-02T15:21:57.000Z","updated_at":"2023-08-08T16:35:48.000Z","dependencies_parsed_at":"2023-04-07T01:48:13.065Z","dependency_job_id":null,"html_url":"https://github.com/lucasbento/graphql-correios","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/lucasbento%2Fgraphql-correios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasbento%2Fgraphql-correios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasbento%2Fgraphql-correios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasbento%2Fgraphql-correios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasbento","download_url":"https://codeload.github.com/lucasbento/graphql-correios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244119824,"owners_count":20401054,"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":["brasil","correios","correios-api","frete","graphql","graphql-correios"],"created_at":"2024-07-31T22:01:09.680Z","updated_at":"2025-03-21T07:31:09.461Z","avatar_url":"https://github.com/lucasbento.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/lucasbento/graphql-correios/raw/master/content/logo.png\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eGraphQL Correios\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Calcule frete sem REST!\n\u003c/p\u003e\n\n## Como utilizar\n\n1. Abra a [interface GraphiQL][url-server];\n1. Digite uma query.\n\t- Exemplo:\n\t```javascript\n    \t{\n          calcPreco(\n            nCdServico: \"40010\",\n            sCepOrigem: \"11065100\",\n            sCepDestino: \"11721000\",\n            nVlPeso: \"0.400\",\n            nCdFormato: \"1\",\n            nVlComprimento: \"25\",\n            nVlAltura: \"15\",\n            nVlLargura: \"15\",\n            nVlDiametro: \"0\"\n          ) {\n            Codigo\n            Valor\n            ValorMaoPropria\n            ValorAvisoRecebimento\n            ValorSemAdicionais\n          }\n        }\n    ```\n    - Retornará:\n    ```json\n    \t{\n          \"data\": {\n            \"calcPreco\": [\n              {\n                \"Codigo\": 40010,\n                \"Valor\": 1700,\n                \"ValorMaoPropria\": 0,\n                \"ValorAvisoRecebimento\": 0,\n                \"ValorSemAdicionais\": 1700,\n                \"error\": null\n              }\n            ]\n          }\n        }\n    ```\n\u003e Teste essa query [clicando aqui][url-server-with-query].\n\nVerifique os campos necessários para cálculo do frete no [PDF da API dos Correios][pdf-correios-api].\n\n## Local\n\n### Produção\n\n```sh\n  npm install\n  npm run build\n  npm start\n```\n\n### Desenvolvimento\n\n```sh\n  npm install\n  npm run watch # Utilizando nodemon para hot-reloading\n```\n\n[url-server]: https://graphql-correios-buhpxhxlyr.now.sh/\n[pdf-correios-api]: http://www.correios.com.br/para-voce/correios-de-a-a-z/pdf/calculador-remoto-de-precos-e-prazos/manual-de-implementacao-do-calculo-remoto-de-precos-e-prazos\n[url-server-with-query]: https://graphql-correios-buhpxhxlyr.now.sh/?query=%7B%0A%20%20calcPreco(%0A%20%20%20%20nCdServico%3A%20%2240010%22%2C%0A%20%20%20%20sCepOrigem%3A%20%2211065100%22%2C%0A%20%20%20%20sCepDestino%3A%20%2211721000%22%2C%0A%20%20%20%20nVlPeso%3A%20%220.400%22%2C%0A%20%20%20%20nCdFormato%3A%20%221%22%2C%0A%20%20%20%20nVlComprimento%3A%20%2225%22%2C%0A%20%20%20%20nVlAltura%3A%20%2215%22%2C%0A%20%20%20%20nVlLargura%3A%20%2215%22%2C%0A%20%20%20%20nVlDiametro%3A%20%220%22%0A%20%20)%20%7B%0A%20%20%20%20Codigo%0A%20%20%20%20Valor%0A%20%20%20%20ValorMaoPropria%0A%20%20%20%20ValorAvisoRecebimento%0A%20%20%20%20ValorSemAdicionais%0A%20%20%20%20error%0A%20%20%7D%0A%7D\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasbento%2Fgraphql-correios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasbento%2Fgraphql-correios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasbento%2Fgraphql-correios/lists"}