vendure 7.3.4
vendure: ^7.3.4 copied to clipboard
The Zuraffa reimplementation of the Vendure Flutter SDK — the GraphQL commerce seam (auth, orders, catalog, customers, system, custom operations) on the zfa clean-architecture stack.
7.3.4 #
- Fix:
CurrentUserChannel.codeis now nullable. Real Vendure backendauthenticate/firebaseAuthmutations selectchannels { id token permissions }withoutcode, which previously causedCheckedFromJsonExceptionduring JSON decoding.
7.3.3 #
Hotfix (consumer-reported via the fleet verification round — zik_zak's vendure-client init scenarios):
mutateWithHeaderstolerates an absent body — the auth seam's contract is headers-only (the session token rides thevendure-auth-tokenresponse header). A mutation whoseexpectedDataTypekey is absent in the response (e.g. a firebase token-exchange server answering with only__typename) now resolves to null data instead of throwingNo data returned for expected type: authenticate, matching vendure-flutter-sdk 3.0.1'sAuthBaseOperations.extractResponseHeaders.VendureResponse.dataisT?.- Regression locks A2 (in-memory, headers-only firebase exchange) and
G10 (graphql adapter,
__typename-only response).
7.3.2 #
The Zuraffa reimplementation of the Vendure Flutter SDK, shipped as the
same vendure package name.
- Facade (
Vendure): five init variants +forTesting, the runtime setters (auth token, languageCode, channelToken, apiKey),refreshToken,destroy, GetIt registration (registerVendureDependencies/registerVendureTestDependencies), and the connection-check ping. - Six operation groups on the facade:
order,auth,customer,catalog,system,custom(raw query/mutate/queryList/mutateList, paginated variants, response-header extraction). - Datasources: the
VendureDataSourceport (one error path —VendureDataSourceException),GraphQLVendureDataSource(link chain: HttpLink → apiKey → vendure-token → App Check → Bearer; noCache policies;__typename→runtimeTypenormalization; transient-network retry; WebSocket subscriptions with the Vendure initialPayload), and the pure-DartInMemoryVendureDataSource(scripted payloads, request recording, response-header scripting). - Entities: the schema's 179 entities as zorphy types (11 enums +
SearchResultPriceincluded), and the 18 mutation unions as hand-written sealed classes dispatching on the wireruntimeTypekey. - Auth:
DataAuthRepositorywith theAuthErrorClassifiercredential vocabulary; the session token is captured from thevendure-auth-tokenresponse header viamutateWithHeaders. - Token lifecycle:
TokenManager+TokenLocalDataSourceseam with the fetch-refresh closure wired by the facade.
Port fidelity notes (from vendure-flutter-sdk 3.0.1) #
queryListrequires the extracted payload to be a bare list; scalar lists (e.g.nextOrderStates) decode without afromJson.custom.query/mutateaccept an optionalfromJson; omitted, the extracted payload returns raw (scalar/Map/List).- Response normalization (
__typename→runtimeType, enum conversion off) runs before the typed decode on both adapters, so the sealed unions dispatch exactly like the old SDK's remote path. - The old SDK's
CustomOperationsbuilt a second datasource; this port wires the facade's single datasource through, so custom operations share the context, the error path, and the retry policy.
Tests #
24 behavioral tests, pure Dart, no network: the port contract and one error path (D1–D6), the GraphQL adapter's envelope/dot-path/ErrorResult handling, context assembly, and the union wire-dispatch normalization (G1–G9), and the facade lifecycle plus per-group request-shape fidelity (F1–F4, O1–O3, A1, C1) through the scripted in-memory datasource.