Skip to content

williamverdolini/graphQL-intro

Repository files navigation

A step-by-step intro to GraphQL in .NET

Prerequisites

You must have installed in your machine:

  • MongoDb: versione >= 4.0. The project works with DB on port 27017, not authenticated
  • .NET: version 6+
  • VS code

How to follow the introduction

This introduction is structured in progressive steps. Each of the steps is managed on a separate branch which includes the previous steps; in this way it is possible to follow the steps of the guide by advancing in the numbered branches and following the notes present in the linked wiki.

Scope

The guide wants to be a gentle introduction to the use of GraphQL with .NET framework. In my learning path I have decided to limit the scope of my research/study focusing exclusively on research capabilities and functionalities; for this reason I do NOT deal with issues related to Mutations or Subscriptions or other topics at all. In this intro I will cover:

  • an overview of what GraphQL is and its specifications
  • how to use GraphQL to read data in databases (MongoDb in particular)
  • how to implement useful aspects for the execution in production, such as eg. Security, Monitoring and Caching
  • how to allow a client Angular to make GraphQL calls

Intro steps

  1. Project Setup
  2. Hotchocolate GraphQL
  3. Relay
  4. Resolvers
  5. DataLoaders
  6. Middlewares
  7. Monitoring with Application Insights
  8. Automatic Persisted Queries
  9. GraphQL tools
  10. Security
  11. Authentication/Authorization
  12. Apollo Angular
  13. Schema Stitching
  14. Schema Federation
  15. Polymorphic Ids
  16. GraphQL Testing
  17. Http Interceptors
  18. Conditional field projection
  19. Subscriptions

If you want to hands on this intro, clone the repo and switch to the step branches.

git clone https://github.com/williamverdolini/graphQL-intro.git
cd graphQL-intro/
git switch 01.project-setup

Have fun.