graphql_plus 5.3.0
graphql_plus: ^5.3.0 copied to clipboard
A stand-alone GraphQL client for Dart, bringing all the features from a modern GraphQL client to one easy to use package. Forked from package:graphql 5.2.4 (zino-hofmann/graphql-flutter) to ship the u [...]
5.3.0 #
Added #
WebSocketLink.connectionState— a stableStream<SocketConnectionState>on the link, so an app can tell that a subscription's connection dropped without reaching intoSocketClient(closes #6, upstream graphql-flutter#1188).SocketClientis disposed and rebuilt on everyconnectOrReconnect(), so a caller that subscribed togetSocketClient!.connectionStatewas bound to an instance that was about to be discarded — exactly when the signal is needed. The link now owns the stream and keeps forwarding across rebuilds. Seeds withnotConnectedbefore the first connection, supports multiple listeners, and closes ondispose(). Additive: no existing signature, default, or export changes.AuthLink.onAuthError— an optional callback that enables refresh-and-replay (closes #8, upstream graphql-flutter#220). When a downstream link throws and the callback returnstrue,AuthLinkfetches a new token throughgetTokenand re-sends the original operation once with the refreshed header; otherwise the error is re-thrown unchanged. Replay happens at most once, so a refreshed token that is also rejected surfaces the second error rather than looping.onAuthErroris optional, so existingAuthLink(getToken: ...)usage is unchanged.- Note: forwarding now uses
await forinstead ofyield*. Inside anasync*generator the error from ayield*-ed stream is delivered to the listener rather than thrown at theyield*, so a surroundingcatchnever sees it and a replay there is dead code. - Concurrent failed requests share a single in-flight refresh:
getTokenis called once per refresh, not once per request.getTokenshould therefore be cheap and idempotent (read an already-refreshed value such as() => authStore.token) rather than performing the refresh itself. - A replay is cancellable: if the consumer cancels its subscription while the refresh or the replay is in flight, no replay is sent and no further events are emitted. If the refresh or replay itself throws, the original error is surfaced rather than the secondary failure.
- Changed:
AuthLinkno longer removes or alters the request context on replay. The replayed request carries the same context entries (for exampleHttpLinkHeaders) as the original, so a trace header or similar survives the refresh.
- Note: forwarding now uses
Fixed #
- A
graphql-transport-wspeer that never answerspingkeeps its keepalive (closes the review findings on #29)._enqueuePingarmed a one-shotTimerthat was only re-armed when apongarrived, so a peer that never answered received exactly one ping and then nothing — the connection had no keepalive at all, which is precisely the case a keepalive exists for. The timer is nowTimer.periodic, so pings repeat oninactivityTimeoutregardless of acknowledgements, and theponghandler no longer re-arms it: with a periodic timer that re-arm measured the interval from the lastpong, so a peer sending unsolicited or chattypongs reset the timer faster than it could fire and the ping never went out.- Scope: this covers the client side only. A
graphql-transport-wspeer that goes silent after the lastpongis still not detected as dead — unlikegraphql-ws, which arms_disconnectOnKeepAliveTimeout— and that pre-existing gap is tracked in #35.
- Scope: this covers the client side only. A
WebSocketLinkno longer crashes, leaks a socket, or double-reportsnotConnectedafter a rebuild (closes the review findings on #24). Three defects in theconnectionStateforwarder that #24 introduced:- A
request()orconnectOrReconnect()on a disposed link threw an uncaught asyncBad state: Cannot add new events after calling closefrom inside the socket's stream delivery, where no caller could catch it. The link now refuses the rebuild with aStateErrorat the call site, and the forwarder ignores a closed subject. dispose()cleared its fields after awaiting the socket teardown, so aconnectOrReconnect()landing in that window installed a client thatdispose()then nulled without ever closing — a live socket nobody owned. The fields are captured and cleared before the firstawait, and a disposed link rejects a reconnect outright.- Every fresh connect emitted
notConnectedtwice: the link seeds its own subject with it and the newSocketClient'sBehaviorSubjectreplays its seed to a late listener. The replayed seed is now dropped, so a consumer counting transitions sees one event per connect.
- A
- A partial
optimisticResultno longer blanks cache fields it omits (closes #3, upstream graphql-flutter#1118).normalizeemits an explicitnullfor every selected field that an optimistic payload left out; those nulls were recorded into the optimistic patch and then overwrote the stored value when the patch was merged, so an optimistic write of{id, friendStatus}erased a cachedname. Nulls originating from a partial payload are now dropped before the patch is recorded, making an absent field a no-op rather than a clear.- Behaviour change: a field deliberately set to
nullin an optimistic payload is also treated as an omission and no longer blanks optimistically; it blanks when the network response lands. This matches Apollo's observable optimistic-merge semantics. - Scope: the stripping applies to a field whose entity the cache already holds, where there
is a value to protect. For an entity the cache has never seen the nulls are kept, because
they are what keeps a freshly created entity denormalizable — dropping them would make an
optimistic create read back as
null. Nested values inside aListare not stripped: lists are replaced wholesale when a patch is merged, so an omitted subfield of a list item is already an omission rather than a clear, and stripping there would leave the item short of the fields the selection set requires.
- Behaviour change: a field deliberately set to
- Optimistic writes are now actually merged.
OptimisticProxy.writeNormalizedguarded its merge path withvalue is Map<String, Object>, which is never true for theMap<String, dynamic>thatnormalizepasses. Every optimistic write had therefore been stored raw and unmerged, and the documented "deeply merging maps with existing values" behaviour never ran. The guard is removed. - Subscriptions no longer enter an infinite connect/disconnect loop (closes #15, upstream
graphql-flutter#811). For the legacy
graphql-wssubprotocol, liveness was inferred from server-initiatedConnectionKeepAlivemessages, and the watchdog force-closed the socket when none arrived withininactivityTimeout(default 30s). Servers that do not use protocol keepalives — Apollo Server 3+, NestJS — therefore had every healthy but idle subscription closed and auto-reconnected forever. The watchdog is now armed only after the peer has demonstrated it sends keepalives, so a peer that never sends them is left alone while dead-connection detection is preserved for any peer that sends at least one: the watchdog is (re)armed on every keepalive, however late the first one arrives.- The issue title blames a
content-length: 0handshake header. That does not reproduce on Dart 3.14: the handshakedart:iosends was captured and contains nocontent-lengthheader at all. The keepalive watchdog is the actual cause. inactivityTimeout: Duration.zerostill disables the timeout; combined withautoReconnect: trueit is what turns a quiet connection into a visible loop.
- The issue title blames a
5.2.6 #
Added #
- New
SocketClientConfig.getHeaderscallback (sync or async,FutureOr<Map<String, dynamic>?> Function()?) for refreshing auth headers on reconnect. It is re-evaluated on every connection and reconnection attempt and its non-null result takes precedence over the literalheadersmap, so an expiredAuthorizationheader no longer fails every reconnection forever (upstream graphql-flutter#1323). The existing payload-based refresh path (initialPayloadcallback) is unchanged and now documented.
Changed #
SocketClientConfig.headerskeeps itsMap<String, dynamic>?type — refreshed values are supplied via the newgetHeaderscallback rather than by wideningheadersto accept callbacks, so invalid configurations keep failing at compile time instead of as runtime cast errors mid-reconnect.
Documentation #
- Removed the upstream project's community furniture from the fork's READMEs
(Discord invite, hiring banner, unrelated third-party CI badges, dead
OpenCollective image gallery) and repointed every relative link from the
pre-rename
packages/graphqlpath topackages/graphql_plus. - Dropped the
open_collective: graphql-flutterentry fromFUNDING.ymlin favour of this fork's own GitHub Sponsors entry.
5.2.5 #
Forked from package:graphql 5.2.4 as graphql_plus (arrrrny/graphql_plus) to
ship the unreleased upstream main hardening:
Fixed #
- QueryManager no longer double-completes after a request timeout. Both
onDataandonErrorare guarded withif (!completer.isCompleted)and the response subscription (plus any cancellation subscription) is cancelled once the completer settles. PreviouslyStream.timeout(armed by the silent 5squeryRequestTimeoutdefault) forwarded a syntheticTimeoutExceptiontoonErrorwithout cancelling the source subscription, so a late real response completed the already-settled completer a second time — an unhandledBad state: Future already completedescaping the awaiting zone and crashing consumers (observed live from the ZikZak app against raptorr; see thequery_manager.darthistory on zino-hofmann/graphql-flutter main). - Empty response streams now surface
StateError('No element')viaonDoneinstead of hanging the awaiting future.
Added #
- Operation cancellation-token support, carried over from upstream main (unreleased at fork time).
5.2.3 #
5.2.1 #
5.2.0 #
Fixed #
- add queryRequestTimeout parameter to copyWith method (commit). @nestorsgarzonc 07-02-2025
- ensure readNormalized correctly merges Map<String, dyna… (commit). @nozomemein 07-02-2025
- update normalize dependency to version 0.9.1 (#1448) (commit). @nrbnlulu 11-09-2024
- upgrade web_socket_channel, dart sdk dependencies. Update tests to ignore missing closeCode (commit)
- upgrade rxdart 0.28.0 (#1454) (commit). @ronnnnn 30-08-2024
- add query timeout argument when create client. (commit). @ykuc7 29-08-2024
- add timeout to _resolveQueryOnNetwork (commit). @ykuc7 18-07-2024
- make == override parameters non-nullable (commit). @kamilkarp 01-04-2024
- response extensions should be optional (commit). @kamilkarp 31-03-2024
- fix error is throwed when toggleConnection != null (commit). @hantrungkien 27-05-2024
- transform nested object from box (commit). @ronnnnn 09-04-2024
- check for null data returned from fetchMore.updateQuery… (commit). @aarsham 08-04-2024
- resolve duplicate events on socket reconnect (commit). @aarsham 08-04-2024
- remove unnecessary null checks in SocketClient (commit). @aarsham 08-04-2024
- bump uuid dependency to ^4.0.0 (commit). @francescoberardi 23-11-2023
- Send SubscriptionComplete message when using graphqlTra… (commit). @ 30-08-2023
- bumps http to v1 (commit). @moisessantos 06-07-2023
- Cache parsed data (commit). @budde377 03-06-2023
- onComplete callback should send null (commit). @budde377 12-03-2023
- upgrade the ws packege to v2.3.0 (commit). @vincenzopalazzo 15-01-2023
- remove unecessary deprecation code (commit). @vincenzopalazzo 15-01-2023
- support @include and @skip with new normalize major ver (commit). @vincenzopalazzo 15-01-2023
Added #
- make timeout configurable in query options (#1475) (commit). @ndelanou 28-12-2024
- Support custom equality function for cache comparison (commit). @kvenn 05-08-2024
- Send custom payload in PingMessage (commit). @Rochak69 31-08-2023
- added WebSocket token refresh and autoReconnect toggling (commit). @vytautas-pranskunas- 24-07-2023
- bump sdk version upper bound to <4.0.0 (commit). @ndelanou 17-05-2023
- bump gql version to 1.0.0 (commit). @ndelanou 03-05-2023
- print the connection status with ws (commit). @vytautas-pranskunas- 15-03-2023
5.2.0-beta.11 #
5.2.0-beta.10 #
5.2.0-beta.9 #
5.2.0-beta.8 #
Fixed #
- make == override parameters non-nullable (commit). @kamilkarp 01-04-2024
- response extensions should be optional (commit). @kamilkarp 31-03-2024
- fix error is throwed when toggleConnection != null (commit). @hantrungkien 27-05-2024
- transform nested object from box (commit). @ronnnnn 09-04-2024
- check for null data returned from fetchMore.updateQuery… (commit). @aarsham 08-04-2024
- resolve duplicate events on socket reconnect (commit). @aarsham 08-04-2024
- remove unnecessary null checks in SocketClient (commit). @aarsham 08-04-2024
5.2.0-beta.6 #
5.2.0-beta.2 #
5.2.0-beta.1 #
Fixed #
- onComplete callback should send null (commit). @budde377 12-03-2023
- upgrade the ws packege to v2.3.0 (commit). @vincenzopalazzo 15-01-2023
- remove unecessary deprecation code (commit). @vincenzopalazzo 15-01-2023
- support @include and @skip with new normalize major ver (commit). @vincenzopalazzo 15-01-2023
5.1.2 #
Added #
- Refactor GH actions (commit). @budde377 13-08-2022
- Introduce a new class
GraphQLProtocolwith better naming (commit). @vincenzopalazzo 22-07-2022 - add raw to exceptions on QueryResult (commit). @maironLucasSlz 28-11-2022
- add support for
graphql-transport-ws(commit). @maximilianmaihoefner 08-05-2022 - added query onError & onComplete callbacks (commit). @fabis94 22-04-2022
Deprecated #
- deprecate the
SocketSubProtocolto improve naming (commit). @vincenzopalazzo 22-07-2022
Fixes #
- Minor formatting issues (commit). @budde377 23-04-2022
- Transform nested objects (commit). @budde377 27-06-2022
- send connection_init message during handshake (commit). @othorin 20-05-2022
- fix
SocketClientto close subscription on socket close (commit). @qbx2 22-07-2022 - Allow list of errors as payloads for graphql-transport-… (commit). @juancastillo0 05-10-2022
- Adapt code to breaking change of 'gql' dependencies (commit). @ueman 21-08-2022
- Normalization signature (commit). @budde377 13-08-2022
- fixing the dart analyzer error (commit). @vincenzopalazzo 27-11-2022
5.1.2-beta.6 #
5.1.2-beta.5 #
5.1.2-beta.4 #
5.1.2-beta.3 #
5.1.2-beta.2 #
5.1.2-beta.1 #
5.1.0 #
New Feature #
- Hive integration (commit). @budde377 03-04-2022
Fixes #
- subscription hook return an uninitialized stream (https://github.com/zino-hofmann/graphql-flutter/commit/ebc4abd86b72b75ffe4e26a2f412411ab7dd2993). @PainteR 25-03-2022
- Stricter analysis (https://github.com/zino-hofmann/graphql-flutter/commit/131ea1f78b55554f730269f94aad11fb1d07cc44). @budde377 19-03-2022
5.0.2-beta.8 #
5.0.2-beta.7 #
New Feature #
- Stricter analysis (https://github.com/zino-hofmann/graphql-flutter/commit/131ea1f78b55554f730269f94aad11fb1d07cc44). @budde377 19-03-2022
Fixes #
- subscription hook return an uninitialized stream (https://github.com/zino-hofmann/graphql-flutter/commit/ebc4abd86b72b75ffe4e26a2f412411ab7dd2993). @PainteR 25-03-2022
5.0.2-beta.6 #
- due a bug we miss all the changelog until the version # v5.0.2-beta.6, we need to fix it soon
5.0.1-beta.1 - 2021-12-09 #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-12-08) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-12-07) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-12-06) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-12-05) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-12-04) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-12-03) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-12-02) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-12-01) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-11-30) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-11-29) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-11-28) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-11-27) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.1-beta.1 (2021-11-26) #
Performance Improvements #
- open Hive boxes concurrently (33ea16e)
5.0.0 - 2021-06-07 #
Bug Fixes #
- ci: graphql coverage (d47852a)
- ci: refine dartanalyzer for example (e7b5830)
- ci: stop using test_coverage (28e499e)
- ci: try dart analyze (61e9f81)
- client: always only pull broadcast stream once (1b6a9e6)
- client: AuthLink getToken result should be nullable. (7f36a68)
- client: fix rebroadcasting for regular queries (3245e27)
- client: fix rebroadcasting for regular queries (0c6b0e7)
- client: hotfix dataIdFromObject passthrough in cache.readQuery (e3e04f8)
- examples: upgrade to nullsafety (fe69bce)
- flutter: make sure starwars works with nullsafe changes (6d27c64)
- graphql: only return subscriptions eagerly from cache when a cache-enabled policy is used (8af2edd)
Features #
- client: Capture stack traces in UnknownExceptions (4b36c09)
- client: null safe by default (802185a)
- client: SocketClient with web_socket_channel (6631f42)
- Expose
possibleTypeson cache (#906) (49483ad)
BREAKING CHANGES #
- client: Null Safety
5.0.0-beta.1 - 2021-05-16 #
Bug Fixes #
- ci: refine dartanalyzer for example (e7b5830)
- ci: stop using test_coverage (28e499e)
- ci: try dart analyze (61e9f81)
- client: AuthLink getToken result should be nullable. (7f36a68)
- examples: upgrade to nullsafety (fe69bce)
- flutter: make sure starwars works with nullsafe changes (6d27c64)
- graphql: only return subscriptions eagerly from cache when a cache-enabled policy is used (8af2edd)
Features #
- client: null safe by default (802185a)
BREAKING CHANGES #
- client: Null Safety
4.1.0-beta.1 - 2021-03-06 #
4.0.2-beta.1 - 2021-02-08 #
4.0.1 - 2021-02-07 #
4.0.0 - 2021-01-31 #
Bug Fixes #
- examples: starwars example cache (22db4f7)
- fix ObservableQuery.lifecycle for cache only results (f44b479)
- client: mutation not firing observer callbacks (75393c2)
- query test (f54c6ae)
- ci: loosen path version (645d462)
- client: add CacheMissException for when write/read results in null (a0a967f)
- client: fetchMore partial handling (10ec576)
- client: gql_http_link==0.3.2 for custom toJsons closing #734 (98b8cf7)
- client: only queries are refetch safe (1e93376)
- client: refetch overrides fetchPolicy (891bc2b)
- client: skip cache writes on null data, thus fixing #405 (7472bb9)
- client: wrap all subscription errors in QueryResults (aae61ca)
- docs: typo in docstring, add todo to sanitizeVariables (9c84cb1)
- examples: cleanup bloc example (82724f0)
- examples: flutter bloc pubspec (61582b3)
- examples: ignore missing token (ffd3294)
- examples: starwars example works again (7514b93)
- examples: update ios files for graphql_flutter/example (5b6e3d0)
- graphql: default-yet-overrideable variable (6ba687e)
- graphql: don't close mutations after callbacks (2ba6c74)
- graphql: dumb ?? documentNode bug (ba7b641)
- graphql: fix rebroadcasting by refactoring onData callbacks into a simpler async function (9a5fff1)
- graphql: keep deprecated QueryResult api and mark it as such (2b447a0)
- graphql: sanitize multipart files for cache (4ceb800)
- graphql: simplified AuthLink (0b3fbd9)
- tests: update tests (bba4a7a)
Features #
- cache now flags itself for broadcasting (84cba43)
- client.fetchMore utility for leveraging the fetch more logic results without using ObservableQuery (814ccb3)
- documentNode -> document, dependency issues, reexport links from client (for now), retrieve subscription changes from #533 (4fb205c)
- graphql: HiveStore.open (6db4677)
- drop Link layer in favor of package:gql_link and package:gql_exec (2e491a7)
- client: add context to QueryResult (fbc5a2d)
- client: cache proxy methods on cache, resetStore with optional refetchQueries (ba7134a)
- client: cache writes are now strict, and throw PartialDataException (from normalize), (616b5ed)
- client: CacheRereadPolicy, watchMutation workaround (32e02da)
- client: carry forward data on exception (ccf3b9c)
- client: expose store, cleanup (6fc5e7e)
- client: only rebroadcast on deep equals (ee64e99)
- client: partialDataPolicy for configuring rejections (0a7cd28)
- client: QueryResult.unexecuted (13e3257)
- client: refetchSafeQueries, clarify rebroadcast calls in docs (e45b240)
- docs: v4 changelog (38cfd9b)
- examples: reorg graphql example so pub displays code (bc32bdd)
- examples: starwars hivestore usage (2f874ec)
- graphql: add isMutation etc helpers to Options types (04e7888)
- graphql: complete caching overhaul (e9b5660)
- graphql: HiveStore api improvements, fetchmore fixes (2d1a7f2)
- graphql: multipart file support (c2733ca)
- graphql: re-add documentNode asdeprecated (20d0176)
- more work on gql links (0d7ef7a)
- graphql: Robust ObservableQuery docs (1e893b5)
- graphql: update old websocket_link (496d994)
- graphql: upgrade normalize to 0.4.2 (4655e7d)
- graphql: use new cache correctly everywhere else (f64a6c8)
- starting on gql links (d9452bc)
- graphql: work on making subscriptions more of a first-class citizen (6d0b045)
- graphql_flutter: add ResultAccumulator, fix Subscription (7e1edee)
- graphql_flutter: initHiveForFlutter (1118cc7)
- HiveStore (2c3c66c)
- move to DocumentNode-only documents (7499323)
- graphql_flutter: work on making subscriptions more of a first-class citizen (a0e0d5c)
- tests: test subscriptions (2a3e6a1)
BREAKING CHANGES #
- client: By fixing the defaults for mutations, the old behavior is now lost
- the deprecated string documents are no longer supported
- Link layer is now implemented via package:gql_link and package:gql_exec
4.0.0-beta.7 - 2021-01-25 #
4.0.0-beta.6 - 2020-12-27 #
4.0.0-beta.5 - 2020-11-10 #
4.0.0-beta.4 - 2020-11-07 #
4.0.0-beta.1 - 2020-10-07 #
v4 reworks a lot of the internals of the core graphql/client.dart (and thus graphql_flutter).
Please see the v4 changelog for more details, and the updated READMEs for more extensive documentation.
The following was autogenerated from ill-manicured commits:
Bug Fixes #
- examples: ignore missing token (ffd3294)
- query test (f54c6ae)
- ci: loosen path version (645d462)
- client: gql_http_link==0.3.2 for custom toJsons closing #734 (98b8cf7)
- client: mutation not firing observer callbacks (75393c2)
- client: only queries are refetch safe (1e93376)
- docs: typo in docstring, add todo to sanitizeVariables (9c84cb1)
- examples: cleanup bloc example (82724f0)
- examples: flutter bloc pubspec (61582b3)
- examples: starwars example cache (22db4f7)
- examples: starwars example works again (7514b93)
- examples: update ios files for graphql_flutter/example (5b6e3d0)
- graphql: default-yet-overrideable variable (6ba687e)
- graphql: don't close mutations after callbacks (2ba6c74)
- graphql: dumb ?? documentNode bug (ba7b641)
- graphql: fix rebroadcasting by refactoring onData callbacks into a simpler async function (9a5fff1)
- graphql: keep deprecated QueryResult api and mark it as such (2b447a0)
- graphql: sanitize multipart files for cache (4ceb800)
- graphql: simplified AuthLink (0b3fbd9)
- tests: update tests (bba4a7a)
Features #
- cache now flags itself for broadcasting (84cba43)
- client.fetchMore utility for leveraging the fetch more logic results without using ObservableQuery (814ccb3)
- documentNode -> document, dependency issues, reexport links from client (for now), retrieve subscription changes from #533 (4fb205c)
- graphql_flutter: add ResultAccumulator, fix Subscription (7e1edee)
- drop Link layer in favor of package:gql_link and package:gql_exec (2e491a7)
- client: cache proxy methods on cache, resetStore with optional refetchQueries (ba7134a)
- client: expose store, cleanup (6fc5e7e)
- client: refetchSafeQueries, clarify rebroadcast calls in docs (e45b240)
- docs: v4 changelog (38cfd9b)
- examples: reorg graphql example so pub displays code (bc32bdd)
- examples: starwars hivestore usage (2f874ec)
- graphql: add isMutation etc helpers to Options types (04e7888)
- graphql: complete caching overhaul (e9b5660)
- graphql: HiveStore api improvements, fetchmore fixes (2d1a7f2)
- graphql: HiveStore.open (6db4677)
- graphql: multipart file support (c2733ca)
- graphql: re-add documentNode asdeprecated (20d0176)
- graphql: Robust ObservableQuery docs (1e893b5)
- graphql: update old websocket_link (496d994)
- graphql: use new cache correctly everywhere else (f64a6c8)
- HiveStore (2c3c66c)
- more work on gql links (0d7ef7a)
- move to DocumentNode-only documents (7499323)
- starting on gql links (d9452bc)
- graphql: work on making subscriptions more of a first-class citizen (6d0b045)
- graphql_flutter: initHiveForFlutter (1118cc7)
- graphql_flutter: work on making subscriptions more of a first-class citizen (a0e0d5c)
- tests: test subscriptions (2a3e6a1)
BREAKING CHANGES #
- the deprecated string documents are no longer supported
- Link layer is now implemented via package:gql_link and package:gql_exec
4.0.0-alpha.11 - 2020-09-26 #
- hotfix(client):
gql_http_link==0.3.2for custom toJsons closing #734 (98b8cf7)
4.0.0-alpha.10 - 2020-09-26 #
- hotfix(client):
gql_http_link==0.3.1fix for bool json encoding support (38b2fd2)
4.0.0-alpha.9 - 2020-09-25 #
⚠️ breaking: the cache.readFragment / cache.readFragment API has been reworked:
final fragDoc = gql(...);
final idFields = { '__typename': 'MyType', 'id': 1 }
final fragmentData = {
'myField': 'updatedValue',
'someNewField': [
{'newData': false}
],
};
+ // or Fragment(document: fragDoc).asRequest(idFields: idFields)
+ final fragmentRequest = FragmentRequest(
+ fragment: Fragment(
+ document: fragDoc,
+ ),
+ idFields: idFields,
+ );
cache.writeFragment(
- fragment: fragDoc,
- idFields: idFields,
+ fragmentRequest,
data: fragmentData,
);
This was done because I (@micimize) wanted to make it more consistent with cache.readQuery/cache.writeQuery before beta.
4.0.0-alpha.8 - 2020-09-24 #
This was mostly a prep release for the first v4 beta.
- client: cache proxy methods on cache, resetStore with optional refetchQueries (ba7134a)
- test(client): more cache and store tests (a9eed21)
- examples: merge and update flutter_bloc changes (ac4759a)
- docs: correct multipart example (f9d1adb)
- chore: re-merge changelog and templates (9db0b44)
- tests: restore old websocket client tests (3e4870c)
- refactor: pollInterval is now a Duration (fe02bb8)
- chore: I think fixes coverage and lint (d37e81c)
4.0.0-alpha.7 - 2020-09-17 #
GraphQLClient now implements GraphQLDataProxy, exposing readQuery, writeQuery, readFragment, and writeFragment. The writing methods also trigger rebroadcasts, closing #728.
It also adds an experimental client.resetStore({refetchQueries = true}) for refetching the results of all observed queries (not mutations), and expose cache.store with a WARNING about direct access.
- client: cache proxy methods on cache, resetStore with optional refetchQueries (ba7134a)
- client: refetchSafeQueries, clarify rebroadcast calls in docs (e45b240)
- client: expose store, cleanup (6fc5e7e)
- client: add isMutation etc helpers to Options types (04e7888)
- fix: only queries are refetch safe (1e93376)
- refactor: clean up unused helpers, clarify shoudRebroadcast (1cf6478)
4.0.0-alpha.4 - 2020-09-05 #
4.0.0-alpha.3 - 2020-07-27 #
4.0.0-alpha.2 - 2020-07-24 #
4.0.0-alpha.0 - 2020-06-07 #
See the v4 changelog
3.1.0 - 2020-07-27 #
Bug Fixes #
- ci: add changelog back (3e63c3e)
- ci: Sync master into beta (2a0507e)
- client: Throw a ClientException on non-json responses, to be (7d538e1), closes #552
- client: translateNetworkFailure when no route to host (877bdb8)
- examples: rebuilt & tested starwars example (2aaffeb)
- examples/starwars: use git dependency for graphql_starwars_test_server (0facc48)
- flutter: Query.didUpdateWidget and policy overrides (6672e44)
- flutter: widgets make unnecessary requests when dependencies change (c487931)
- packaging: correct dependencies, remove authors (13f6a43)
- packaging: don't commit .flutter-plugins-dependencies (f77dafa)
- packaging: upgrade rxdart (20364a9)
- release: RunMutation return type definition (9cb9658)
- tests: don't factor tests into coverage scores (4a9bcd4)
Features #
3.1.0-beta.7 - 2020-06-04 #
3.1.0-beta.5 - 2020-05-10 #
3.1.0-beta.4 - 2020-04-21 #
3.1.0-beta.3 - 2020-04-20 #
3.1.0-beta.2 - 2020-04-12 #
3.1.0-beta.1 - 2020-03-30 #
3.0.1-beta.2 - 2020-02-14 #
3.0.1-beta.1 - 2020-01-21 #
3.0.0 - 2020-01-13 #
Bug Fixes #
- cache: add value == and hashCode to lazy cache map, fix traversal (617dde7)
- cache: AppLifecycleState.{suspending -> detached} (8bc7b14)
- ci: attempt to fix ci (4fac2e4)
- client: default toEncodable (5f938e4)
- client: export operation and fetch results (5dcbae5)
- client: make fetchMore valid with default original document again (faa3779)
- client: organize exports alphabetically (a322339)
- client: patch fetchMore to write to cache (9cb7474)
- client: use http 0.12.0+4 to fix a wrong content-type header on multipart request on http 0.12.0+3 (ea8822c), closes #525
- client: use noCache for fetchMore, avoiding normalization (da20541)
- docs: remove moved onComplete (31a0d2f)
- switch test to AST from document string (894dc53)
- docs: use ast for examples (d68616e)
- add eager result to stream, rebuild query widget on var change (af89b19)
- bump gql dependency (b55a891)
- don't set default policies on options so defaults are applied (fd95e37)
- exception test cases (001cb48)
- fix issues so example runs on latest stable (87d8feb)
- ignore
*.imland.idea(361fdff) - ignore linting errors from the core (0612d44)
- ignore uri doesn't exist lint error (e14349d)
- individually suppress "deprecated_member_use_from_same_package" only (3879f18)
- individually suppress "deprecated_member_use_from_same_package" only (9216976)
- pass queryId directly instead of ObservableQuery object (405ae24)
- remove analysis_options.yaml as its ineffective (0a8d05d)
- remove equatable package (0c32b14)
- remove equitable package and update tests (dbe4db5)
- subscriptions reconnect (fd8f3d1)
- subscriptions reconnect (c310db2)
- suppress fix: individually suppress "deprecated_member_use_from_same_package" only (511630f)
- temporary disable assertion which is failing (3cf7333)
- update .gitignore with standard flutter paths (892fe36)
- graphql-flutter: replace document string with AST Document (23e40af)
- update starwars example (8aaa99b)
- example: depend on updated angel server, add paging example (609c4ec)
- flutter: prevent observable discarding in
MutationState.didChangeDependencies(baeca25) - flutter: return callback results in case of futures to await (c7d6fd1)
- graphql-flutter: ignore ast errors in the core (3b16f3f)
- packaging: update rxdart and sdk min versions (1980f22), closes #497
- tests: clobbered tests from library-level exceptions (f76e165)
- tests: fix failing tests seemingly to to ast-switch (664fdd1)
- use AST for graphql client example (edf7df6)
- use case else instead of detached or suspended (9fb5aab)
Features #
- client: add error link (de9714a), closes #419 #440
- client: cache.reset() added (8c4f2e2)
- client: introduce Policies class for options and add defaults to client (fa24aab)
- client: library-level exception handling (20e57bd)
- client: library-level exceptions (8976cfc)
- client: support defining operations from document AST (fa2db11)
- client: support joining multiple links at once (9565244)
- attempt to call mutation callbacks from mutation method (e323a4d)
- better message on UnhandledFailure (eccab11)
- document exception handling (b38e2a3)
- flutter: add mutation callback for onError (1ff0b8f)
- graphql-client: re-export parseString as gql (dcd5508)
- update examples to gql instead of parse string (7b9ac57)
- updating example (1a1bc43)
- use equatable package to make it easier to compare links (a7ed072)
BREAKING CHANGES #
- packaging: projects dependent on old sdk/rxdart versions wouldn't build, there is a way to override rxdart dependency with dependency_override (we don't use Observable features in these places, so it should be compatible with older version) there is no way to override min sdk version outside of a project
- client: replaces result.errors with result.exception
3.0.0-beta.3 - 2020-01-09 #
3.0.0-beta.2 - 2020-01-08 #
Bug Fixes #
BREAKING CHANGES #
- packaging: projects dependent on old sdk/rxdart versions wouldn't build, there is a way to override rxdart dependency with dependency_override (we don't use Observable features in these places, so it should be compatible with older version) there is no way to override min sdk version outside of a project
3.0.0-beta.1 - 2019-12-22 #
Bug Fixes #
- cache: add value == and hashCode to lazy cache map, fix traversal (617dde7)
- cache: AppLifecycleState.{suspending -> detached} (8bc7b14)
- ci: attempt to fix ci (4fac2e4)
- client: default toEncodable (5f938e4)
- client: export operation and fetch results (5dcbae5)
- client: make fetchMore valid with default original document again (faa3779)
- client: organize exports alphabetically (a322339)
- client: patch fetchMore to write to cache (9cb7474)
- client: use noCache for fetchMore, avoiding normalization (da20541)
- docs: remove moved onComplete (31a0d2f)
- docs: use ast for examples (d68616e)
- example: depend on updated angel server, add paging example (609c4ec)
- flutter: prevent observable discarding in
MutationState.didChangeDependencies(baeca25) - flutter: return callback results in case of futures to await (c7d6fd1)
- pass queryId directly instead of ObservableQuery object (405ae24)
- graphql-flutter: ignore ast errors in the core (3b16f3f)
- add eager result to stream, rebuild query widget on var change (af89b19)
- bump gql dependency (b55a891)
- don't set default policies on options so defaults are applied (fd95e37)
- exception test cases (001cb48)
- fix issues so example runs on latest stable (87d8feb)
- ignore
*.imland.idea(361fdff) - ignore linting errors from the core (0612d44)
- ignore uri doesn't exist lint error (e14349d)
- individually suppress "deprecated_member_use_from_same_package" only (3879f18)
- individually suppress "deprecated_member_use_from_same_package" only (9216976)
- remove analysis_options.yaml as its ineffective (0a8d05d)
- remove equatable package (0c32b14)
- remove equitable package and update tests (dbe4db5)
- subscriptions reconnect (c310db2)
- subscriptions reconnect (fd8f3d1)
- suppress fix: individually suppress "deprecated_member_use_from_same_package" only (511630f)
- switch test to AST from document string (894dc53)
- temporary disable assertion which is failing (3cf7333)
- update .gitignore with standard flutter paths (892fe36)
- update starwars example (8aaa99b)
- use AST for graphql client example (edf7df6)
- graphql-flutter: replace document string with AST Document (23e40af)
- tests: clobbered tests from library-level exceptions (f76e165)
- tests: fix failing tests seemingly to to ast-switch (664fdd1)
- use case else instead of detached or suspended (9fb5aab)
Features #
- client: add error link (de9714a), closes #419 #440
- client: cache.reset() added (8c4f2e2)
- client: introduce Policies class for options and add defaults to client (fa24aab)
- client: library-level exception handling (20e57bd)
- client: library-level exceptions (8976cfc)
- client: support defining operations from document AST (fa2db11)
- client: support joining multiple links at once (9565244)
- attempt to call mutation callbacks from mutation method (e323a4d)
- better message on UnhandledFailure (eccab11)
- document exception handling (b38e2a3)
- flutter: add mutation callback for onError (1ff0b8f)
- graphql-client: re-export parseString as gql (dcd5508)
- update examples to gql instead of parse string (7b9ac57)
- updating example (1a1bc43)
- use equatable package to make it easier to compare links (a7ed072)
BREAKING CHANGES #
- client: replaces result.errors with result.exception
See GitHub Releases.
-
Loosened
initPayloadtodynamicto support many use-cases, RemovedInitOperation's excessive and inconsistent json encoding. Old implmentation can still be utilized aslegacyInitPayloaduntil deprecation -
Fixed broken anonymous operations