Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a custom ApolloResponse.toString() #5872

Open
rohandhruva opened this issue May 1, 2024 · 1 comment
Open

Introduce a custom ApolloResponse.toString() #5872

rohandhruva opened this issue May 1, 2024 · 1 comment

Comments

@rohandhruva
Copy link
Contributor

Use case

Since ApolloResponse changed to being a standard class (I think it used to be a data class?), the toString() now is not very useful because it prints the default hashcode / instance code based toString.

Can we introduce a custom toString for ApolloResponse? While printing all of data does not make sense, I'm trying to think what might be useful -- perhaps the cache key?

Describe the solution you'd like

No response

@martinbonnin
Copy link
Contributor

martinbonnin commented May 1, 2024

Agreed. This is also recommended by the Kotlin API guidelines. While I wouldn't put toString() on each and every class, ApolloResponse is central enough that it deserves one.

PS: cache key won't be possible because caching belongs to another module (apollo-normalized-cache vs apollo-runtime)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants