TypeScript is a wonderful language for designing data-driven applications. The type system is suited to describe the many different shapes and transformations of data as it travels from one end of a system to another. As my team has gained more experience with TypeScript, we’ve developed some guidelines for creating typed modules that help the […]
Being explicit about the return type of the function is the most under-utilized feature of TypeScript. At least, that’s true for the way I write my code. When I first started using TypeScript, I was really impressed with the way it inferred the return type of the function, and having these types perpetuate throughout the […]
If you’ve worked with a piece of software that talks to a database, chances are you’ve come across a long SQL query. Slowly, your eyes glaze over as you attempt to reason through the many joins and subqueries, trying to figure out if this query is the source of the bug. You debate between the […]
Having new team members join a project is an exciting time, but it can often be difficult. Projects can have a huge variety of things to learn: new technologies, application architecture patterns, business models, etc., so it’s good to find a balance between ramping them up quickly and overwhelming them.
When developing software, it’s always tough to work with caching. While my team appreciates the efficiencies that Data Loader can provide for applications, we still struggle with the same problems that always come up when caching queries, mainly invalidating caches when a data set has changed.
Lately, my team has been looking for better ways to create and maintain mocks in our TypeScript project. In particular, we wanted an easy way to mock out modules that we built using Sinon.JS.
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 […]
Over the past year, I’ve been working with GraphQL to build APIs. GraphQL is a query language that allows for flexible endpoints for servers, giving consumers the power to control what data they are receiving.
Lately, I’ve been using Sinon.JS for mocking in my unit tests. By using mocks for dependencies inside functions, I can write unit tests that are resilient to a changing codebase. Functions with mocks can also be developed without worrying about the chain of dependencies that could affect the logic inside the functions.