Overview
The normalize package provides utilities for normalizing and denormalizing GraphQL responses in Dart, enabling efficient data management and cache coherence. It is designed to work seamlessly with the Ferry GraphQL client, transforming nested GraphQL data into a flat, normalized structure that avoids duplication and simplifies state updates. This improves performance and consistency when handling complex queries and mutations. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux.
Use cases
- Caching GraphQL query results
- Managing nested data structures
- Improving state update efficiency
- Synchronizing client-side state with server responses
- Optimizing performance in large-scale apps
Key features
- Flat data normalization
- Automatic deduplication of entities
- Support for GraphQL object relationships
- Integration with Ferry client
- Cross-platform compatibility
Suitable for
- GraphQL clients using Ferry
- Apps with complex nested data
- Developers prioritizing cache performance
- State management with normalized data
- Full-stack Dart/Flutter applications
Considerations
- Requires familiarity with GraphQL data structures
- Best used with Ferry or similar clients
- May increase initial setup complexity
- Limited to GraphQL-specific use cases
- Not suitable for non-GraphQL data formats