Guarding against N+1 issues in GraphQL

The N+1 query problem is a common one to encounter during software development, particularly with ORMs (Object Relational Mappers) and their capabilities around lazy loading. A quick example looks like

Exporting a GraphQL Schema

I’ve been playing around with GraphQL at work quite a bit lately and starting to put together some thoughts on how it can fit into your application (and more importantly where it doesn’t).

EF Core Client Side evaluation (and how to stop it)

EF Core has a feature that supports parts of a query being evaluated on the server and parts on the client, the decision is driven by the whether the underlying LINQ provider can convert the expression into SQL.

Moving EF Core migrations to their own assembly

If you follow an introduction to EF Core tutorial then you’ll tend to find the migrations end up in the same assembly as the models and DB context. For a lot of people this is fine but personally I prefer to move them off to their own assembly. For me this is about seperating a run time concern (the model and the context) from a deployment concern (the migrations), but this is completely subjective.

Interesting uses of tuple deconstruction

C# 7.0 brought us a new and interesting feature with tuple types and tuple literals. These coupled with tuple deconstruction let us create new syntax patterns and helper methods that hopefully results in more readable code.