Using with Typescript

This document provides information on how to generate types from the QueryBoost schema for typescript.

GraphQL Code Generator

The easiest way to generate types is to use GraphQL Code Generator.

Setup

For the Schema field in your codegen.yml file :

schema: - https://api.queryboost.com/mocks: headers: Authorization: YOUR-MOCK-KEY-HERE

Be sure to also add typescript and typescript-operations to your plugins section.

Now when you run graphql-codegen the schema will be fetched from the mock endpoint.