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
- Dynamically set authorization tokens using
-
Single Entry Point:
request()
handles all query/mutation calls- Accepts
.graphql
file path and optional variables
Utilitiesโ
Function | Purpose |
---|---|
readGraphQLFile | Reads .graphql files from Flutter asset bundle |
doApiCall | Executes GraphQL query/mutation based on RequestType |
validateResponse | Validates GraphQL response for exceptions |
getResponseData | Extracts and returns the response payload |
๐ Unified. Functional. Flexible.
API setup made effortless โ with
app_client
.