Questions tagged [flutter-graphql]

37 questions
5
votes
1 answer

Flutter GraphQL - OperationException(linkException: ResponseFormatException(originalException: FormatException: Unexpected character (at character 1)

I am getting this error while using mutate method of graphql_flutter package. Tried with following versions of qraphql_flutter package: 5.0.1-beta.1 5.0.0 4.0.0-beta.5 Error: I/flutter (13946): //// EXCEPTION: OperationException(linkException:…
Milan Surelia
  • 884
  • 1
  • 8
  • 18
5
votes
3 answers

Unable to retrieve errors occured in Graphql mutation in flutter project

I am using the package graphql_flutter for GraphQL operations in my flutter app. The queries and mutations are going well but I cannot retrieve the errors by following the ways mentioned in their doc. Every time I receive a generic error message…
Anik
  • 2,692
  • 2
  • 22
  • 25
4
votes
0 answers

How to implement GraphQL client that uses multiple endpoints using graphql_flutter package?

So I want to implement my GraphQL client so it can use multiple endpoints using graphql_flutter package. I somehow made it work by passing operationName parameter in QueryOptions of Query widget Query( options: …
Karlo123
  • 41
  • 2
4
votes
3 answers

Flutter GraphQl client cache

I am using Flutter graphql_client which implemented pretty much as in this example My client creation looks like this: abstract class AbstractAdapter { Link get httpLink; GraphQLClient client; AbstractAdapter() { client =…
Moti Bartov
  • 3,454
  • 33
  • 42
3
votes
1 answer

Flutter graphql show actual request

I'm using flutter_graphql and keep getting exception OperationException(linkException: ResponseFormatException(originalException: FormatException: Unexpected end of input (at character 1), )^ graphqlErrors: []), Is there a way to show the actual…
VDTe
  • 438
  • 1
  • 4
  • 17
3
votes
1 answer

Flutter: graphql_flutter FetchPolicy.noCache returns cached data from different user

I'm using the graphql_flutter package and am having an issue with what seems to be caching. The client passes over cached data from one user to another, even when the FetchPolicy is set to noCache. I’ve outlined below what my graphql client setup…
Camron
  • 503
  • 5
  • 19
3
votes
2 answers

Flutter Test Mock GraphQL Mutation result

I'm trying to create widget tests for a flutter application using GraphQL. What I want to do is to test the behaviour of the app which depends on the result of a GraphQL Mutation on a user action. This is a very simple example of the app: class…
Valentin Vignal
  • 6,151
  • 2
  • 33
  • 73
3
votes
0 answers

Flutter httpOnly cookie based authentication

I am using flutter_graphql and they have good documentation on how to handle AuthLink but it doesn't fit all kinds of authentication methods. for example when using an api which store httpPnly cookie, the cookie does not get stored and even not…
Raji Hawa
  • 156
  • 1
  • 6
2
votes
0 answers

Flutter graphql cache update works only once

static Future updateOrderStatus({required dynamic input, required String status, required String orderId, required String buyerId}) { final client = GraphqlClient.getGraphQlClient(); print(input); final MutationOptions…
Radhika Gokani
  • 158
  • 1
  • 10
2
votes
0 answers

Graphql_flutter runMutation's QueryResult is returning null, though the mutation is executing correctly

I'm using graphql_flutter 3.1.0 and have started the authentication for my app and am needing to set the user in my Provider state on successful creation. My mutation to CreateUser is currently: final String createUserMutation = """ mutation…
Matt Larsuma
  • 1,456
  • 4
  • 20
  • 52
2
votes
1 answer

How can I get "errors" from graphql-flutter

I want to get my sended errors from data.errors. I use "https://github.com/zino-app/graphql-flutter/tree/master/packages/graphql" to get my response. My response look like this: {data: {…}, status: 401, statusText: "OK", headers: {…}, config: {…},…
xxceonxx
  • 21
  • 3
1
vote
1 answer

Flutter Web: How to get XMLHttpRequest error details?

I'm working on a Flutter web application and I'm having problems handling low level errors properly. The application uses graphql-flutter, and it seems that any error is wrapped in a library OperationException. If you look closely, the exception…
1
vote
1 answer

Flutter OperationException(linkException: ResponseFormatException(originalException: FormatException: Unexpected end of input (at character 1)

Previously I was using graphql version 3.1.0 and it was working fine, able to receive request as expected, but recently I had to update my flutter version to 2.10.3 and all other packages, including graphql. Now I am using v.5.1.0 and I suddenly get…
VDTe
  • 438
  • 1
  • 4
  • 17
1
vote
0 answers

flutter-graphql : how to mock watchQuery

I am trying to add a stub to mock flutter-graphql watchQuery results to in a unit test but it seems complex because watchQuery returns an ObservableQuery which depends on QueryManager. ObservableQuery watchQuery(WatchQueryOptions options) { …
1
vote
1 answer

Flutter GraphQLError field requires type String, found String

I'm new in GraphQl in flutter and i would like to use this query which i implemented in Laravel: type Query { loginAccount(mobile_number:String @rules(apply:["required","min:11","max:11"]) ):ResponseResultWithMessage } type…
DolDurma
  • 15,753
  • 51
  • 198
  • 377
1
2 3