Unit testing, integration testing, acceptance testing, exploratory testing—all are important methods that contribute to delivering quality software. But there’s another important kind of testing that is often overlooked, and that’s testing the production environment. For example, has the production environment been configured correctly so the system can successfully send email? Can the system access a […]
My team and I recently decided that we should store user-generated binary files in our PostgreSQL database so that a user could download them at a later time. This is different from uploading those files to something like Amazon S3 (which we’ll likely consider migrating to at some point down the road).
Both GraphQL and TypeScript support the concept of discriminated unions (also known as tagged unions). In this post, I’ll walk through setting up an example GraphQL schema and the corresponding TypeScript types, along with writing a query to retrieve a union type.
In my last post, I showed how to write a higher-order function that could wrap an existing function without losing the original function’s types. Today, I’m going to show how you can use that same technique to wrap an existing function for a different result–to execute it in a background process using the workerpool npm […]
As of TypeScript 3.1, the lib.es5.d.ts file provides a couple of predefined types that are very helpful when trying to write generic higher-order functions. In this post, I’m going to show an example of using the Parameters and ReturnType predefined types for just that purpose.
The project I’m working on has a Node.js back end written in TypeScript, with a PostgreSQL database for persistence. We had a production user who encountered an error when the system tried to insert a row into a table that had an integer column in it. The value it was trying to insert was 239.99999999999997, […]
Nearly all applications developed today will integrate with an external service of some kind (HTTP, Bluetooth, etc.). These integrations can pose problems for automated testing, exploratory testing, and even demonstrating functionality to a stakeholder.
According to documentation for Apollo’s GraphQL-tools: You don’t need to specify resolvers for every type in your schema. If you don’t specify a resolver, GraphQL.js falls back to a default one… The documentation goes on to state that the default resolver will look for a property on the parent object with the field name that’s […]
Heroku will terminate a request connection if no data is sent back to the client within 30 seconds. From Heroku’s Router – HTTP timeouts documentation: HTTP requests have an initial 30-second window in which the web process must return response data (either the completed response or some amount of response data to indicate that the […]
I’ve worked on a couple of React/Redux projects now, and it was only recently that I realized some of the re-rendering issues I’ve run into were being caused by incorrectly using connect, and specifically the second argument to connect — mapDispatchToProps.