MFS201 : Table of Contents

Chapter 2

Lesson 3

TypeScript-first GraphQL APIs with Pothos

Delve into the world of Pothos for creating TypeScript-first GraphQL APIs, unlocking the benefits of strong typing and rapid development. Understand the advantages of using TypeScript in your GraphQL API and how Pothos streamlines the process.

Quiz it to win it

Take the quiz

3 Questions
12 XP

In its most elaborative case, a GraphQL API can have the following data definitions:

  • The core GraphQL schema: the data definition for the schema is the bare minimum and functions as the true representation of the API to the consumer.
  • Internal type definitions: these are used to define the type for the resolver functions.
  • Type definitions for data sources: these definitions may come from various data sources (e.g. databases) that the API interacts with.
  • external type definitions: in some cases, the API may interact with third-party services that may bring their own type definitions.
  • Ideally, the data source and external type definitions are taken into consideration by the internal type definitions. In other words, the internal type definition is designed so that the definitions in the data sources and external connections are adhered to. In a more straightforward instance, there may be a single data source (a single database), and the internal type can just be the type definitions of the database.

    Get started for free today!

    No commitments. No contracts. Enjoy all features for a day — join in just three clicks!

    No credit card required.

    Quiz it to win it

    Complete this quiz successfully to proceed to the next lesson and win upto 12XP.

    Start quiz for this lesson

    Completing this quiz will get you

    +12 Experience Points

    +6% course progress