Type-Safe Object Merging (TypeScript 2.8 Edition)

There are times when you want to merge two generic types in TypeScript, and type inference just isn’t doing it for you. Object.assign’s typing isn’t as precise as it could be, and spreading generics still doesn’t work. I’ve found a way to implement typing when merging objects using some of the new features in TypeScript 2.8.

Read more on Type-Safe Object Merging (TypeScript 2.8 Edition)…

Avoid Careless Production Mistakes with Custom Scripts

In the wise words of @stahnma,

“Everybody has a testing environment. Some people are lucky enough to have a totally separate environment to run production in.”

Thankfully, the project I’m working on has multiple environments: production (the most recently-released version), staging (for pre-release testing), dev (for dev team use and testing), and multiple review apps (for feature validation). Read more on Avoid Careless Production Mistakes with Custom Scripts…

Building a Family Tree with GraphQL – Part 2: Adding New Resolvers

In my last post, I described how you can build flexible APIs with GraphQL, using a family tree API as my demonstration. The implementation of the API was fairly simple, and I was able to traverse the graph of relationships between different people in the data set.

In this post, I’ll demonstrate how we can extend the same API to solve a problem with the first version. We can create new resolvers to fix a particular problem, but due to the nature of GraphQL, the same resolver can be used across many different queries. This unlocks more potential for the API without any extra development effort. Read more on Building a Family Tree with GraphQL – Part 2: Adding New Resolvers…

Forcing SSL in Phoenix Framework

Using SSL (Secure Sockets Layer) in Phoenix Framework is simple. HTTPS encryption is an important step in securing transport-level data, but it also provides a streamlined experience to users in the browser. More browsers are discouraging the use of HTTP, which is good for users and the open web.

Here are a few steps I’ve found to get SSL in Phoenix, redirecting on unencrypted requests, and putting it all together to understand how it works.
Read more on Forcing SSL in Phoenix Framework…

Debugging a NuGet Package

NuGet adds and manages DLL files in your .NET project, but not any source or symbol files. This can make debugging packages without extra tools like ReSharper rather challenging, since you’re basically left analyzing the source code without stepping through it at runtime. This is a short guide to debugging a NuGet package by replacing it with a local build.

Read more on Debugging a NuGet Package…