* refactor(graphql): Introduce image type
* Undo changes to .travis.yml
* chore: Upgrade travis to node LTS
- URL is available since v10
* chore: use lts
Co-authored-by: mattwr18 <mattwr18@gmail.com>
- it's good to return the pinnedAt date for ordering
- move test to a better describe block
- remove unneeded outdated variables from graphql/PostQuery UpdatePost
- fix indentation in Post.gql
- fix pinnedAt to return pinned.createdAt, not post.createdAt
Co-authored-by: Mike Aono <aonomike@gmail.com>
- following @roschaefer's PR review suggestions
- simplify UpdatePost by using pinPost/unpinPost
- did not remove filtering because attempting to have two queries caused
problems as well to do with duplicate records, etc... and it's working
now
- Add pin/unpin post to content menu
- Update apollo cache to reactively unpin
- Update apollo cache in root path to re-order Posts
- Order with pinned post first
- Start setting up filters, so that the pinned post is always the first
post visible
@mattwr18 I prefer (I believe it's even best practice) that a delete
mutation should return the deleted object. If you run the delete
mutation again, it should return `null` because there is no object like
that anymore. That way the client knows if a delete mutation has changed
any state in the database.
Also I fixed another bug in the resolver. If your graphql mutation looks
like this:
```gql
mutation {
RemovePostEmotions(to:{ id:"p15"}, data:{emotion: angry}) {
from {
id
name
}
to {
id
title
}
emotion
}
}
```
Then you get errors because your resolver does not return the name for
the user or the title for the post anymore. Just use spread operator...
and it's fixed.