aya-eiya / ts-sample-todo-app

TypeScript開発の練習
0 stars 0 forks source link

@graphql-codegen/typescript-graphql-request does not support the latest version. #1

Open aya-eiya opened 3 years ago

aya-eiya commented 3 years ago

Overview

import { HeadersInit } from 'graphql-request/dist/types.dom';
         ^^^^^^^^^^

build error, since HeadersInit is not exported.

Workaround

to use latest typescript-graphql-request, import Headers instead of HeadersInit.

- import { HeadersInit } from 'graphql-request/dist/types.dom';
+ import { Headers } from 'graphql-request/dist/types.dom';
// also replace the lines it is used.

Link

Module repository: https://github.com/dotansimha/graphql-code-generator

Related Issues: https://github.com/dotansimha/graphql-code-generator/issues/5459

aya-eiya commented 3 years ago

it seems to be fixed. https://github.com/dotansimha/graphql-code-generator/pull/5467