This project demonstrates a typescript compilation issue that occurs when compiling types generated by apollo client:codegen
when the following are true:
- Typescript compiler is version 3.7 or above
- The named mutation matches the called mutation (see
UpdateBookMutation.ts
)
Apollo should be installed globally.
yarn global add apollo
cd server
yarn
yarn start
cd client
yarn
yarn gql:gen
yarn build
<- this is where error occurs
The exact error message is:
error TS2440: Import declaration conflicts with local declaration of 'UpdateBook'.