-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: accept DocumentNode input (#183)
closes #176 Example: ```ts import gql from 'graphql-tag' await request('https://foo.bar/graphql', gql`...`) ``` If you don't actually care about using DocumentNode but just want the tooling support for gql template tag like IDE syntax coloring and prettier autoformat then note you can use the passthrough gql tag shipped with graphql-request to save a bit of performance and not have to install another dep into your project. ```ts import { gql } from 'graphql-request' await request('https://foo.bar/graphql', gql`...`) ``` BREAKING CHANGE: `graphql-request` now requires `graphql` version 14.x or 15.x as a peer dependency. `graphql-request` uses a TypeScript type from the `graphql` package such that if you are using TypeScript to build your project and you are using `graphql-request` but don't have `graphql` installed TypeScript build will fail. Details [here](#183 (comment)). If you are a JS user then you do not technically need to install `graphql`. However if you use an IDE that picks up TS types even for JS (like VSCode) then its still in your interest to install `graphql` so that you can benefit from enhanced type safety during development.
- Loading branch information
Jason Kuhrt
authored
Aug 3, 2020
1 parent
3f51dab
commit e757927
Showing
7 changed files
with
231 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.