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 think the way client is being initialized by mutating global variable inside the library is bad and confusing, and will eventually bite someone. I recently, out of habit of making everything final, made the client final and wasted time figuring out what was wrong.
Proposed Solution
Let users create their own client and add methods like query and mutation in it like Apollo Client does. Also let the user specify token in the constructor itself instead of setting it later.
The text was updated successfully, but these errors were encountered:
Problem
I think the way client is being initialized by mutating global variable inside the library is bad and confusing, and will eventually bite someone. I recently, out of habit of making everything final, made the client final and wasted time figuring out what was wrong.
Proposed Solution
Let users create their own client and add methods like query and mutation in it like Apollo Client does. Also let the user specify token in the constructor itself instead of setting it later.
The text was updated successfully, but these errors were encountered: