DEV Community

loading...

Learnt it the hard way

vjnvisakh profile image Visakh Vijayan ・1 min read

So am on this quest to learn how to use graphql with flutter. And even the library says it's pretty straight forward to implement it, I ran into a strange issue recently.

Problem

The strange thing is that while using the debug apk, graphql works nicely. Once I make a build it stops working.

After a lot of time spent :'( I saw that the APIs are not being hit. Thank you Heroku for the application logs. A

Solution

Apparently you have to add the INTERNET permission in the AndroidManifest.xml file under app/src/main. So if anyone is facing the same issue just add this line in the file

<uses-permission android:name="android.permission.INTERNET"/>

P.S. It's strange REST never threw this error.

Strange.

Discussion (3)

pic
Editor guide
Collapse
itsjzt profile image
Saurabh Sharma

this it so common issue with android stuff. Especially when learning it

Collapse
vjnvisakh profile image
Visakh Vijayan Author

True ... I was wondering why this didn't come up while using REST

Collapse
itsjzt profile image
Saurabh Sharma

It comes in REST too unless you have already asked for the permission