hasura_connect
hasura_connect copied to clipboard
Subscription will not work with Stream, return type is changed as future. How can we implement in new version with flutter.
subscription getProdutos {
produto {
id
nome
valor
tipo_produto {
descricao
}
categoria_produto {
descricao
}
}
}''';
var snapshot = await _hasuraConnect.subscription(query);
var stream = snapshot.map((data) {
return ProdutoModel.fromJsonList(data["data"]["produto"]) ?? [];
});```
How do integrate with the presentation layer? Have some confusion with the stream builder while in the presentation layer.
Could you help me with a simple example? @Bwolfs2
@ramsmart-inno https://github.com/Bwolfs2/loja_hasura