GraphQL API development for mobile app

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
GraphQL API development for mobile app
Complex
from 1 week to 3 months
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Developing GraphQL API for Mobile Application

GraphQL changes client-server interaction model: instead of fixed endpoints, client declares exactly what fields it needs and gets exactly them. For mobile this is especially valuable — product card screen requests only name, price, thumbnail, not pulling description, reviews, inventory as with REST. On slow connections the difference is noticeable.

When GraphQL Justified for Mobile

GraphQL adds complexity: server implementation (resolvers, schema, DataLoader), client library and team training needed. Justified scenarios:

  • Different clients (iOS, Android, Web) need to serve from one API, their data requirements diverge significantly
  • Actively changing UI — can add fields to request without server changes
  • Nested data with variable depth (social graph, catalog with categories)

For CRUD with predictable data structure, REST is simpler. GraphQL isn't a silver bullet.

Apollo Client on Android

Apollo Kotlin — de facto standard. Generates type-safe request classes from .graphql files at build time.

# app/src/main/graphql/GetProduct.graphql
query GetProduct($id: ID!) {
  product(id: $id) {
    id
    name
    price
    thumbnail {
      url
      width
      height
    }
  }
}
// auto-generated GetProductQuery.Data type
val response = apolloClient.query(GetProductQuery(id = productId)).execute()
val product = response.data?.product

apolloClient configured once with HttpEngine, auth headers and cache:

val apolloClient = ApolloClient.Builder()
    .serverUrl("https://api.example.com/graphql")
    .addHttpHeader("Authorization", "Bearer $token")
    .normalizedCache(MemoryCacheFactory(maxSizeBytes = 10 * 1024 * 1024))
    .build()

normalizedCache — normalized cache by id field. Product query from feed and detail page returns one object in memory — update in one place reflects everywhere automatically.

Apollo Client on iOS

Apollo iOS generates Swift code similarly to Kotlin.

let client = ApolloClient(
    networkTransport: RequestChainNetworkTransport(
        interceptorProvider: DefaultInterceptorProvider(store: store),
        endpointURL: URL(string: "https://api.example.com/graphql")!
    ),
    store: store
)

client.fetch(query: GetProductQuery(id: productId)) { result in
    switch result {
    case .success(let response):
        let product = response.data?.product
    case .failure(let error):
        print(error)
    }
}

Subscriptions for Real-time

GraphQL subscriptions — WebSocket channel for real-time updates. Perfect for chats, live price updates, order statuses:

subscription OnOrderStatusChanged($orderId: ID!) {
  orderStatusChanged(orderId: $orderId) {
    status
    updatedAt
  }
}

Apollo Kotlin supports subscriptions via WebSocketNetworkTransport:

apolloClient.subscription(OnOrderStatusChangedSubscription(orderId = id))
    .toFlow()
    .collect { response ->
        val status = response.data?.orderStatusChanged?.status
    }

Optimization: Persisted Queries

Each GraphQL query sends full query text in request body — overhead. Automatic Persisted Queries (APQ): client sends SHA256 hash, server returns data if knows hash, otherwise asks for full text. Apollo Client supports APQ out of box.

N+1 and DataLoader on Server

Classic GraphQL resolver problem: requesting 100 products triggers 100 separate SQL queries to load category for each. Solution — DataLoader (batch + cache): all category requests in one iteration batch into single SELECT ... WHERE id IN (...).

Without DataLoader, schema working fine on 10 objects degrades on 1000. Not client problem, but design at API development stage.

Error Handling

GraphQL returns HTTP 200 even on errors — errors in response body:

{
  "data": { "product": null },
  "errors": [{ "message": "Product not found", "extensions": { "code": "NOT_FOUND" } }]
}

Client must check errors array independent of HTTP status. Apollo Client provides GraphQLError list in response.errors.

What's Included

Design GraphQL schema for mobile requirements, implement resolvers with DataLoader, configure Apollo Client per platform with cache and subscriptions, integrate authentication via HTTP headers and WebSocket connection params.

Timeline: 2–4 weeks depending on schema scope and backend necessity.