Skip to content

Commit

Permalink
docs: TS moduleResolution requirements
Browse files Browse the repository at this point in the history
closes #845
  • Loading branch information
jasonkuhrt committed May 15, 2024
1 parent d84756d commit db4db92
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# graphql-request

Minimal GraphQL client supporting Node and browsers for scripts or simple apps
Minimal GraphQL client supporting Node and browsers for scripts or simple apps.

![GitHub Action](https://github.com/jasonkuhrt/graphql-request/workflows/trunk/badge.svg) [![npm version](https://badge.fury.io/js/graphql-request.svg)](https://badge.fury.io/js/graphql-request)

Expand All @@ -9,6 +9,7 @@ Minimal GraphQL client supporting Node and browsers for scripts or simple apps

- [Highlights](#highlights)
- [Install](#install)
- [TypeScript Setup](#typescript-setup)
- [Quick Start](#quick-start)
- [Examples](#examples)
- [Node Version Support](#node-version-support)
Expand All @@ -34,14 +35,18 @@ Minimal GraphQL client supporting Node and browsers for scripts or simple apps
- [Pure ESM package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)
- First class TypeScript support
- Including `TypedDocumentNode`
- Isomorphic (works in both Nodejs and Browsers)
- Isomorphic (works in both Node and Browsers)

## Install

```sh
npm add graphql-request graphql
```

#### TypeScript Setup

This package uses [`package.exports`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports). Therefore if you are a TypeScript user you must also have your `tsconfig.json` `moduleResolution` set to [`bundler`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#bundler) or [`node16`/`nodenext`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#node16-nodenext-1).

## Quick Start

Send a GraphQL document using a static request function:
Expand Down

0 comments on commit db4db92

Please sign in to comment.