# Pride in Your App - Trying Out GraphQL on Android

DevFeed: [Pride in Your App - Trying Out GraphQL on Android](<https://devfeed.tech/articles/pride-in-your-app-trying-out-graphql-on-android-38483.md>)

Original publisher: [Read original article](<https://eevis.codes/blog/2024-06-14/pride-in-your-app-trying-out-graphql-on-android/>)

Author: Eevis Panula

Published: 2024-06-14T02:56:13.731000Z

Content type: tutorial

Language: en

Sources: [Eevis Blog](<https://devfeed.tech/sources/eevis-blog.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Android](<https://devfeed.tech/topics/android.md>), [API](<https://devfeed.tech/topics/api.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>), [WebSocket](<https://devfeed.tech/topics/websocket.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>)

## AI overview

A tutorial exploring GraphQL integration on Android, using a Pride Flag API and Apollo Kotlin. It explains how GraphQL queries differ from REST APIs and introduces the dependencies and schema needed to begin.

## Source excerpt

It's Pride month, y'all! As someone who is part of the LGBTIQA+ community, this month is both great and stressful at the same time. You never know what some people come up with - somehow, this month draws some really nasty people out. And with the rise of far-right in Europe... I'm not even going to get started. I have wanted to try out GraphQL with Android for quite a while, and when I came across this Pride Flag API, I thought that now was the time. What a great way to celebrate Pride by trying out the API (and GraphQL) and writing a blog post about it! A bit of background about me and GraphQL: I started my public speaking career talking about GraphQL (and JavaScript. That's my dark secret.). It was fun, and I liked it a lot. Of course, there are always pros and cons when thinking about using any technology, but nevertheless, I liked it a lot. I even got this "Ask me about GraphQL" T-shirt from one meetup, and that was probably the coolest t-shirt I've gotten. When I switched to Android, there were no use cases for me to learn how to integrate GraphQL with Android. So, I've wanted to try it for a while now, and I'm glad I found a great way to test it. Let's get started! GraphQL If you've never heard the word GraphQL, it's a query language and an alternative way of building APIs in the form of graphs - hence the name. GraphQL APIs let you ask for what you need - and only that. So, compared to REST APIs, which always return everything, GraphQL APIs return only the values you've asked for. And as it's graph-based, you can get nested data with one query. An example would be authors, their books, and the characters in the books - with REST API, you'd need to make three requests (depending on the API, naturally). GraphQL offers three actions: querying, mutating, or subscribing to data. Compared to REST, querying matches the GET requests, mutating matches all the others that mutate data, and subscribing is a two-way street - like, for example, WebSockets. In the context