Questions tagged [graphql-flutter]
33 questions
1
vote
0 answers
Good use of refetch for ListView with graphql_flutter
This is my query
Query(
options: QueryOptions(
document: gql(query),
variables: {
'startIndex': startIndex,
'endIndex': startIndex + 50
},
…

Ritwik Reddy
- 11
- 1
1
vote
1 answer
unable to use both useFuture() and useValueChanged() in same HookWidget
I have a hook widget with useValueChanged listener as follows:
useValueChanged(selectedLayout.value, (_, __) {
changeLayout(selectedLayout.value);
});
and changeLayout(..) uses useFuture(..) to make a graphql mutation call and return…

Shanthakumar
- 757
- 6
- 23
0
votes
0 answers
how to test the GraphQL subscription with flutter
I have this endpoint for graphql api:
http://localhost:2000/graphql
when I try this on the playground, its works:
mutation {
createMessage(messageInput: {text: "noti", username: "osama alatraqchi"}) {
text, createdBy
}
}
and run…

Osama Mohammed
- 2,433
- 13
- 29
- 61
0
votes
0 answers
graphql_flutter OnCompleted method runs multiple times
Does anybody know why the OnCompleted method runs multiple times after the mutation is complete? Below is the code thats copied over from the description section of the graphql_flutter package. I have the similar setup in my code and I do see the…

Sumchans
- 3,088
- 6
- 32
- 59
0
votes
1 answer
graphql query throws expected argument name exception in flutter
What could be wrong in the below query, I get an Expected argument name error when I execute the query inside of Flutter. I tried another query which does not take any arguments which worked but not this one. Here is the post that I created in…

Sumchans
- 3,088
- 6
- 32
- 59
0
votes
1 answer
graphql_flutter - query fails saying expected a selection set starting with '{'
I am testing out a graphql query in flutter using the graphql_flutter package.
Below is my code executing the query -
final phoneNumbers = ["4160000000", "7780000000"];
final filters = phoneNumbers.map((phoneNumber) => phoneNumber).toList();
…

Sumchans
- 3,088
- 6
- 32
- 59
0
votes
0 answers
How can I do Http-only cookie based authentication using flutter?
I am currently using graphql_flutter: ^5.1.2 for fetching Api. On the host server it use http only cookie based authentication with GraphqQL.
So How can I setup http-only cookie based authentication on my flutter project ?

Jocalo
- 1
0
votes
0 answers
Cannot catch HttpLinkServerException error on graphql_flutter request
so I was trying to see how to handle the possibility of my server being down for whatever reason, and I keep getting HTTPLinkServerException without being able to handle it with a try/catch block.
After seing the answer here try catch on…

axelrogg
- 15
- 5
0
votes
1 answer
How to query data from `PostgresSql`?
I use NestJj,PostgreSQL and Graphql for Back-End,
Flutter,graphql_flutter for Front End.
I have a collection store like this :
I want to get the following result:
[
{
type:'A',
details:[
{name:'Food1'}
]
…

Roeurb Navy
- 71
- 1
- 9
0
votes
1 answer
how to catch parsedResponse in linkException?
In the above error, I tried to get the parsedResponse and add handling for the statusCode, but I couldn't catch the error.
The linkException doesn't seem to recognize the parsedResponse. If you know a solution, please let me know.
thank you
Below…

raonlast
- 1
0
votes
0 answers
uploading images server using graphql apis
i want to upload my images to the sever from flutter web, which is using graphql api. i am able to show the images on the web but unable to upload images to the server.
static Future multipartApi(File file)async {
…

Aqeel Mughal
- 2,105
- 2
- 6
- 14
0
votes
0 answers
What solution is available for graphql_flutter production bug
I have integrated graphql_flutter version ^5.0.0 in my mobile project for my queries in particular. Everything works fine when I test on my dev environment (emulators) but not on a real device. Please, how will I solve this problem? I recently…
0
votes
0 answers
The filter value for "_lt" is not a valid number
I don't know why the variables are not valid numbers. I use flutter with graphql_flutter plugin.
Somehow I get this error message:
The query:
The generated API classes:
The "service" function:
Function in repo:
The function call:

B0r1
- 400
- 3
- 15
0
votes
1 answer
graphql-flutter subscriptions in flutter connectivity issue
I am new to flutter development but I have good experience in nodejs and graphql. I am trying to consume the subscription widget of graphql-flutter and update the changes. but the connection is not being established. But I could use the query and…
0
votes
2 answers
Graphql returning typename error for mutation with set of key-value pairs
We have a graphql server set up for our Flutter app. One of our mutation calls from the app to the server is returning a validation error for the field __typename, which in fact is a field that the graphql client adds automatically in the background…

Camron
- 503
- 5
- 19