
Learn to build APIs with GraphQL using the GraphQL server library, covering schemas, input and output types, queries, mutations, subscriptions, and a C# client.
Explore the development environment for this course, focusing on Visual Studio 2022 Community edition (free), its benefits, and alternatives like Visual Studio Code, with notes on system requirements.
Know the Microsoft ecosystem, including .NET and C#, to enroll in this course. Prefer familiarity with REST APIs to compare REST with GraphQL, though it is not mandatory.
Access the course source code, documentation, and postman APIs on GitHub, with class-by-class branches showing code evolution, GraphQL export caveats, http protocol in the materials folder, and scale draw notes.
Set up your development environment by installing the Visual Studio Community edition, enabling the ASP.NET workload and database components, and applying essential project settings for ASP.NET Core API work.
Install Postman to test local and online APIs, exploring REST, GraphQL, gRPC, and WebSockets. Use Postman throughout the course to validate API functionality.
Compare REST and GraphQL, highlighting GraphQL's flexible, single-endpoint querying, strong typing, real-time subscriptions, and reduced calls, with caching considerations and use cases for dynamic dashboards.
Recaps how rest api works with multiple endpoints and http verbs, and explains how GraphQL API uses a single endpoint, a defining schema, and queries, mutations, and subscriptions, delivering json.
Start a movies API project in Visual Studio using the ASP.NET API template, convert a REST setup to GraphQL by installing packages and configuring the project for testing with Swagger.
Create a movie model folder with classes for movies and their ratings in an API for movies, including name, description, release date, comments, and the relationship between movies and ratings.
Create an enum for movie genres to demonstrate GraphQL usage, defining comedy, action, romance, fantasy, and horror, and assign a single genre per movie for simplicity.
Configure the EF Core context in a data folder, install EF Core 8 and SQL Server provider with migrations, and map Movie and Reviews models with enum-to-text conversion.
Set up a sql server localdb database for the asp.net core api, configure the entity framework context and connection string, and run the migration to create movie and review tables.
Learn to set up GraphQL in ASP.NET Core by installing GraphQL and GraphQL server transport packages, exploring .NET libraries, and leveraging data loader and memory cache for a GraphQL API.
Unify your GraphQL API with a schema that binds types, queries, and mutations. Define strongly typed models and expose queries; use mutations to change data over HTTP or WebSocket.
Create a GraphQL movie type that maps the movie model to a GraphQL object type, exposing only id and name, with descriptions for each field.
Map movie fields to GraphQL types, exposing only described data using a strongly typed genre enum and a ratings class. Explain GraphQL's primitive to type mapping and enum handling.
Map a movie review type in ASP.NET Core GraphQL by defining id, rating, and creation date fields, then expose a single GraphQL endpoint for queries and mutations.
Compare rest endpoints with GraphQL queries, then define a movies field as a GraphQL list of movie type resolved from the database, with plans for a single movie query.
Create a single-movie GraphQL query by adding a mandatory integer id argument, resolve it asynchronously, and retrieve the movie matching that id from the database.
Create a GraphQL schema at the project root, wire the movie query via dependency injection, and configure ASP.NET to expose the default endpoint and structured, typed documentation.
seed the catalog database by running a sql script to populate 49 movies and multiple ratings, then fetch data with graphql and prepare to test queries in the next video.
Fix the rating mapping by converting ratings to a list in the GraphQL API, and test with Postman to query all and single movies, including reviews via include and resolver.
Learn how the data loader optimizes GraphQL by batching movie ratings queries and consolidating them to reduce server load.
Enable and implement the data loader with a get or add batch loader to batch fetch ratings by movie id, replacing 50 queries with a single batch lookup.
Learn to implement GraphQL mutations for a movie API, including add, update, and delete operations, with input types and id handling, returning movie data for add/update and boolean for delete.
Demonstrates creating GraphQL mutations in ASP.NET Core: register, update, and delete a movie using the resolve method, handling asynchronous operations, input arguments, and database persistence.
Discover how to consume a GraphQL API over HTTP, using postman to explore the schema and craft get and post queries to fetch movies' id, name, and description.
Learn how GraphQL aliases rename fields for client-side mapping, enable multiple operations in a single request, and fetch flexible movie data like id, name, and release date.
Learn how GraphQL fragments reuse movie fields across queries by defining and applying a fragment. Improve maintainability by centralizing id, title, summary, release, and category in the fragment.
Master how GraphQL variables let you pass parameters like a movie id through a dedicated variables section, define input types, and use aliases for a streamlined, reusable query.
Learn how to consume a GraphQL mutation over HTTP, configure mutation inputs and variables, and update a movie description by sending an id and movie data.
Learn to consume a GraphQL API with C# by building a dedicated client, organizing models in a domain library, and configuring the http endpoint with system text json serializer.
Consume the movie API with a GraphQL client by querying a single movie by id. Send the query asynchronously and deserialize the data into a movie object.
Master consuming a GraphQL API from a C# client by using parameterized queries and variables for single and multiple movies, and implement an add movie mutation with input objects.
Guides updating and deleting movies via GraphQL mutations, using id-based parameters, returning a movie or boolean as confirmation, and demonstrating a reusable client service across projects.
Learn how to implement GraphQL subscriptions in ASP.NET Core by enabling websockets, creating a MovieSubscription type, and wiring it into DI to notify on every added movie.
Explore real-time GraphQL subscriptions by implementing a movie added notification system using a singleton message observable, WebSocket connections, and dependency injection for instant client updates.
Consume a GraphQL subscription with a C# client to receive real-time movie updates, test via Postman, and enable database synchronization across console and web projects.
Learn to add a graphical interface for your API using Altair, so clients can test GraphQL endpoints, configure the endpoint, view documentation, and run queries and mutations.
Build your APIs with .NET and GraphQL, compare it to rest, and leverage its flexibility, improved performance in some scenarios, and bandwidth savings as you finish this course.
We inform you that this course was recorded in Portuguese (Brazil) and has been dubbed in your language. Enjoy the course!
If you want to build modern, high-performance, and flexible APIs, this course on GraphQL with ASP.NET Core is the perfect choice! Unlike traditional REST, GraphQL offers clients the ability to query exactly the data they need, solving common issues like over-fetching and under-fetching, and making your applications much more efficient.
In this course, you will learn everything from the basics of GraphQL to the most advanced implementations in ASP.NET Core, with integration to Entity Framework Core for database handling. We will explore fundamental aspects such as queries, mutations, and subscriptions, ensuring you master communication between client and server in an optimized way.
You will also learn techniques to improve the performance of your APIs, such as Data Loaders, which help manage multiple simultaneous requests efficiently. Furthermore, we will cover the implementation of WebSockets for real-time communication and how to use powerful tools like Postman and GraphQL Altair to test, debug, and optimize your APIs in a practical and straightforward manner.
The course also covers best practices and design patterns, teaching you how to structure your code in an organized and scalable manner. Whether you're a back-end developer, a full-stack developer, or part of a team looking to modernize your APIs, this course will provide you with all the knowledge needed to create robust, fast, and scalable APIs with GraphQL in ASP.NET Core, empowering you to build innovative and efficient solutions!