API Development with REST and GraphQL

Software Development

COURSE OVERVIEW


This 3-day practical course is designed for developers and architects who want to build robust, scalable APIs using REST and GraphQL. The course dives deep into designing, developing, securing, and testing modern APIs, highlighting the differences and best practices for both REST and GraphQL. Participants will work with real tools like Postman, Swagger/OpenAPI, Apollo Server, and Node.js to build and test APIs from the ground up.


Duration: 3 Days

Format: Instructor-led, hands-on coding sessions, live demos, API design labs, and use-case-based projects

Description

? Day 1: Building and Designing RESTful APIs

Session 1: Introduction to REST APIs


  • What is an API?
  • Principles of REST (statelessness, resources, verbs)
  • REST vs. SOAP vs. GraphQL


Session 2: Designing RESTful Endpoints


  • RESTful URL structure and HTTP methods (GET, POST, PUT, DELETE)
  • Status codes and response formats
  • Resource nesting and versioning


Session 3: Building a REST API with Node.js and Express


  • Setting up Express server
  • Defining routes and controllers
  • Working with request/response objects and JSON


Lab Activities:


  • Create a basic REST API for a sample "Product Catalog"
  • Use Postman to test API endpoints and methods
  • Handle input validation and basic error handling


? Day 2: Advanced REST Features + Introduction to GraphQL

Session 1: Enhancing REST APIs


  • Authentication and authorization (JWT, API Keys)
  • Middleware usage (logging, validation, error handling)
  • Pagination, filtering, and sorting


Session 2: Introduction to GraphQL


  • GraphQL vs. REST: key differences and when to use each
  • Core concepts: schema, types, queries, mutations, resolvers
  • Setting up Apollo Server with Node.js


Session 3: Writing Your First GraphQL API


  • Defining schema and resolvers
  • Handling queries and mutations
  • Nested and relational data (resolving relationships)


Lab Activities:


  • Add JWT authentication to the REST API
  • Set up a GraphQL server and run sample queries
  • Create types and resolvers for a “User + Posts” schema


? Day 3: Full-Stack API Integration and Best Practices

Session 1: Consuming APIs from the Frontend


  • Using REST and GraphQL with React or frontend clients
  • Fetching data with Axios (REST) and Apollo Client (GraphQL)
  • Managing loading states and caching in GraphQL


Session 2: API Documentation, Testing, and Security


  • Auto-documenting REST with Swagger/OpenAPI
  • GraphQL schema documentation and playground
  • API testing (Postman, Insomnia) and security best practices


Session 3: Capstone Project + Deployment


  • Design and build a complete API (REST or GraphQL) for a sample app (e.g., Task Manager or Blog)
  • Deploying to cloud platforms (Render, Heroku, Vercel)
  • Final project presentations and code reviews


Lab Activities:


  • Document and test the built API
  • Deploy API to the cloud with environment variables
  • Showcase project demo with both REST and GraphQL access options

API Development with REST and GraphQL

Software Development

COURSE OVERVIEW


This 3-day practical course is designed for developers and architects who want to build robust, scalable APIs using REST and GraphQL. The course dives deep into designing, developing, securing, and testing modern APIs, highlighting the differences and best practices for both REST and GraphQL. Participants will work with real tools like Postman, Swagger/OpenAPI, Apollo Server, and Node.js to build and test APIs from the ground up.


Duration: 3 Days

Format: Instructor-led, hands-on coding sessions, live demos, API design labs, and use-case-based projects

Description

? Day 1: Building and Designing RESTful APIs

Session 1: Introduction to REST APIs


  • What is an API?
  • Principles of REST (statelessness, resources, verbs)
  • REST vs. SOAP vs. GraphQL


Session 2: Designing RESTful Endpoints


  • RESTful URL structure and HTTP methods (GET, POST, PUT, DELETE)
  • Status codes and response formats
  • Resource nesting and versioning


Session 3: Building a REST API with Node.js and Express


  • Setting up Express server
  • Defining routes and controllers
  • Working with request/response objects and JSON


Lab Activities:


  • Create a basic REST API for a sample "Product Catalog"
  • Use Postman to test API endpoints and methods
  • Handle input validation and basic error handling


? Day 2: Advanced REST Features + Introduction to GraphQL

Session 1: Enhancing REST APIs


  • Authentication and authorization (JWT, API Keys)
  • Middleware usage (logging, validation, error handling)
  • Pagination, filtering, and sorting


Session 2: Introduction to GraphQL


  • GraphQL vs. REST: key differences and when to use each
  • Core concepts: schema, types, queries, mutations, resolvers
  • Setting up Apollo Server with Node.js


Session 3: Writing Your First GraphQL API


  • Defining schema and resolvers
  • Handling queries and mutations
  • Nested and relational data (resolving relationships)


Lab Activities:


  • Add JWT authentication to the REST API
  • Set up a GraphQL server and run sample queries
  • Create types and resolvers for a “User + Posts” schema


? Day 3: Full-Stack API Integration and Best Practices

Session 1: Consuming APIs from the Frontend


  • Using REST and GraphQL with React or frontend clients
  • Fetching data with Axios (REST) and Apollo Client (GraphQL)
  • Managing loading states and caching in GraphQL


Session 2: API Documentation, Testing, and Security


  • Auto-documenting REST with Swagger/OpenAPI
  • GraphQL schema documentation and playground
  • API testing (Postman, Insomnia) and security best practices


Session 3: Capstone Project + Deployment


  • Design and build a complete API (REST or GraphQL) for a sample app (e.g., Task Manager or Blog)
  • Deploying to cloud platforms (Render, Heroku, Vercel)
  • Final project presentations and code reviews


Lab Activities:


  • Document and test the built API
  • Deploy API to the cloud with environment variables
  • Showcase project demo with both REST and GraphQL access options