@ulfgebhardt: The reason why the test case was failing is pretty
obvious. You forgot to create a user that you want to update. If there
is no user to update, then you get an empty response.
@ulfgebhardt: I moved the spec also in the right directory. You're
testing resolvers, so that's where I moved the `.spec` file.
@ulfgebhardt @mattwr18 @tirokk
Here's how I imagined the data validation middleware. If we roll our own
input validations I would suggest to put them all in one place.
@ulfgebhardt this commit is a great example of how tests can speed you
up: Since I can rely on existing tests, I don't have to check the validations
manually. With tests you can refactor with confidence! 👍
See:
https://github.com/Human-Connection/Human-Connection/pull/478/files#r281267486
> We found the reason for it: If you have an exclamation mark in the schema e.g.
> email! and the response would e.g. expect the email for each User object, and
> the server does not have an email for the client, then the entire User object
> gets nullified.
Optimised tests and Vue for add Social Media a bit.
Added localisation.
Finished this commit together with @mattwr18 !!!
Thank you so much dude! You did great stuff …
- using the custom CommentByPost Query was not returning the author of the Post, therefore the users avatar was not showing up
- there are some weird bugs with the comments, if you dblclick on the button, two comments with the same content are created
- sometimes the comments appear as the bottom of the list, sometimes they appear three comments from the bottom(?)
- in the first instance, we will be importing posts/comments from the alpha, so to maintain consistency, we've ordered them alike. In the future, we could support user choice of order.
- Gives more space for HcCommentForm, user can see comments added to list, helps with mobile responsiveness
Co-authored-by: Tirokk <wolle.huss@pjannto.com>
Co-authored-by: Mike Aono <aonomike@gmail.com>
cc @mattwr18 @tirokk@ulfgebhardt @appinteractive
The factories don't use string interpolation now but they use variables.
This resolves some errors of escaping strings when you send html along
with `post.content`. It is much cleaner, too.
- due to changes made to comments factories, which caused failures
- to use new custom CreateComment resolver syntax to relate a comment to post by passing in the postId
- add postId to type Comment
- remove it from params to create node without postId
- fix tests
Co-authored-by: Robert Schäfer <roschaefer@users.noreply.github.com>
Co-Authored-By: Tirokk <wolle.huss@pjannto.com>
Co-Authored-By: Mike Aono <aonomike@gmail.com>
- Had difficulty adding a relationship with one custom resolver, if id for comment was not passed in, the comment was not created, hard coding it in also wasn't a good solution
Note that we don't create duplicate notifications. I made use of the behaviour
of XSS-middleware: It removes all css classes from `<a>` anchors. Because
notifications rely on a css class `mention` which gets removed in a later
middleware, this gives us a nice behaviour for re-notifications without creating
duplicates. The downside is that it creates dependencies between middlewares and
it's not that obvious at all.
cc @mattwr18 @ulfgebhardt @appinteractive @Tirokk