The useSubscription hook using the AppSync link does not work correctly. Specifically, it does not implement the onComplete event which is defined by Apollo documentation. You can reproduce this by simply adding an onComplete handler to any subscription. This is important because there is no other way know when the subscription has been established. It would be nice to send this event.
I can try to make these changes if somebody could point me in the correct direction in the codebase.
Example:
const { data, loading, error } = useSubscription<TData, TVariables>(
subscription,
{
variables,
onError,
onComplete: () => {
console.log('😵😵😵😵😵😵😵😵😵'); // <---- this never gets called :/
}
}
);
The useSubscription hook using the AppSync link does not work correctly. Specifically, it does not implement the
onCompleteevent which is defined by Apollo documentation. You can reproduce this by simply adding anonCompletehandler to any subscription. This is important because there is no other way know when the subscription has been established. It would be nice to send this event.I can try to make these changes if somebody could point me in the correct direction in the codebase.
Example: