Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription will not work with Stream, return type is changed as future. How can we implement in new version with flutter. #116

Open
ramsmart-inno opened this issue Sep 21, 2022 · 3 comments

Comments

@ramsmart-inno
Copy link

No description provided.

@Bwolfs2
Copy link
Contributor

Bwolfs2 commented Sep 21, 2022

              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"]) ?? [];
    });```

@ramsmart-inno
Copy link
Author

ramsmart-inno commented Sep 23, 2022

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

@Bwolfs2
Copy link
Contributor

Bwolfs2 commented Sep 26, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants