Skip to main content

GraphQL Client

  • Uses GraphQL to connect to remote data sources.
  • Handles API calls using a clean, functional approach via fpdart.

Key Featuresโ€‹

  • Initialization with init():

    • Configurable caching
    • Setup with base URL
  • Token Management:

    • Dynamically set authorization tokens using setAuthorizationToken
  • Single Entry Point:

    • request() handles all query/mutation calls
    • Accepts .graphql file path and optional variables

Utilitiesโ€‹

FunctionPurpose
readGraphQLFileReads .graphql files from Flutter asset bundle
doApiCallExecutes GraphQL query/mutation based on RequestType
validateResponseValidates GraphQL response for exceptions
getResponseDataExtracts and returns the response payload

๐Ÿ” Unified. Functional. Flexible.

API setup made effortless โ€” with app_client.