Releases: jointoucan/finch-graphql
Finch GraphQL external usage with ports fixed!
Finch GraphQL Client v3.2.0
What's Changed
This update adds in a reconnect mechanism for ports when I port message keeps timing out. I have seen this issue crop up in application where the port is disconnected from the background process when the background gets suspended. The onDisconnect
listener does not fire so it does not reconnect.
Usage
This mechanism will automatically happen after 10 timeouts, but you can set how timeouts can happen before attempting to reconnect.
const client = new FinchClient({
maxPortTimeoutCount: 2, // Will reconnect after 2 timeouts
useMessages: false, // Only works with ports
})
Shout out to @mikeyamato for all the new contributions.
Messages Timeline
What's new
This release of the extension, now in the Chrome Web Store, add a new feature to messages, Timelines! This feature is not a full-fledged timeline you would see in the network tab of the browser but adds a lot of visuals to how the extension is running. It's in Beta and there are some known issues, but it has got to a point where it adds more value than it hurts. Check it out today.
All Changes
- Fix extension list on initial install by @jcblw in #265
- Devtools timeline by @jcblw in #271
- [bug] wrap connection listener in a try/catch by @mikeyamato in #272
- Fix issue with GraphiQL not being able to query extension by @jcblw in #274
New Contributors
- @mikeyamato made their first contribution in #272
Full Changelog: https://github.com/jointoucan/finch-graphql/compare/[email protected]
New method to handle external port messages on Firefox/Safari
This adds a new method to support connecting to ports from external sources when using Firefox, and Safari. The reason this did not work before is that the existing listener did not support using the client.
The reason there is a new method instead of using the existing one is that the naming was off, due to the method being written when using document events, and since it now used postMessage, the name was changed to reflect that, as well as the new options added.
Finch GraphQL support for ports!
Finch v3.x makes some major changes on how the client scripts are able to connect to the FinchApi. Prior to v3 all connections would be via async messaging. This is still currently supported, but now the default behavior is to use port messaging. This not only removes some overhead of async messages but also will allow for things like GraphQL subscriptions now that the message passing allows pushing messages to the client.
Support for these connections will be in version v1.7.x of the dev tools which should be available soon.
Query polling in hooks v2.1.0
This release allows for polling in query hooks. This makes it so you can periodically check for data to be updated from the background.
...
const { data, loading, error } = useQuery(query, { pollInterval: 3000 }]; // auto polling
...
Check out more advanced methods of polling.
https://jointoucan.github.io/finch-graphql/docs/react-ref#usequery