SReverseby Simpa Labs

Query recovery

Finding GraphQL queries inside an APK

Recover the GraphQL operations, variables and session state used by the app. Compare each request with its response before turning it into a callable client.

Recover the operation and transport

Record the endpoint, HTTP method, content type, operation name, document or persisted identifier, and variables. Read generated operation classes, assets and runtime request builders together. A URL alone does not describe the GraphQL operation.

Match the document with the variables actually sent by the app. Follow headers, cookies and signing inputs through the same request path so the reconstructed client keeps the session behavior.

Distinguish persisted-query mechanisms

A persisted identifier can refer to a registered operation or an automatic persisted-query exchange. Apollo APQ can retry an unknown hash with its full document, while other deployments use an operation allowlist. Inspect the app and server exchange before choosing the client behavior. See Apollo's APQ documentation.

Read response keys and errors correctly

An alias changes a response key, so map that key back to its selected field in the document. A null result does not establish the schema's nullability: execution errors can produce null or propagate to a parent. The alias guide and response guide explain those cases.

Check both data and errors. HTTP status depends on the failure stage and response media type, so a transport success alone does not establish an operation's result. The GraphQL over HTTP draft describes the current proposed transport rules.

Verify the schema and call sequence

Use available schema documents, generated types, introspection where enabled, and observed operations. Record the source for each type and field rather than inferring a complete schema from one response. Keep pagination cursors, fragments and tenant or account state tied to the operation.

Subscriptions have a separate transport to identify. GraphQL does not require one particular delivery protocol; inspect the app's connection and message format. The subscription guide explains that separation.

Build and test the working client

Test variables, empty results, pagination, partial data and fresh sessions against the app. GraphQL API reconstruction carries those operations into working clients. The full APK delivery includes the callable backend workflows and every delivery format.

Check a recovered persisted-operation entry

The owned fixture maps the SHA-256 of one exact query document to that document. A request carries that ID, an operation name and variables. The test serializes the request, reads it back and checks that the ID resolves to the expected query. An unknown ID has no registered operation in this fixture.

query Stock($sku: ID!) { stock(sku: $sku) { count } }

Hash the exact deployed document, including its formatting; do not substitute a reformatted query and assume the hash stays the same. Confirm the manifest entry against the app’s outgoing request and selected operation.

Apollo’s persisted-query guide distinguishes registered operation lists from automatic persisted queries. An APQ server can ask the client to retry with query text; a registered-only deployment has a different rule. Our manifest test models a registered lookup, not either product’s full server implementation. The delivered client also needs pagination, sessions and error handling around that operation.

Reviewed 22 October 2026 · SReverse research desk

Start your full APK reconstruction

Send the full APK

Projects start at $70. Choose WhatsApp or email, then attach the APK in the app that opens. We reply within one hour with the next step and send the fixed quote after review.

Want us to contact you?