Closed Achudh closed 2 years ago
Please try and fixate the version of graphql by adding the graphql: 5.0.0 to your dependencies
l: 5.0.0 t
No it didn't work
Please ensure that you've ran pub get after the change.
Can you share your pubspec.yaml and pubspec.lock files, please
Please ensure that you've ran pub get after the change.
Can you share your pubspec.yaml and pubspec.lock files, please
Yes I've done what you said but still.
I only see graphql_flutter in your dependencies. Please add graphql: 5.0.0
@budde377 It worked. Thank you so much!
now my pubspec looks like
graphql: 5.0.0
graphql_flutter: 5.0.0
fixated versions instead of auto fetching new versions
Please try and fixate the version of graphql by adding the graphql: 5.0.0 to your dependencies
I am facing the same issue in my app. Tried fixating the version of graphql package.It didn't work in my case.
Can anyone help me finding a solution to this?
Please try and fixate the version of graphql by adding the graphql: 5.0.0 to your dependencies
I am facing the same issue in my app. Tried fixating the version of graphql package.It didn't work in my case.
Can anyone help me finding a solution to this?
Can you please put your pubspec and pubspec.yml?
Please try and fixate the version of graphql by adding the graphql: 5.0.0 to your dependencies
I am facing the same issue in my app. Tried fixating the version of graphql package.It didn't work in my case. Can anyone help me finding a solution to this?
Can you please put your pubspec and pubspec.yml?
I can share snapshot from files.
pubspec.yaml File Snapshot
pubspec.lock file snapshot
gql: dependency: "direct main" description: name: gql url: "https://pub.dartlang.org" source: hosted version: "0.13.0" gql_dedupe_link: dependency: transitive description: name: gql_dedupe_link url: "https://pub.dartlang.org" source: hosted version: "2.0.0" gql_error_link: dependency: transitive description: name: gql_error_link url: "https://pub.dartlang.org" source: hosted version: "0.2.0" gql_exec: dependency: transitive description: name: gql_exec url: "https://pub.dartlang.org" source: hosted version: "0.3.0" gql_http_link: dependency: transitive description: name: gql_http_link url: "https://pub.dartlang.org" source: hosted version: "0.4.0" gql_link: dependency: transitive description: name: gql_link url: "https://pub.dartlang.org" source: hosted version: "0.4.0" gql_transform_link: dependency: transitive description: name: gql_transform_link url: "https://pub.dartlang.org" source: hosted version: "0.2.0" graphql: dependency: "direct main" description: name: graphql url: "https://pub.dartlang.org" source: hosted version: "5.0.1-beta.6" graphql_flutter: dependency: "direct main" description: name: graphql_flutter url: "https://pub.dartlang.org" source: hosted version: "5.0.0"
Fixating Version raises issues with rxdart package, so fixating didn't work.
remove ^ and use only 5.0.0
remove ^ and use only 5.0.0
Tried that, but It gives error like this
Running "flutter pub get" in myapp... Because graphql >=4.0.3-alpha.1 <5.0.1-beta.1 depends on rxdart ^0.26.0 and myapp depends on rxdart ^0.27.3, graphql >=4.0.3-alpha.1 <5.0.1-beta.1 is forbidden. So, because myapp depends on graphql 5.0.0, version solving failed. pub get failed (1; So, because myapp depends on graphql 5.0.0, version solving failed.) Process finished with exit code 1
The point is that the versions need to be in sync. You can also try and use the latest beta version for both packages.
The point is that the versions need to be in sync. You can also try and use the latest beta version for both packages.
Okay, I will try that way.
Thank You!
@vincenzopalazzo i know we want to separate the versions of the packages, but until then, it might make sense to force them in sync. I.e. set the dependencies to exact versions between the packages.
I have faced this issue for a few days. I think this is appear to M1 Mac. The version 5.0.1-beta.6 catch the problem! It work for me
Describe the issue initialData: observableQuery?.latestResult ?? QueryResult.loading(), in does not have Required named parameter 'parserFn' must be provided
To Reproduce (MUST BE PROVIDED)
To help us to understand what is going on and what is the easy way to resolve this bug we ask to describe the issue with a small code example, or if the problem is easy you can describe the issue as follows:
Expected behavior Should build apk
device / execution context MacOS Monterey on m1 mac mini, Build agent - MacOS Monterey on m1 mac mini
Other useful/optional fields
Please fill or delete these sections if you don't fill them in
Stacktrace:
[+8803 ms] > Task :app:compileFlutterBuildRelease [ +9 ms] /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-5.0.0/lib/src/widgets/query.dart:79:72: Error: Required named parameter 'parserFn' must be provided. [ +9 ms] initialData: observableQuery?.latestResult ?? QueryResult.loading(), [ ] ^ [ ] /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/hosted/pub.dartlang.org/graphql-5.0.1-beta.6/lib/src/core/query_result.dart:58:11: Context: Found this candidate, but the arguments don't match. [ +2 ms] factory QueryResult.loading({ [ ] ^^^^^^^ [ ] /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-5.0.0/lib/src/widgets/subscription.dart:166:35: Error: Required named parameter 'parserFn' must be provided. [ ] ? QueryResult.optimistic( [ ] ^ [ ] /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/hosted/pub.dartlang.org/graphql-5.0.1-beta.6/lib/src/core/query_result.dart:68:11: Context: Found this candidate, but the arguments don't match. [ ] factory QueryResult.optimistic({ [ ] ^^^^^^^^^^ [ ] /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-5.0.0/lib/src/widgets/subscription.dart:169:32: Error: Required named parameter 'parserFn' must be provided. [ ] : QueryResult.loading(), [ ] ^ [ ] /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/hosted/pub.dartlang.org/graphql-5.0.1-beta.6/lib/src/core/query_result.dart:58:11: Context: Found this candidate, but the arguments don't match. [ ] factory QueryResult.loading({ [ ] ^^^^^^^ [+7043 ms] > Task :app:compileFlutterBuildRelease FAILED [ ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. [ ] Use '--warning-mode all' to show the individual deprecation warnings. [ ] See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings [ ] 1 actionable task: 1 executed [ ] FAILURE: Build failed with an exception. [ ] * Where: [ ] Script '/opt/homebrew/Caskroom/flutter/2.8.0/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1070 [ ] * What went wrong: [ ] Execution failed for task ':app:compileFlutterBuildRelease'. [ ] > Process 'command '/opt/homebrew/Caskroom/flutter/2.8.0/flutter/bin/flutter'' finished with non-zero exit value 1 [ ] * Try: [ ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. [ ] * Get more help at https://help.gradle.org [ ] BUILD FAILED in 15s [ +438 ms] Running Gradle task 'assembleRelease'... (completed in 16.6s) [ +19 ms] "flutter apk" took 18,348ms. [ +6 ms] Gradle task assembleRelease failed with exit code 1 [ ] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 AndroidGradleBuilder.buildGradleApp (package:flutter_tools/src/android/gradle.dart:400:9)
#2 AndroidGradleBuilder.buildApk (package:flutter_tools/src/android/gradle.dart:179:5)
#3 BuildApkCommand.runCommand (package:flutter_tools/src/commands/build_apk.dart:108:5)
#4 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1140:27)
#5 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#6 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
#7 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
#8 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#9 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
#10 run.. (package:flutter_tools/runner.dart:62:9)
#11 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#12 main (package:flutter_tools/executable.dart:94:3)
```dart ```screenshots
additional context
additional notes Did you struggle to understand the docs or examples, or dislike the current api?
If you want to troubleshoot or discuss in real time, consider coming to the
support
channel in the discord