Skip to main content
added 386 characters in body
Source Link
Sumchans
  • 3.8k
  • 8
  • 37
  • 80

I am not sure if I understand this error at all. Anyone with experience using graphql_flutter package please help out. Totally new to Flutter and graphql. But so far I have figured the backend.

My mutation works in graphiql, trying to make it work in flutter. This is error that shows up when I hover over those red lines.

ERROR - The argument type 'Column Function(MultiSourceResult Function(Map<String, dynamic>, {Object? optimisticResult}), QueryResult)' can't be assigned to the parameter type 'Widget Function(MultiSourceResult Function(Map<String, dynamic>, {Object? optimisticResult}), QueryResult?)'. (Documentation)

Here is the snip - enter image description here

class GraphQlMutations {

  String createUser() { return"""
    mutation createUser(\$id: String!, \$name: String!, \$email: String!) {
      createUser(objects: [{ id: $id, name: $name, code: $code }]) {
        returning {
          id
          name
          email
        }
      }
    }
  """;
  } 
}

I am not sure if I understand this error at all. Anyone with experience using graphql_flutter package please help out. Totally new to Flutter and graphql. But so far I have figured the backend.

My mutation works in graphiql, trying to make it work in flutter. This is error that shows up when I hover over those red lines.

ERROR - The argument type 'Column Function(MultiSourceResult Function(Map<String, dynamic>, {Object? optimisticResult}), QueryResult)' can't be assigned to the parameter type 'Widget Function(MultiSourceResult Function(Map<String, dynamic>, {Object? optimisticResult}), QueryResult?)'. (Documentation)

Here is the snip - enter image description here

I am not sure if I understand this error at all. Anyone with experience using graphql_flutter package please help out. Totally new to Flutter and graphql. But so far I have figured the backend.

My mutation works in graphiql, trying to make it work in flutter. This is error that shows up when I hover over those red lines.

ERROR - The argument type 'Column Function(MultiSourceResult Function(Map<String, dynamic>, {Object? optimisticResult}), QueryResult)' can't be assigned to the parameter type 'Widget Function(MultiSourceResult Function(Map<String, dynamic>, {Object? optimisticResult}), QueryResult?)'. (Documentation)

Here is the snip - enter image description here

class GraphQlMutations {

  String createUser() { return"""
    mutation createUser(\$id: String!, \$name: String!, \$email: String!) {
      createUser(objects: [{ id: $id, name: $name, code: $code }]) {
        returning {
          id
          name
          email
        }
      }
    }
  """;
  } 
}
Source Link
Sumchans
  • 3.8k
  • 8
  • 37
  • 80

graphql_flutter mutation widget shows error -

I am not sure if I understand this error at all. Anyone with experience using graphql_flutter package please help out. Totally new to Flutter and graphql. But so far I have figured the backend.

My mutation works in graphiql, trying to make it work in flutter. This is error that shows up when I hover over those red lines.

ERROR - The argument type 'Column Function(MultiSourceResult Function(Map<String, dynamic>, {Object? optimisticResult}), QueryResult)' can't be assigned to the parameter type 'Widget Function(MultiSourceResult Function(Map<String, dynamic>, {Object? optimisticResult}), QueryResult?)'. (Documentation)

Here is the snip - enter image description here