smartSubscription: trueto a query field creates a field of the same name on the
subscribeoption is optional, and shows how a field can register a subscription.
Pollthat is returned in the subscription. When the query is updated to fetch a new set of results because a subscription event fired, the subscribe call will be called again for each poll in the new result set.
filterfunction will filter the events, any only cause a re-fetch if it returns true.
invalidateCacheis called before refetching data, to allow any cache invalidation to happen so that when the new data is loaded, results are not stale.
refetchenables directly refetching the current object. When refetch is provided and a subscription event fires for the current object, or any of its children, other parts of the query that are not dependents of this object will no be refetched.
invalidateCachefunctions when registering a subscription. Rather than passing a
refetchfunction, you can set
truein the field options. This will re-run the current resolve function to update it (and it's children) without having to re-run the rest of the query.
invalidateCacheis typed as
unknown. This should be improved in the future.