Docs/ServerConfig.md
The Bagisto Flutter app uses GraphQL for API communication. Server configuration is managed through constants and environment variables.
Go to lib/core/constants/api_constants.dart and configure the following:
/// Bagisto GraphQL endpoint (e.g., https://your-bagisto-server.com/graphql)
const String bagistoEndpoint = 'YOUR_BAGISTO_ENDPOINT_HERE';
/// Storefront key for Bagisto API
/// Get this from your Bagisto admin panel
const String storefrontKey = 'YOUR_STOREFRONT_KEY_HERE';
/// Company name (optional metadata)
const String companyName = 'Your Company Name';
bagistoEndpointhttps://bagisto.yourdomain.com/graphqlstorefrontKeyThe GraphQL client is configured in lib/core/graphql/graphql_client.dart with:
TimeoutHttpClient with 30-second timeout for both connection and receiveContent-Type: application/jsonX-STOREFRONT-KEY: {storefrontKey}The app uses HiveStore for caching GraphQL responses. To clear cache on logout:
await GraphQLClientProvider.clearCache();
Before deploying to production: