
Explore the basics of GraphQL, how it replaces REST APIs, and how to query a GraphQL server with a client using schemas, fields, fragments, and mutations.
Explore GraphQL queries, covering fields, arguments, alias, operation name, and variables. See how aliases rename fields, operation names differentiate queries, and variables pass product ids in the playground.
Explore fragments, directives, and mutations in GraphQL with GraphQL .NET and ASP.NET, using reusability and conditional fields to create and query components and products.
Discover how GraphQL types define a strong schema, with scalar and object types like product and component, and learn how the schema enables cross-language code generation via co-generation tools.
Discover how GraphQL works, create basic GraphQL queries, and examine the basic schema types, setting the stage for the next section.
Explore building a simple core web api project with energy framework, access data from the skylight database, and apply energy framework repository patterns.
Seed data for energy framework by creating a seed data class and a static extension on the product db context, then inject it in startup and expose a products controller.
Create a product repository to access data via an EF ORM context, expose get all products, and wire it through dependency injection for easy testing and data retrieval.
Build and test an ASP.NET Core Web API using a simple template, create controllers, implement a repository pattern to access data, and reuse this interface for the GraphQL .NET server.
Explore building a GraphQL server with GraphQL .NET and ASP.NET, and learn to implement and configure the server in this section.
Build a GraphQL server using the graphical darknet library by defining product and component types, a root query and schema, with repositories and an interactive playground UI.
Add nested query support by introducing a component type and resolving it through a component repository, enabling products to expose their components via GraphQL .NET.
Add query argument support to fetch a specific product by id or name in a GraphQL .NET and ASP .NET server, updating the schema and resolver logic.
Add nested query argument support by resolving a component inside the product type. Extend the query type to expose components via the component repository with dependency injection.
Implement a component insertion mutation using a component input type and component mutation in a GraphQL .NET and ASP.NET project, wiring name, description, and product id.
Explore GraphQL testing by using a GraphQL client to perform post and get operations with query and mutation variables, validating JSON responses and ensuring query accuracy.
Create a unit test project, install the GraphQL client packages, configure the endpoint at port 5001, and send a query to access the GraphQL server from the client.
Run a GraphQL test with xUnit and fluent assertions, send a query via a GraphQL client, parse and map the response, and validate results.
Learn to run tests against a GraphQL server using Visual Studio 2022, test explorer, and a GraphQL client. Discover port configuration, https handshakes, and integration testing concepts.
Use web application factory to create an in-memory test server for integration testing a GraphQL ASP.NET Core app, wiring a startup class, test fixture, and an HttpClient.
Leverage a web application factory and test fixture to run GraphQL server tests with a DPI client, avoiding a separate server, using the replication factory and CTP client for validation.
This course Develop and Test GraphQL Server with GraphQL .NET & ASP .NET is focused on making anyone who has zero knowledge in GraphQL and make them understand the nitty-gritty details on developing GraphQL Server with GraphQL .NET and testing the GraphQL server using GraphQLClient .NET and WebApplicationFactory for integration testing.
As a part of this course, we will also do testing of application with XUnit as testing library along with GraphQL Client.
This course is split into the following sections for simplicity
Basics of GraphQL
Understanding Queries
Understanding Parameters
Understanding Arguments
Understanding Operation Name
Understanding Alias
Understanding Schema
Understanding Mutations
Understanding Fragments
Setting up ASP .NET WebAPI project with Entity Framework as ORM
Creating basic WebAPI project
Adding Entity Framework
Adding Data layer and controllers
Creating Repository pattern
Accessing data from Repository pattern for controllers
Developing GraphQL Server which supports
Creating Query
Creating Schema
Creating QueryTypes
Creating InputQueryTypes (for mutation)
Support for nested Query
Support of parameters/query arguments
Support for nested sub-queries
Support for Mutations
Testing GraphQL using GraphQL Client
Testing using XUnit
Unit Testing without HttpClient
Integration testing with TestServer and WebApplicationFactory
At the end of the course, you will understand how to work with GraphQL using GraphQL .NET and also you will understand how we perform Unit testing and Integration testing with the help of WebApplicationFactory and reduce the footprint of running the whole server and instead just run the test server to test the whole application in just couple of lines of code.