Introduction to GraphQL

Build with an Azure free account. Get USD200 credit for 30 days and 12 months of free services.
Start free todayContinuing with our coverage on GraphQL, Brandon gets into the code of the graphql-dotnet SDK and shows us how to create a GraphQL endpoint.
Learn more: https://codetraveler.io/DotNetGraphQL
Useful Links
var client = new GraphQLClient();
var result = await client.QueryAsync(q => new {
Movie = q.Movie(2, m => new {
m.Id,
m.Name,
ReleaseDate = m.Released,
Director = m.Director(d => new {
d.Name
})
}),
Actors = q.Actors(a => new {
a.Name,
a.Dob
})
});
At the end would be different database calls for each model, for example if I query cats and dogs which are 2 different table in database - will it make two calls to DB? Will it bring all the data to Asp.net Core and then filter out requested property?