Open tomasonjo opened 4 years ago
Looking good.
Place
could do with a human-readable name.
We could also get fancy with a custom uid
field on PlaceDay to make it easier to lookup a certain day.
As long as the mutations take an input
payload, we're good.
We're thinking that PlaceDays
will get merged-in when a new log entry is added (so modifications to the LogContact
mutation, but do you think there's a better way?
I added the name to the place... I was thinking the id of the placeDay could be place name + date for faster lookup if needed. We don't really need two separate ids?
To me it comes more natural to have logContact and logPlace separate... you might have met with a person somewhere... but you might have went shopping and met no one.
Depends how you want to enforce data entry on frontend... can you meet someone and not not input place... can you go places and not contact people... I would split them into more queries for the sake of simplicity instead of having a bunch of case statement in the cypher query... have some cases statement in JS :)
I added the name to the place... I was thinking the id of the placeDay could be place name + date for faster lookup if needed. We don't really need two separate ids?
Agreed.
To me it comes more natural to have logContact and logPlace separate... you might have met with a person somewhere... but you might have went shopping and met no one.
Agreed for the same reason you've given.
Depends how you want to enforce data entry on frontend... can you meet someone and not not input place... can you go places and not contact people... I would split them into more queries for the sake of simplicity instead of having a bunch of case statement in the cypher query... have some cases statement in JS :)
All for multiple, simpler mutations. As we won't know which mutations will be called first (LogContact
or LogPlace
) it'd be great if they both MERGED the same :LogEntries
by ID.
We'll have to think about editing these entries too: "Oh I said I met Matthew, but I meant John" and "I said I went to Safeway but I meant 7-eleven".
Excited to see where we take this.
Thanks for your help.
@all-contributors please add @tomasonjo for code
@mmmoli
I've put up a pull request to add @tomasonjo! :tada:
I have added the place and placeDay types in the schema...
Don't mind the cypher query just yet as we can fix it.
Anyway, do you want to add any fields to these two types, and do you have in mind how would the input for mutation look like?