opened 01:01AM - 18 Dec 20 UTC
closed 03:58PM - 27 Dec 20 UTC
v4
Whenever I try to post a mutation via the library I get the error message
"**_t…ypename was not executed because no suitable resolver could be found - this indicates a resolver or validation bug. Please let us know by filing an issue.**"
I minimized my code for a suitable test example:
<details>
<summary>code example</summary>
```
class APIClient {
String token = 'XXXXXX';
GraphQLClient graphQLClient() {
final HttpLink _httpLink = HttpLink('http://192.168.178.35:8080/graphql');
final AuthLink _authLink = AuthLink(getToken: () async => 'Bearer $token');
final Link _link = _authLink.concat(_httpLink);
final Policies _policies = Policies(
fetch: FetchPolicy.networkOnly,
);
return GraphQLClient(
link: _link,
cache: GraphQLCache(),
defaultPolicies: DefaultPolicies(
watchQuery: _policies,
query: _policies,
mutate: _policies,
),
);
}
}
const String mtAddTest = r'''
mutation addDance($input: [AddTestInput!]!) {
addTest(input: $input) {
test {
name
}
}
}
''';
void test() async {
final MutationOptions options = MutationOptions(
document: gql(mtAddTest),
variables: <String, dynamic>{
"input": [
{"name": "temp"}
]
},
);
QueryResult result = await APIClient().graphQLClient().mutate(options);
if (result.hasException) {
print(result.exception.toString());
}
}
```
</details>
At first I thought the db at fault, as subscriptions were still working (not in the code example, for simplicity reasons), but then I completely started from scratch.
Here my db schema for dgraph if that matters.
```
type Test {
name: String!
}
```
In the meantime I can execute the mutation via insomnia quite fine.
I work with the library graphql: ^4.0.0-beta.5 but also tried ^4.0.0-beta.2 for testing sake. It was all the same.
The server is run locally and accessed over the local ip address.
Also Flutter is run on the same computer using an emulator.
<details>
<summary>flutter doctor -v</summary>
```
[flutter] flutter doctor -v
[✓] Flutter (Channel stable, 1.22.4, on Linux, locale en_US.UTF-8)
• Flutter version 1.22.4 at /opt/flutter
• Framework revision 1aafb3a8b9 (5 weeks ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at /home/owner/Android/Sdk
• Platform android-30, build-tools 30.0.0
• ANDROID_HOME = /home/owner/Android/Sdk
• Java binary at: /opt/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Android Studio (version 4.0)
• Android Studio at /opt/android-studio
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
```
</details>
If someone has the same issues, or has some input for me that would be great,
as I am reaching for straws.