tRPC: Building type-safe APIs with TypeScript

tRPC: Building Type-Safe APIs with TypeScript

Jake Everhart API Development, Articles, Development Technologies & Tools, GraphQL, JavaScript, TypeScript Leave a Comment

Over the years, we’ve seen many approaches to HTTP API design. While REST APIs are still very popular throughout the industry, they offer no inherent guarantees that the client’s assumptions about the response structures will be valid.

GraphQL fills this gap to an extent by allowing client-side code greater control over the resulting structures but at the cost of added complexity. RPC (remote procedure call) frameworks attempt a different solution by sharing generated type definitions between the client and server implementations. What if there was a way to achieve the type safety of RPC by simply inferring the type definitions from the server’s code?

Enter tRPC. Since JavaScript (and specifically TypeScript) can already span across client and server implementations, tRPC allows a client to directly consume structures defined by the server’s exposed procedures. Essentially, you import your dependencies from the server to access these procedures, their return types are inferred and checked at build time, and your client code can confidently consume the returned data.

In this post, we’ll look at how it achieves these goals and what limitations it places on your project stack.

FHIR APIs

Part 1: Creating an FHIR API – Google or Azure?

Zach Gardner API Development, Articles, Cloud, Creating an FHIR API, Security, Tutorial Leave a Comment

Data interoperability is one of the hardest problems in Healthcare IT. The most popular approach is to exchange HL7v2 messages between systems. These pipe-delimited messages are difficult to read by a human and often need additional customizations between implementations.

The next major paradigm shift is towards FHIR (Fast Healthcare Interoperability Resources), a JSON-based standard that is evolving ahead of the needs of the industry. Cloud vendors like Microsoft, Amazon, and Google are trying to lay their claim to be the one-stop shop for healthcare on the cloud.

This blog is part of a 4 part series diving into an actual use case I recently encountered while working with a client. I had to stand up an FHIR repository/API for 2+ million patients that could be used by hundreds of users every day, as well as countless background processes.

Spring Boot With GraphQL: What The Cool Kids Are Doing

Matt McCandless API Development, Articles, Development Technologies & Tools, GraphQL, Spring Boot 2 Comments

Attention: The following article was published over 4 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.This article is going to introduce you to Spring Boot with GraphQL. We’ll walk through a simple beer app to show you what it can do. So you have built this really …

GraphQL Presentation

[Video] Introduction to GraphQL

Keyhole Software API Development, Development Technologies & Tools, Educational Event, GraphQL, Videos Leave a Comment

This 33-minute video features Keyhole Principle Consultant Mat Warger at our internal employee lunch and learn in November 2020. He discusses GraphQL’s main features and how it’s beneficial for use in modern APIs.

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. Basically, it provides a better way to think about your data!

Keyhole Fabric API Gateway by Keyhole Labs is Accepted into Hyperledger Labs

Keyhole Fabric API Gateway Accepted Into Hyperledger Labs

Keyhole Software API Development, Articles, Blockchain, Company News, Hyperledger Leave a Comment

The Keyhole Labs team has announced that the Keyhole Fabric API Gateway has been accepted into Hyperledger Labs.

Hyperledger® Labs is a community-based innovation space gathering people who share a common interest in developing blockchain-related software. Entrance into Hyperledger Labs allows the Keyhole Fabric API Gateway to be further tested, innovated, and used by the wider Hyperledger community.

See the official announcement on the Keyhole Labs blog.