Trocki describes how backend latency and failures create loading states and other challenges in mobile apps. He says unreliable backends were identified as a cause of cross-platform project failures in a 2016 Gartner survey, and uses custom APIs as an example of integration work that varies from project to project.
Building Reactive React Native apps with GraphQL
Speaker
Wojciech Trocki, a Red Hat technologist working on React Native and GraphQL, explains data-driven mobile app patterns at the React Native Wrocław Meetup #2, hosted by Callstack.
Trocki presents client-side GraphQL as a way to add typed queries and resolvers without rebuilding the server. Apollo Link REST can route a GraphQL query to a REST endpoint; local resolvers offer more control over formatting and can work with app state, REST, or the cache.
GraphQL clients use normalized caches to map returned data into entities that can be reused across views. Fetch policies control when the client reads from cache or requests the network, while optimistic responses let the UI render expected data before the server responds. Apollo watch queries can observe cache changes and update components as mutations, polling, or subscriptions refill the cache.
Trocki describes GraphQL CLI and Graphback as tools for generating typed code and CRUD queries from data models. The generated queries and server can be connected to a React Native client and a Node backend, reducing repeated setup so teams can focus on business logic. Schemas can also support generated forms and deployment templates.
For more advanced setups, Trocki discusses GraphQL subscriptions and delta queries. Subscriptions provide real-time updates but typically need a reactive backend; Graphback can generate subscriptions that filter updates for specific entities. Delta queries combine with pagination to retrieve changes for entities currently in view while limiting data transfer.
Takeaways
- Use client-side GraphQL to bring typed queries and cache patterns to existing REST APIs.
- Choose fetch policies deliberately to balance cache reads and network requests.
- Use optimistic responses when the client can predict the result of a mutation.
- Generate repetitive CRUD queries from data models to reduce boilerplate.
- Use subscriptions for live updates and delta queries to fetch changes efficiently across paginated data.
Mentioned in this talk
Search inside this talk
What was claimed 9
- integrates withApollo Link REST integrates with REST
“you can use Apollo Link REST”
YouTube Unverified1 source· Talk
- featureApollo GraphQL client: Supports local resolvers, normalized caching, fetch policies, optimistic responses, and reactive watch queries.
“The Apollo Client can monitor your local cache”
YouTube Unverified1 source· Talk
- featureApollo Effects: Supports offline changes, conflict resolution, automatic cache updates, and deduplication.
“It allows us to make offline changes”
YouTube Unverified1 source· Talk
- integrates withApollo Effects integrates with Apollo GraphQL client
“This client literally extends Apollo”
YouTube Unverified1 source· Talk
- featureGraphQL CLI: Provides subcommands for GraphQL development, including client and server source code generation.
“focusing mostly on source code generation for both client and server”
YouTube Unverified1 source· Talk
- uses
“Deeply embedded in GraphQL CLI is a project called Graphback”
YouTube Unverified1 source· Talk
- featureGraphback: Generates CRUD-specific queries from data models.
“generating CRUD-specific queries”
YouTube Unverified1 source· Talk
- featuresubscriptions: Can provide real-time updates to clients when the server creates subscriptions.
“We can get real-time updates to our clients”
YouTube Unverified1 source· Talk
- featureDelta queries: Retrieve changes to specific entities while they are being viewed, with pagination to reduce data transfer.
“minimize the amount of data you're sending back and forth”
YouTube Unverified1 source· Talk






