{"id":23519806,"url":"https://github.com/ramonbecker/graphqlcompras","last_synced_at":"2026-04-10T17:03:02.905Z","repository":{"id":246042517,"uuid":"423152928","full_name":"RamonBecker/GraphQLCompras","owner":"RamonBecker","description":"Project developed with SpringBoot and GraphQL","archived":false,"fork":false,"pushed_at":"2021-11-02T13:05:41.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-25T16:10:35.467Z","etag":null,"topics":["graphql","java","jpa","json","mysql","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/RamonBecker.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}},"created_at":"2021-10-31T13:16:57.000Z","updated_at":"2022-02-14T18:01:03.000Z","dependencies_parsed_at":"2024-06-25T14:43:56.759Z","dependency_job_id":"a23ecc57-018b-4a03-8ef3-2cb7f330d038","html_url":"https://github.com/RamonBecker/GraphQLCompras","commit_stats":null,"previous_names":["ramonbecker/graphqlcompras"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamonBecker%2FGraphQLCompras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamonBecker%2FGraphQLCompras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamonBecker%2FGraphQLCompras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamonBecker%2FGraphQLCompras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RamonBecker","download_url":"https://codeload.github.com/RamonBecker/GraphQLCompras/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239207412,"owners_count":19599966,"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","java","jpa","json","mysql","spring-boot"],"created_at":"2024-12-25T16:10:38.611Z","updated_at":"2025-12-30T23:05:01.724Z","avatar_url":"https://github.com/RamonBecker.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQLCompras\n\n \n## :information_source: Information \n\nProject developed with SpringBoot and GraphQL. It was the object of study during development:\n- Creating a GraphQL API connected to the MYSQL database;\n- Creating custom queries with join between multiple tables to navigate the graph layers.\n- The use of paging in GraphQL queries;\n- Study on the GraphQL N+1 problem and how to use Cache;\n- Creating and Handling custom exceptions.\n## ⚠️ Prerequisite\n[![Java Badge](https://img.shields.io/badge/Java-ED8B00?style=for-the-badge\u0026logo=java\u0026logoColor=white)](https://www.oracle.com/br/java/technologies/javase-downloads.html) \u003e= 8 \n\n![Spring Badge](https://img.shields.io/badge/Spring-6DB33F?style=for-the-badge\u0026logo=spring\u0026logoColor=white)\n\n![JSON Badge](https://img.shields.io/badge/json-5E5C5C?style=for-the-badge\u0026logo=json\u0026logoColor=white)\n\n![mysql](https://img.shields.io/badge/MySQL-005C84?style=for-the-badge\u0026logo=mysql\u0026logoColor=white)\n\n![JPA-hibernate (1)](https://user-images.githubusercontent.com/44611131/136869865-0e3d7476-5128-4471-8817-8df40315b970.jpg)\n\n![GRAPHQL](https://img.shields.io/badge/GraphQl-E10098?style=for-the-badge\u0026logo=graphql\u0026logoColor=white)\n\n![JUNIT](https://img.shields.io/badge/Junit5-25A162?style=for-the-badge\u0026logo=junit5\u0026logoColor=white)\n\n\n\n##  🔧 Install \n\n\n![](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge\u0026logo=linux\u0026logoColor=black)\n\n\n```\nhttps://github.com/RamonBecker/GraphQLCompras.git\n```\n\n![](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge\u0026logo=windows\u0026logoColor=white)\n```\ngit clone https://github.com/RamonBecker/GraphQLCompras.git\nor install github https://desktop.github.com/ \n```\n\n\n## ⚙️ Installing MySQL\n\nEnter the following commands in the terminal.\n\n```\nsudo apt update\nsudo apt install mysql-server\n\n```\n### Configuring MySQL\n\nFor new installations, you will want to run the security script that is included. This changes some of the less secure default options for things like root logins and example users. Enter the command below.\n\n```\nsudo mysql_secure_installation\n```\nThis will take you through a series of prompts where you can make some changes to the security options of your MySQL installation. The first prompt will ask you if you want to configure the Validate Password Plugin, which can be used to test the strength of your MySQL password. Regardless of your choice, the next prompt will be to set the password for the MySQL root user. Sign in and then confirm a secure password of your choice.\n\nFrom there, you can press Y and then ENTER to accept the default answers for all subsequent questions. This will remove some anonymous users and the test database, disable remote login for root, and load all of these new rules so that MySQL immediately respects the changes you made.\n\n### Testing MySQL\n\nTo see if MYSQL is running, type the following command.\n\n```\nsystemctl status mysql.service\n```\n\nIf MySQL is not running, you can start it with the following command.\n```\nsudo systemctl start mysql\n\nNow try to connect your root user to MySQL.\n```\nmysql -u root -p\n\n\n### Attention when creating and connecting the database\n\nCheck the application.properties file\n\n```\nspring.datasource.url=jdbc:mysql://localhost:3306/udemy_purchases?useSSL=false\u0026allowPublicKeyRetrieval=true\nspring.datasource.username=username\nspring.datasource.password=password\n```\n\nYou must create the database in MYSQL with the name udemy_compras\n\n## ⚙️ Testing the project\n\n\nOpen your browser and type: \n\nhttp://localhost:8080/graphiql\n\n\nTo test product features:\n\n```\nmutation{\nsaveProduto(produto:{id: \"\" ,nome:\"teste\", valor: 1000}){\n      ...fragProduto\n   }\n }\n\nmutation{\n   deleteProduto(id:6)\n}\n\n{\n  produtos{\n     ...fragProduto\n   }\n}\n\nfragment fragProduto on Produto\n{\n    id, nome, valor\n}\n\n```\n\nTo test shopping features:\n\n```\n mutation{\n   saveCompra(compra:{\n     clienteId:1,\n     produtoId: 3,\n     quantidade:30,\n     status: \"OK\"\n   }){\n     id, quantidade, status\n  }\n }\n \n{\n  compras{\n    id,\n    quantidade,\n    status,\n    cliente{\n      id, nome\n    },\n    produto{\n      id,nome, valor\n    }\n  }\n}\n\n mutation{\n  deleteCompra(id:1)\n}\n\n```\n\nTo test client features:\n\n```\nquery GetCliente($id:ID!){\n  \n  cliente(id: $id){\n    ...fragCliente\n  }\n}\n\n\nmutation{\n   saveCliente(cliente:{id:6, nome:\"teste modelMappper \", email:\"teste@gmail.com\"}){\n    id, nome, email\n   }\n}\n\n\nmutation{\n  deleteCliente(id:4)\n}\n\n{\n   clientes{\n     id, nome ,email\n   }\n}\n\n\n\n{ \nc1: cliente(id:1){\n     id, nome, email\n},\nc2:  cliente(id:2){\nid, nome, email\n }\n}\n\n\nfragment fragCliente on Cliente\n{\n    id, nome, email\n}\n\n{\n  \nc1: cliente(id:1){\n\t...fragCliente\n\t},\n   c2:  cliente(id:2){\n \t...fragCliente \n   }\n }\n```\n\n## :zap: Technologies\t\n\n- Java\n- JPA\n- Spring Boot\n- GraphQL\n- JUNIT\n- ModelMapper\n- MYSQL\n\n## :memo: Developed features\n\n- [x] CRUD Purchases\n- [x] CRUD Client\n- [x] CRUD product\n\n\n\n## :technologist:\t Author\n\nBy Ramon Becker 👋🏽 Get in touch!\n\n\n\n[\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg' alt='github' height='40'\u003e](https://github.com/RamonBecker)  [\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/linkedin.svg' alt='linkedin' height='40'\u003e](https://www.linkedin.com/in/https://www.linkedin.com/in/ramon-becker-da-silva-96b81b141//)\n![Gmail Badge](https://img.shields.io/badge/-ramonbecker68@gmail.com-c14438?style=flat-square\u0026logo=Gmail\u0026logoColor=white\u0026link=mailto:ramonbecker68@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framonbecker%2Fgraphqlcompras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framonbecker%2Fgraphqlcompras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framonbecker%2Fgraphqlcompras/lists"}