graphql_infra_tool 1.0.1
graphql_infra_tool: ^1.0.1 copied to clipboard
A comprehensive Flutter package providing a robust wrapper around GraphQL operations with built-in error handling, authentication, caching, and logging capabilities.
1.0.0 #
- Initial version.
1.0.1 #
Added #
- New unified
execute<T>()
method for all GraphQL operations - New unified
executeList<T>()
method for list operations OperationType
enum to specify query, mutation, or subscription
Improved #
- Reduced code duplication
- Better consistency across operations
Breaking Changes #
query<T>()
method - useexecute<T>()
withOperationType.query
mutate<T>()
method - useexecute<T>()
withOperationType.mutation
queryList<T>()
method - useexecuteList<T>()
withOperationType.query
mutateList<T>()
method - useexecuteList<T>()
withOperationType.mutation
Migration Guide #
// Before (still works but deprecated)
final user = await client.query<User>(...);
// After (recommended)
final user = await client.execute<User>(
operation: getUserQuery,
operationType: OperationType.query,
variables: {'id': '123'},
modelParser: (json) => User.fromJson(json),
);