Within blog post, I’m able to make suggestions through the settings away from a simple GraphQl machine written in c#. This post covers GraphQl issues and you may mutations, consent, error approaching and you will analysis when you’re providing over code trials for every single question. To check out together you just require .Internet six SDK hung and you will a fundamental comprehension of GraphQl. The brand new code trials can also be found to the Github.
To begin with i utilize the .Net CLI to scaffold another empty Asp.Online project named Api and you may range from the HotChocolate.AspNetCore plan.
The traditional Business.cs we understand of older core strategies are extremely outdated in the .Internet six. The newest layout utilizes minimal Apis.
Let’s initiate undertaking a simple GraphQl backend.I perform the ask node by simply making a community Inquire classification and you will sign in the initial procedure with it by adding a general public means Hello. Up coming we add the GraphQl relevant qualities to your dependency injections basket by the getting in touch with AddGraphQlServer into ServieCollection and you may register our very own newly created QueryType. დაწვრილებით „Doing good GraphQl backend in the c# — How to start off with Very hot Delicious chocolate a dozen within the .Net 6“