Skip to content

Query method in Amplify API hangs in between when internet is disconnected in middle of call #5513

Open
@raphire08

Description

@raphire08

Description

The query method in Amplify API Amplify.API.query<T> does not throws when internet is disconnected in between the call.

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

  1. Try any GraphQL response as mentioned below, kill the internet in between the call
  2. Expected: Query function should throw
  3. Actual: It does not throws and the call is open for more than 10-15 mins
  4. version amplify_api: ^1.6.1
 GraphQLResponse<T>? response;
    try {
      response = await Amplify.API.query<T>(request: request).response;
    } catch (e, s) {
      // print error
      response = null;

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.16.9

Amplify Flutter Version

1.6.1

Deployment Method

Amplify CLI (Gen 1)

Schema

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    GraphQL APIIssues related to the API (GraphQL) CategorybugSomething is not working; the issue has reproducible steps and has been reproducedto-be-reproducedIssues that have not been reproduced yet, but have reproduction steps provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions