graphql-request
graphql-request copied to clipboard
Re-export FetchError type
GraphQLClient.request may throw a FetchError from node-fetch.
In order to nicely catch this type in typescript, the fetch error type is needed.
This type is inaccessible through graphql-request, so separately adding node-fetch to the dependencies just to import the Error type is required (or alternatively copy-pasting the error type definition into the project)
This isn't good usability, so i believe graphql-request typedefinitions should re-export the FetchError type.
Thanks