
Sign up and log in as different users to explore a real-time private chat app, send and receive messages with timestamps in a one-to-one conversation.
Rest APIs use multiple endpoints for get, post, put, and delete, while GraphQL APIs use a single post route and a test playground.
Explore GraphQL terminology by comparing queries and mutations to get and post operations, and examine schema as a data snapshot and resolvers as functions that return query results.
Build and query a GraphQL user schema with resolvers, defining a user type (id, first name, last name, email) and using variables and the playground to fetch data.
Explore how JWT-based authentication protects protected resources by issuing a JWT after sign-in and validating it via the authorization header to grant access.
Build a message model with sender and receiver relationships and a created at timestamp, linking to user table, then preview via prisma studio and prepare a mutation to send messages.
Write a GraphQL query to fetch messages between two users, filtering by sender and receiver with Prisma and ordering by created time ascending. Ensure the user is logged in.
Compare using Apollo client versus fetch for GraphQL data in a React app; demonstrate posting queries with fetch, headers, and tokens. Explain how Apollo aids state management and caching.
Install and configure Apollo client in a React app by following the official docs, set version 3.5.10, initialize the client, wrap the app with ApolloProvider, and enable hooks.
Show dynamic messages on the chat UI by querying messages by user with GraphQL in a React app, handling loading and errors and formatting the created date.
Design a subscription schema and resolver using PubSub and an asyncIterator to publish and broadcast new messages added in real time to all subscribers.
Fixes a real-time chat bug by updating the client to display messages only for the logged-in user, decoding the user id from locally stored JWT, and gating updates by sender.
This course will get you up and running with GraphQL quickly, and teach you the core knowledge you need to deeply understand and build GraphQL application quickly using React and Node.js
Authentication? you will learn it. Apollo client? included. Subscriptions? of course.
In this course you'll learn how to use GraphQL both on the server side and in client applications. You will be introduced to all the main GraphQL concepts like schema definition, Queries, Mutations, and Subscriptions, as well as to solution to common requirements such as handling authentication, authorization and client-side caching.
This course will teach you -
What and why of GraphQL
Material UI v5 for neat & beautiful UI
Building GraphQL with Apollo Server
Apollo Client for server side state management
Authentication and Authorization
Prisma v3 to interact with relational databases like MySQL
GraphQL Subscriptions for real time functionality
One to One private Chat app like MS teams
Deploy GraphQL application
In the end of this course you will get solid understanding of GraphQL that you can apply in projects & you will also have you own real time one to one chat application project like MS teams that you can add in your portfolio.
This course assumes good knowledge of modern JavaScript, and ideally some familiarity with Node.js and React.