zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.25k stars 620 forks source link

bugfix/polling-type-mismatch #1071

Closed vasilich6107 closed 2 years ago

vasilich6107 commented 2 years ago

Hi @budde377 @vincenzopalazzo

I had some errors in console so I did this PR to help you with evolving the package

Fixes / Enhancements

If try to use pollInterval option you'll get the error in console

flutter: Caught error: type 'QueryResult<dynamic>' is not a subtype of type 'QueryResult<Tickets$Query>' of 'result'
flutter: #0      ObservableQuery.addResult (package:graphql/src/core/observable_query.dart)
#1      QueryManager.addQueryResult (package:graphql/src/core/query_manager.dart:393:23)
#2      QueryManager._resolveQueryOnNetwork (package:graphql/src/core/query_manager.dart:265:7)
<asynchronous suspension>
vasilich6107 commented 2 years ago

Sorry I have no time to continue with this PR. Will close it for now Created separate issue #1072