Skip to main content

Posts

Spring Boot GraphQL Save, Update and Delete - Database MutationMapping

Learn how to get started with Graphql using spring boot framework. In this session, you will be learning like how to add the schema details and mapping the function and request payload with Graphql @MutationMapping into your controller class. So you can preform like Save, update and delete operation using graphql You need Spring web, JPA, Mysql, Lombok and Spring Graphql dependencies to your pom module. schema.graphqls (This file should be created inside the resources/graphql folder) type Query{ findAll: [User] userById(id: ID): User } type User{ id: ID name: String gender: String emailId: String } type Mutation{ addUser(userDetails: UserDetails): User updateUser(userDetails: UserDetails): User deleteUser(id: ID): String } input UserDetails{ id: ID name: String gender: String emailId: String } UserGQLController .java package com.hakeemit.graphql.controller; import com.hakeemit.graphql.entity.User; import com.hakeemit.gra...
Recent posts

Spring Boot GraphQL REST API - GET Function using Query Mapping

Learn how to get started with Graphql using spring boot framework. In this article, you will be learning like how to add the schema details and mapping the function and request payload with Graphql @QueryMapping into your controller class. You need Spring web, JPA, Mysql, Lombok and Spring Graphql dependencies to your pom module. schema.graphqls (This file should be created inside the resources/graphql folder) type Query{ findAll: [User] userById(id: ID): User } type User{ id: ID name: String gender: String emailId: String } UserGQLController .java package com.hakeemit.graphql.controller; import com.hakeemit.graphql.entity.User; import com.hakeemit.graphql.entity.UserDetails; import com.hakeemit.graphql.service.UserServices; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.graphql.data.method.annotation.Argument; import org.springframework.graphql.data.method.annotation.MutationMapping; import org.springframe...

Spring Boot Mysql Database Tutorial with Example Code - GET/POST/PUT/DELETE

 Learn how to connect to mysql database using spring boot framework. In this article you will learn the different types of @GetMapping/ @PostMapping / @PutMapping and @DeleteMapping Usages and their components @RestController, @Service, @Repository and @Entity. Goto Spring Initializer  https://start.spring.io/ and add the following dependencies like Spring web, JPA, lombok and mysql driver similar to below image Generate the boilerplate code and open the project into your IDE. Follow the below screenshot and create the respective packages to maintain your code easily. Lets Create the follow classes UserController.java package com.hakeemit.database.controller; import com.hakeemit.database.entity.User; import com.hakeemit.database.entity.UserDetails; import com.hakeemit.database.service.UserServices; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController public class UserContr...

Spring Boot Hello World Tutorial - GetMapping REST API

Learn How to get started with Spring boot framework. Create your very first REST API using Spring Boot and the @RestController  @GetMapping annotation. Whether you're new to Java development or just getting started with Spring Boot, this step-by-step guide will help you understand the core concepts and build a simple "Hello World" RESTful API. Go to Spring Initializer  https://start.spring.io/ and fill out the following details similar to below image and add Spring web dependency HelloController.java - Create new package and new class and add the following code into that class package com.hakeemit.hello.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloController { @GetMapping("/hello") public String hello(){ return "Hello World"; } } Your project structure will look like this  Once you run the application. Go ...

Form Input Widget on Flutter Android - Text, Slider, Switch, Date Picker, Buttons & Check Box

  Learn how you can use the different Form Input Widget on Flutter Android - Text, Slider, Switch, Date Picker, Buttons & Check Box This Application will give a basic idea like how you can create different widgets for the form panel designing. Video Tutorial import 'package:flutter/material.dart'; import 'package:intl/intl.dart' as intl; class FormWidgetsDemo extends StatefulWidget { const FormWidgetsDemo({super.key}); @override State createState() => _FormWidgetsDemoState(); } class _FormWidgetsDemoState extends State { final _formKey = GlobalKey (); DateTime date = DateTime.now(); double maxValue = 0; bool? checkBoxFeature = false; bool sliderFeature = false; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Hakeem Innovation Technology'), ), body: Form( key: _formKey, child: Scrollbar( child: Align( ali...

GST Calculator Android Free App

 This App is designed to help the business people to perform the GST calculation with simple operation with custom percentage setting that can be easily adjusted according to their needs.   Effortless GST Calculations for Your Business! Introducing the ultimate GST (Goods and Service Tax) Calculator designed exclusively for Indian users. Tailored to simplify your billing and invoicing needs, this app provides separate Central GST and State GST tax rates based on your entered amount.   Key Features: 📊 Detailed Breakdown: Instantly view Base fare, CGST, SGST, and Total GST, empowering your business with comprehensive insights. 🔄 Inclusive & Exclusive GST: Easily calculate both inclusive and exclusive GST amounts. 📈 Predefined GST Percentages: One-touch calculations for 3%, 5%, 12%, 18%, and 28% GST rates. ⚙️ Customizable Settings: Configure the app to match your business requirements, ensuring flexibility. 💼 Perfect for Business Owners: Prepare billing invoices effo...

Bottom Navigation Bar Flutter Sample Code

 Learn how you can design bottom navigation bar to your flutter based android application. Sample code for Bottom Navigation Bar import 'dart:developer'; import 'package:flutter/material.dart'; class AppBarBottomNavigationBar extends StatelessWidget { const AppBarBottomNavigationBar({super.key}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text('Hakeem Innovation Technology')), body: Center( child: Column(children: [ Image.asset( "assets/images/flutter.png", width: 300, height: 300, ), RichText( text: const TextSpan( text: 'Flutter Learning', style: TextStyle( color: Colors.black87, fontSize: 20, fontWeight: FontWeight.bold), ), ), ]), ), bottomNavigationB...