Articles

  1. Incorporating REST Data with a GraphQL API

    One popular misconception about GraphQL is that you have to tear down all of your REST APIs in order to build a GraphQL server. The flexibility of GraphQL allows you to use all of your favorite REST data sources while enjoying the organizational benefits of a GraphQL schema. In this article, we'll take a closer look at how we can incorporate the data from a REST API into an existing GraphQL server.

    Read more
  2. Securing Your GraphQL Server

    When you build a GraphQL API, you provide a lot of freedom and flexibility to your clients. They have the flexibility to query data from multiple sources in a single request. They also have the ability to request large amounts of related, or connected, data in a single request. Left unchecked, your clients could have the capability of requesting too much from your service. Not only will the strain of large queries affect server performance, it could also take your service down entirely. Some clients might do this unintentionally, whereas other clients might have more malicious intent. Either way, you need to put some safeguards in place and monitor your server’s performance in order to protect against large or malicious queries.

    Read more
  3. Creating Custom Scalars

    GraphQL fields can return lists and objects, but of course, they can also return singular values. These are called scalar types. A scalar in computer science represents a single variable, an atomic unit that can hold one value at a time. A lot of data for our apps falls into the scalar category: names, email addresses, phone numbers. These are leaves of the tree: lone values instead of objects.

    Read more
  4. Ready to Scale: Refactoring GraphQL Schemas

    A GraphQL schema is a tool for communication across teams. When we work together to define a schema with the schema definition language, we're deciding how everyone using our API will consume the data. We want to make it as clear and simple as possible for consumers to send operations to our API without errors.

    Read more
  5. Generating Types with Apollo CLI

    If you're ever trying to talk someone into liking GraphQL, a good place to start is by explaining that GraphQL is a type system for your API. Enforcing types is something that GraphQL is really good at, and if you add TypeScript in the mix, you're dealing with a pretty powerful combination. GraphQL and TypeScript are like Leslie Knope and Ben Wyatt - they both love rules, and they both bring out the best in one another.

    Read more
  6. Setting Up VSCode for Teaching and Recording Screencasts

    In a couple weeks, we're going to be celebrating Moon Highway's eighth anniversary. Eight years of classes, video recordings, talks, and webinars. There's been a whole lot of typing into a code editor in front of people, and one of our main goals when doing this is to make sure that people can read the screen.

    Read more