You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for a simple graphql client library and chose this one, and tried to use it in my typescript project. But even before I was able to setup the client instance, several problems stopped me.
All the interfaces are hidden (not exported), so I couldn't use them to declare types of my variables
As far as I understood by looking into the source code, not all properties in the interceptor objects are required, but the interface FetchQLInterceptor requires them all
The return types of the methods in the intercepter objects seem very odd; return Promise.reject(error) in the requestError does not work, even though the README has it as an example
There are some typos, like reueqstError in the interceptor or rejedct in the returned object of FetchQL instance methods (and now I realize they should return promises, I guess?)
If someone else can handle this then it is fine, but maybe I can fix some of the issues if that is needed. But I'm not sure if I will understand all underlying things going on in the source code. I also suggest adding typescript as a dev dependency and then testing if the type declarations enable users to successfully compile. Should I start working on this tomorrow? (It's late at night here so I need to go to bed)
The text was updated successfully, but these errors were encountered:
I was looking for a simple graphql client library and chose this one, and tried to use it in my typescript project. But even before I was able to setup the client instance, several problems stopped me.
return Promise.reject(error)
in therequestError
does not work, even though theREADME
has it as an examplereueqstError
in the interceptor orrejedct
in the returned object of FetchQL instance methods (and now I realize they should return promises, I guess?)If someone else can handle this then it is fine, but maybe I can fix some of the issues if that is needed. But I'm not sure if I will understand all underlying things going on in the source code. I also suggest adding typescript as a dev dependency and then testing if the type declarations enable users to successfully compile. Should I start working on this tomorrow? (It's late at night here so I need to go to bed)
The text was updated successfully, but these errors were encountered: