graphql with dotnet

GraphQL with ASP.NET Core (Part- V : Fields, Arguments, Variables)

Read the previous part - GraphQL with ASP.NET Core (Part- IV : GraphiQL - An in-browser IDE) Fields We already have a good idea of GraphQL Fields. Remember we had two fields under the HelloWorldQuery i.e. hello and howdy. Both of them were scaler fields. As the official documentation states, "At its simplest, GraphQL is about asking for specific fields on objects" - Let's extend our simple application to accommodate a complex type. Say, for example, we are heading towards a path of making an Inventory system.…

Keep reading

GraphQL with ASP.NET Core (Part- II : Middleware)

Read the previous part - GraphQL with ASP.NET Core Part- I : Hello World If you are familiar with ASP.NET Core middleware[1], you may have noticed that in our previous post we already had a middleware. In the initial blank app, that middleware was responsible for throwing a Hello World response. Later we replaced it with our custom code so that it can respond back a result of some static GraphQL query. Middleware is software that's assembled into an application pipeline to handle requests and responses. Each component:…

Keep reading

GraphQL with ASP.NET Core (Part- I : Hello World)

Tired of REST? Let's talk about GraphQL. GraphQL provides a declarative[1] way in which you can fetch data from the server. You can read about every bit of goodness that is baked into GraphQL in the official site. However, in this series of blog posts, I'm going to deal with ASP.NET Core and will show how you can integrate GraphQL with it and use it as a query language for your API. Meaning that you only declare the properties you need (In contrast to restful API where you…

Keep reading