apollographql / apollo-kotlin

:robot:  A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.
https://www.apollographql.com/docs/kotlin
MIT License
3.69k stars 651 forks source link

Suspense #5914

Open sonatard opened 1 month ago

sonatard commented 1 month ago

Use case

Suspense lets you display a fallback until its children have finished loading.

React docs https://ja.react.dev/reference/react/Suspense

Jetpack Compose implementation https://docs.soil-kt.com/guide/query/hello-query#step-4-compose-runtime

Describe the solution you'd like

There is no need to implement loading in individual components.

Reference

I created this issue to Jetpack Compose. https://issuetracker.google.com/issues/342228901

bignimbus commented 1 month ago

Thanks for opening this! Suspense is a concept that's been well received by the React community and Apollo Client users, so we're definitely interested in tracking what this feature could look like in Apollo Kotlin and Compose.