Skip to main content

vendure 7.3.4 copy "vendure: ^7.3.4" to clipboard
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.code is now nullable. Real Vendure backend authenticate / firebaseAuth mutations select channels { id token permissions } without code, which previously caused CheckedFromJsonException during JSON decoding.

7.3.3 #

Hotfix (consumer-reported via the fleet verification round — zik_zak's vendure-client init scenarios):

  • mutateWithHeaders tolerates an absent body — the auth seam's contract is headers-only (the session token rides the vendure-auth-token response header). A mutation whose expectedDataType key is absent in the response (e.g. a firebase token-exchange server answering with only __typename) now resolves to null data instead of throwing No data returned for expected type: authenticate, matching vendure-flutter-sdk 3.0.1's AuthBaseOperations.extractResponseHeaders. VendureResponse.data is T?.
  • 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 VendureDataSource port (one error path — VendureDataSourceException), GraphQLVendureDataSource (link chain: HttpLink → apiKey → vendure-token → App Check → Bearer; noCache policies; __typename→runtimeType normalization; transient-network retry; WebSocket subscriptions with the Vendure initialPayload), and the pure-Dart InMemoryVendureDataSource (scripted payloads, request recording, response-header scripting).
  • Entities: the schema's 179 entities as zorphy types (11 enums + SearchResultPrice included), and the 18 mutation unions as hand-written sealed classes dispatching on the wire runtimeType key.
  • Auth: DataAuthRepository with the AuthErrorClassifier credential vocabulary; the session token is captured from the vendure-auth-token response header via mutateWithHeaders.
  • Token lifecycle: TokenManager + TokenLocalDataSource seam with the fetch-refresh closure wired by the facade.

Port fidelity notes (from vendure-flutter-sdk 3.0.1) #

  • queryList requires the extracted payload to be a bare list; scalar lists (e.g. nextOrderStates) decode without a fromJson.
  • custom.query/mutate accept an optional fromJson; 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 CustomOperations built 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.

7
likes
0
points
2.33k
downloads

Publisher

verified publisherzuraffa.com

Weekly Downloads

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.

Homepage
Repository (GitHub)
View/report issues

Topics

#vendure #commerce #graphql #flutter

License

unknown (license)

Dependencies

get_it, graphql, json_annotation, zorphy_annotation, zuraffa

More

Packages that depend on vendure