Glareone / GraphQL-meets-.Net6

GraphQL in .Net6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphQL meets .Net6

Additional useful libraries

GraphQL to EF & SQL Calls: https://github.com/EntityGraphQL/EntityGraphQL

GraphQL vs REST

Explanation from IBM
REST: CRUD based on resources. It provides complete set of operations over your data. But as a drawback in complex situations may send you over-fetched or under-fetched data.
GraphQL: To fetch or mutate data using exact one request. Schema+resolver you created will take care of the rest. Good in complex data situations or in situations when you want to reduce the throughput because of over-fetching.

GraphQL also does not dicrate patterns or project structure and could be introduced on top of already existing architecture.

General Information

image image

image

Types & Mapping in .Net

image image image image

Working app primitives

Queries (2 options to write query):

query image

Query relational data:

image

Mutations (in my example you need to define what you expect in output because I return back Course from Repository):

mutation single update delete

Mutations for relational data

add course with reviews

About

GraphQL in .Net6


Languages

Language:C# 100.0%