vendure 7.4.2
vendure: ^7.4.2 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.4.2 - 2026-11-13 #
- Mono-version fleet alignment to 7.4.2; internal dependencies refreshed; xml override 7.1.0.
7.4.1 - 2026-11-11 #
Fleet release 7.4.1: core adds zfa tunnel (Cloudflare-hosted MCP servers), MCP streamable-HTTP transport with usecase tools, blocking lifecycle hooks (#2032), typed tool param coercion (#2061); whole fleet mono-aligned to 7.4.1.
Unreleased #
Two transport regressions from the 7.x reimplementation, both reported live
on zik_zak (websocket churn + unhandled Bad state: Future already completed):
- Subscriptions speak
graphql-transport-wsagain. The reimplementation dropped the source SDK'ssubProtocol: GraphQLProtocol.graphqlTransportWson the subscriptionWebSocketLink, silently falling back to the legacygraphqlWsprotocol. Vendure servers close the socket right afterconnection_init, and withautoReconnectthat becomes the endlessConnected to websocket → Initialising connection → Disconnected from websocketloop (reconnect every 5s, forever). Restored from vendure-flutter-sdk 3.0.1_getSubscriptionClient. - The
timeoutparameter is wired into the client.VendureContext.timeoutwas dead code: the mainGraphQLClientwas built withoutqueryRequestTimeout, sographql's silent 5s default applied — exactly what consumers like zik_zak disable on purpose (zik_zak issue 265: the budget is enforced per call instead). The default'sStream.timeoutfires a syntheticTimeoutExceptionwhile the late real response still completes the query manager's unguardedonDatacompleter a second time — the unhandledBad state: Future already completedcrash throughHttpLink.request+ the AuthLink chain.queryRequestTimeout: context.timeoutrestores the source SDK'squeryRequestTimeoutcontract (timeout: null= no transport-level timeout). - Regression suite: T1–T4 in
test/graphql_datasource_suite_test.dartpin the client request timeout (context-carried, null = disabled) and the subscription wire configuration (protocol, endpoint scheme/languageCode swap). - The
timeoutwiring no longer arms graphql'sStream.timeout. Passingcontext.timeoutintoGraphQLClient.queryRequestTimeout(the 7.3.8 regression, issue #8) armed aStream.timeouton every Shop API call: when the stream went quiet past the budget, the request failed as a syntheticTimeoutException(No stream event) and the late real response then double-completed the query manager's unguarded completer — the unhandledBad state: Future already completedcrash in the root zone (graphql 5.2.4,query_manager.dart). The client now pinsqueryRequestTimeout: null(explicit — omitting restores the silent 5 s default), and the datasource enforcesVendureContext.timeoutin_executeRaw/mutateWithHeadersvia cancellableFuture.timeout, translating expiry toVendureDataSourceException. Regression suite: T1 re-pinned, T5–T7 intest/graphql_datasource_suite_test.dart(a quiet stream surfaces a clean exception with zero unhandled async errors; the late response lands silently). - Transport moved to the hardened
graphql_plusfork. The unhandledBad state: Future already completedhad a root cause in the dependency, not only in vendure's wiring: stockgraphql5.2.4'sQueryManagerpassescompleter.completestraight toStream.listen, so onceStream.timeouthas settled the completer the late response completes it again from inside the stream callback — wherefetchQuery's try/catch cannot reach it. The dependency is nowgraphql_plus: ^5.2.5(arrrrny's fork of 5.2.4), which guardsonData/onErrorwithisCompleted, cancels the subscription once the completer settles, and surfaces an empty response stream asStateError('No element')instead of hanging. The fork renamed the library file, sopackage:vendure/graphql.dartis the stable import for the transport types on vendure's public surface. Regression: T8 intest/graphql_datasource_suite_test.dart(red on 5.2.4, green on the fork). - BREAKING (transport imports): a consumer that imported
package:graphql/client.dartto name a client type (to build an injectedGraphQLClient, say) must importpackage:vendure/graphql.dartinstead — re-exported bypackage:vendure/vendure.dart, so the package's documented entrypoint is enough.graphqlis no longer a dependency of vendure, and a same-named class from a consumer's owngraphqlresolution is a different type from the one vendure's transport actually speaks.
7.3.6 - 2026-11-02 #
- Fix:
CustomOperations.queryListPaginated/mutateListPaginatedrestore the source SDK's envelope normalization —__typename→runtimeTypebeforefromJson(with the caller'sconvertEnumshonored on output, which was previously dead on this path).gql()injects__typenameinto every selection set and the raw escape hatch returns the payload as-is, so polymorphic entity decoders (zorphyexplicitSubTypesfromJson — e.g. zik_zak'sListing.fromJson) threwUnsupportedError: The __typename 'ChannelListing' is not supported…on every paginated row. Regression suite:test/custom_operations_paginated_suite_test.dart(zuraffa_vendure#2, PR#3). - Mono-version fleet alignment to 7.3.6; internal dependencies refreshed; xml override 7.1.0.
7.3.5 #
- Fix:
Vendure._finalizeInitializationconnection-check query now passesfromJson: nullso the scalar__typenamestring return doesn't fail theMap<String, dynamic>expectation.
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.