-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TM-1531] add job connection #745
base: feat/TM-1531-add-job-service
Are you sure you want to change the base?
[TM-1531] add job connection #745
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick review pass to hopefully nudge you closer to the right direction.
return (delayedJobs != null && delayedJobs.length > 0) || hasLoadFailed || isLoading; | ||
}; | ||
|
||
const delayedJobsConnection: Connection<DelayedJobsConnection, DelayedJobsProps> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These props aren't used, no reason to include them.
const delayedJobsLoadFailedSelector = (store: ApiDataStore, { uuid }: DelayedJobsProps) => { | ||
const variables: DelayedJobsFindVariables = { | ||
pathParams: { uuid } | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the API request doesn't use these path params, the load failed selector shouldn't either. The params to those two must always match for this feature to function.
selector: selectorCache( | ||
props => props.uuid, | ||
props => | ||
createSelector( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are no props, the selector cache isn't needed - it's only needed when there are props to differentiate different selectors. The selector
here can just receive createSelector
add the connection to pull the list of jobs