You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we should add a table to the project entity called associatedCauses. this table will keep track of all the causes a given project is associated with, allowing project owners and potential donors to discover Causes this project is related to
this should be an array of objects containing some information related to all of the Causes a given projects is associated with. we should make sure this is available under projectBySlug, projectsByUserId and projectById queries
the associatedCauses object should have 3 subfields available in the query with information related to each cause.
id
title
slug
in addition we should then update the mutations we use when a cause owner creates or edits a cause so that this field in the project entity is adjusted
when a cause owner creates a cause with some projects included we should add that cause to the associatedCauses field for those projects
when a cause owner edits a cause and adds some new projects included we should add that cause to the associatedCauses field for those projects
when a cause owner edits a cause and REMOVES some projects included we should remove that cause to the associatedCauses field for those given projects
LASTLY - we should prepare a migration script that will update those fields so the associatedCauses fields for all projects are up to date with the current cause<>project relationships
to summarize
create table for associatedCauses
attach to specified existing queries
update cause edit/create mutations to handle modifying this project data
create and run migration script to update project data for associatedCauses
AC
can query projectBySlug with associatedCauses object that has id, slug, title properties
can query projectsByUserId with associatedCauses object that has id, slug, title properties
can query projectById with associatedCauses object that has id, slug, title properties
data returned in associatedCauses is correct, based on which causes a project is associated with
creating a new cause correctly updates projects' associatedCauses field for given projects included in cause, the newly created cause shows up in this field
editing a cause and adding some projects correctly updates projects' associatedCauses field for given projects included in cause, the edited cause shows up in this field
editing a cause and REMOVING some projects correctly updates projects' associatedCauses field for given projects included in cause, the edited cause DOES NOT show up in this field
we should add a table to the project entity called
associatedCauses. this table will keep track of all the causes a given project is associated with, allowing project owners and potential donors to discover Causes this project is related tothis should be an array of objects containing some information related to all of the Causes a given projects is associated with. we should make sure this is available under
projectBySlug,projectsByUserIdandprojectByIdqueriesthe
associatedCausesobject should have 3 subfields available in the query with information related to each cause.in addition we should then update the mutations we use when a cause owner creates or edits a cause so that this field in the project entity is adjusted
associatedCausesfield for those projectsassociatedCausesfield for those projectsassociatedCausesfield for those given projectsLASTLY - we should prepare a migration script that will update those fields so the
associatedCausesfields for all projects are up to date with the current cause<>project relationshipsto summarize
associatedCausesassociatedCausesAC
projectBySlugwithassociatedCausesobject that hasid,slug,titlepropertiesprojectsByUserIdwithassociatedCausesobject that hasid,slug,titlepropertiesprojectByIdwithassociatedCausesobject that hasid,slug,titlepropertiesassociatedCausesis correct, based on which causes a project is associated withassociatedCausesfield for given projects included in cause, the newly created cause shows up in this fieldassociatedCausesfield for given projects included in cause, the edited cause shows up in this fieldassociatedCausesfield for given projects included in cause, the edited cause DOES NOT show up in this field