mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Merge pull request #4530 from Ocelot-Social-Community/dependabot/npm_and_yarn/backend/prettier-2.3.2
Bump prettier from 2.2.0 to 2.3.2 in /backend
This commit is contained in:
commit
deb0bc39e7
@ -134,7 +134,7 @@
|
||||
"eslint-plugin-standard": "~4.0.1",
|
||||
"jest": "~25.3.0",
|
||||
"nodemon": "~2.0.2",
|
||||
"prettier": "~2.2.0",
|
||||
"prettier": "~2.3.2",
|
||||
"rosie": "^2.0.1",
|
||||
"supertest": "~4.0.2"
|
||||
},
|
||||
|
||||
@ -137,100 +137,93 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
}),
|
||||
])
|
||||
|
||||
const [
|
||||
peterLustig,
|
||||
bobDerBaumeister,
|
||||
jennyRostock,
|
||||
huey,
|
||||
dewey,
|
||||
louie,
|
||||
dagobert,
|
||||
] = await Promise.all([
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u1',
|
||||
name: 'Peter Lustig',
|
||||
slug: 'peter-lustig',
|
||||
role: 'admin',
|
||||
},
|
||||
{
|
||||
email: 'admin@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u2',
|
||||
name: 'Bob der Baumeister',
|
||||
slug: 'bob-der-baumeister',
|
||||
role: 'moderator',
|
||||
},
|
||||
{
|
||||
email: 'moderator@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u3',
|
||||
name: 'Jenny Rostock',
|
||||
slug: 'jenny-rostock',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'user@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u4',
|
||||
name: 'Huey',
|
||||
slug: 'huey',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'huey@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u5',
|
||||
name: 'Dewey',
|
||||
slug: 'dewey',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'dewey@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u6',
|
||||
name: 'Louie',
|
||||
slug: 'louie',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'louie@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u7',
|
||||
name: 'Dagobert',
|
||||
slug: 'dagobert',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'dagobert@example.org',
|
||||
},
|
||||
),
|
||||
])
|
||||
const [peterLustig, bobDerBaumeister, jennyRostock, huey, dewey, louie, dagobert] =
|
||||
await Promise.all([
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u1',
|
||||
name: 'Peter Lustig',
|
||||
slug: 'peter-lustig',
|
||||
role: 'admin',
|
||||
},
|
||||
{
|
||||
email: 'admin@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u2',
|
||||
name: 'Bob der Baumeister',
|
||||
slug: 'bob-der-baumeister',
|
||||
role: 'moderator',
|
||||
},
|
||||
{
|
||||
email: 'moderator@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u3',
|
||||
name: 'Jenny Rostock',
|
||||
slug: 'jenny-rostock',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'user@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u4',
|
||||
name: 'Huey',
|
||||
slug: 'huey',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'huey@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u5',
|
||||
name: 'Dewey',
|
||||
slug: 'dewey',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'dewey@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u6',
|
||||
name: 'Louie',
|
||||
slug: 'louie',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'louie@example.org',
|
||||
},
|
||||
),
|
||||
Factory.build(
|
||||
'user',
|
||||
{
|
||||
id: 'u7',
|
||||
name: 'Dagobert',
|
||||
slug: 'dagobert',
|
||||
role: 'user',
|
||||
},
|
||||
{
|
||||
email: 'dagobert@example.org',
|
||||
},
|
||||
),
|
||||
])
|
||||
|
||||
await Promise.all([
|
||||
peterLustig.relateTo(Berlin, 'isIn'),
|
||||
@ -561,7 +554,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
const hashtagAndMention1 =
|
||||
'The new physics of <a class="hashtag" data-hashtag-id="QuantenFlussTheorie" href="/?hashtag=QuantenFlussTheorie">#QuantenFlussTheorie</a> can explain <a class="hashtag" data-hashtag-id="QuantumGravity" href="/?hashtag=QuantumGravity">#QuantumGravity</a>! <a class="mention" data-mention-id="u1" href="/profile/u1">@peter-lustig</a> got that already. ;-)'
|
||||
const createPostMutation = gql`
|
||||
mutation($id: ID, $title: String!, $content: String!, $categoryIds: [ID]) {
|
||||
mutation ($id: ID, $title: String!, $content: String!, $categoryIds: [ID]) {
|
||||
CreatePost(id: $id, title: $title, content: $content, categoryIds: $categoryIds) {
|
||||
id
|
||||
}
|
||||
@ -618,7 +611,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
const mentionInComment2 =
|
||||
'Did <a class="mention" data-mention-id="u1" href="/profile/u1">@peter-lustig</a> tell you?'
|
||||
const createCommentMutation = gql`
|
||||
mutation($id: ID, $postId: ID!, $content: String!) {
|
||||
mutation ($id: ID, $postId: ID!, $content: String!) {
|
||||
CreateComment(id: $id, postId: $postId, content: $content) {
|
||||
id
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ const driver = getDriver()
|
||||
const neode = getNeode()
|
||||
const categoryIds = ['cat9']
|
||||
const createPostMutation = gql`
|
||||
mutation($id: ID, $title: String!, $postContent: String!, $categoryIds: [ID]!) {
|
||||
mutation ($id: ID, $title: String!, $postContent: String!, $categoryIds: [ID]!) {
|
||||
CreatePost(id: $id, title: $title, content: $postContent, categoryIds: $categoryIds) {
|
||||
id
|
||||
title
|
||||
@ -22,7 +22,7 @@ const createPostMutation = gql`
|
||||
}
|
||||
`
|
||||
const updatePostMutation = gql`
|
||||
mutation($id: ID!, $title: String!, $postContent: String!, $categoryIds: [ID]!) {
|
||||
mutation ($id: ID!, $title: String!, $postContent: String!, $categoryIds: [ID]!) {
|
||||
UpdatePost(id: $id, content: $postContent, title: $title, categoryIds: $categoryIds) {
|
||||
title
|
||||
content
|
||||
@ -95,7 +95,7 @@ describe('hashtags', () => {
|
||||
</p>
|
||||
`
|
||||
const postWithHastagsQuery = gql`
|
||||
query($id: ID) {
|
||||
query ($id: ID) {
|
||||
Post(id: $id) {
|
||||
tags {
|
||||
id
|
||||
|
||||
@ -29,7 +29,7 @@ afterAll(async () => {
|
||||
})
|
||||
|
||||
const createPostMutation = gql`
|
||||
mutation($title: String!, $content: String!, $categoryIds: [ID]) {
|
||||
mutation ($title: String!, $content: String!, $categoryIds: [ID]) {
|
||||
CreatePost(title: $title, content: $content, categoryIds: $categoryIds) {
|
||||
language
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ const driver = getDriver()
|
||||
const neode = getNeode()
|
||||
const categoryIds = ['cat9']
|
||||
const createPostMutation = gql`
|
||||
mutation($id: ID, $title: String!, $postContent: String!, $categoryIds: [ID]!) {
|
||||
mutation ($id: ID, $title: String!, $postContent: String!, $categoryIds: [ID]!) {
|
||||
CreatePost(id: $id, title: $title, content: $postContent, categoryIds: $categoryIds) {
|
||||
id
|
||||
title
|
||||
@ -19,7 +19,7 @@ const createPostMutation = gql`
|
||||
}
|
||||
`
|
||||
const updatePostMutation = gql`
|
||||
mutation($id: ID!, $title: String!, $postContent: String!, $categoryIds: [ID]!) {
|
||||
mutation ($id: ID!, $title: String!, $postContent: String!, $categoryIds: [ID]!) {
|
||||
UpdatePost(id: $id, content: $postContent, title: $title, categoryIds: $categoryIds) {
|
||||
title
|
||||
content
|
||||
@ -27,7 +27,7 @@ const updatePostMutation = gql`
|
||||
}
|
||||
`
|
||||
const createCommentMutation = gql`
|
||||
mutation($id: ID, $postId: ID!, $commentContent: String!) {
|
||||
mutation ($id: ID, $postId: ID!, $commentContent: String!) {
|
||||
CreateComment(id: $id, postId: $postId, content: $commentContent) {
|
||||
id
|
||||
content
|
||||
@ -80,7 +80,7 @@ afterEach(async () => {
|
||||
|
||||
describe('notifications', () => {
|
||||
const notificationQuery = gql`
|
||||
query($read: Boolean) {
|
||||
query ($read: Boolean) {
|
||||
notifications(read: $read, orderBy: updatedAt_desc) {
|
||||
read
|
||||
reason
|
||||
@ -367,7 +367,7 @@ describe('notifications', () => {
|
||||
describe('if the notification was marked as read earlier', () => {
|
||||
const markAsReadAction = async () => {
|
||||
const mutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
markAsRead(id: $id) {
|
||||
read
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ describe('authorization', () => {
|
||||
|
||||
describe('access email address', () => {
|
||||
const userQuery = gql`
|
||||
query($name: String) {
|
||||
query ($name: String) {
|
||||
User(name: $name) {
|
||||
email
|
||||
}
|
||||
@ -165,7 +165,7 @@ describe('authorization', () => {
|
||||
|
||||
describe('access Signup', () => {
|
||||
const signupMutation = gql`
|
||||
mutation($email: String!, $inviteCode: String) {
|
||||
mutation ($email: String!, $inviteCode: String) {
|
||||
Signup(email: $email, inviteCode: $inviteCode) {
|
||||
email
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ describe('slugifyMiddleware', () => {
|
||||
describe('CreatePost', () => {
|
||||
const categoryIds = ['cat9']
|
||||
const createPostMutation = gql`
|
||||
mutation($title: String!, $content: String!, $categoryIds: [ID]!, $slug: String) {
|
||||
mutation ($title: String!, $content: String!, $categoryIds: [ID]!, $slug: String) {
|
||||
CreatePost(title: $title, content: $content, categoryIds: $categoryIds, slug: $slug) {
|
||||
slug
|
||||
}
|
||||
@ -164,7 +164,7 @@ describe('slugifyMiddleware', () => {
|
||||
|
||||
describe('SignupVerification', () => {
|
||||
const mutation = gql`
|
||||
mutation(
|
||||
mutation (
|
||||
$password: String!
|
||||
$email: String!
|
||||
$name: String!
|
||||
|
||||
@ -10,7 +10,7 @@ const driver = getDriver()
|
||||
const neode = getNeode()
|
||||
|
||||
const postQuery = gql`
|
||||
query($id: ID) {
|
||||
query ($id: ID) {
|
||||
Post(id: $id) {
|
||||
clickedCount
|
||||
}
|
||||
|
||||
@ -17,14 +17,14 @@ let authenticatedUser,
|
||||
commentingUser
|
||||
|
||||
const createCommentMutation = gql`
|
||||
mutation($id: ID, $postId: ID!, $content: String!) {
|
||||
mutation ($id: ID, $postId: ID!, $content: String!) {
|
||||
CreateComment(id: $id, postId: $postId, content: $content) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`
|
||||
const updateCommentMutation = gql`
|
||||
mutation($content: String!, $id: ID!) {
|
||||
mutation ($content: String!, $id: ID!) {
|
||||
UpdateComment(content: $content, id: $id) {
|
||||
id
|
||||
}
|
||||
@ -32,7 +32,7 @@ const updateCommentMutation = gql`
|
||||
`
|
||||
|
||||
const reportMutation = gql`
|
||||
mutation($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) {
|
||||
mutation ($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) {
|
||||
fileReport(
|
||||
resourceId: $resourceId
|
||||
reasonCategory: $reasonCategory
|
||||
@ -43,7 +43,7 @@ const reportMutation = gql`
|
||||
}
|
||||
`
|
||||
const reviewMutation = gql`
|
||||
mutation($resourceId: ID!, $disable: Boolean, $closed: Boolean) {
|
||||
mutation ($resourceId: ID!, $disable: Boolean, $closed: Boolean) {
|
||||
review(resourceId: $resourceId, disable: $disable, closed: $closed) {
|
||||
createdAt
|
||||
updatedAt
|
||||
@ -52,7 +52,7 @@ const reviewMutation = gql`
|
||||
`
|
||||
|
||||
const updateUserMutation = gql`
|
||||
mutation($id: ID!, $name: String) {
|
||||
mutation ($id: ID!, $name: String) {
|
||||
UpdateUser(id: $id, name: $name) {
|
||||
name
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ afterEach(async () => {
|
||||
})
|
||||
|
||||
const createCommentMutation = gql`
|
||||
mutation($id: ID, $postId: ID!, $content: String!) {
|
||||
mutation ($id: ID, $postId: ID!, $content: String!) {
|
||||
CreateComment(id: $id, postId: $postId, content: $content) {
|
||||
id
|
||||
content
|
||||
@ -128,7 +128,7 @@ describe('CreateComment', () => {
|
||||
|
||||
describe('UpdateComment', () => {
|
||||
const updateCommentMutation = gql`
|
||||
mutation($content: String!, $id: ID!) {
|
||||
mutation ($content: String!, $id: ID!) {
|
||||
UpdateComment(content: $content, id: $id) {
|
||||
id
|
||||
content
|
||||
@ -220,7 +220,7 @@ describe('UpdateComment', () => {
|
||||
|
||||
describe('DeleteComment', () => {
|
||||
const deleteCommentMutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
DeleteComment(id: $id) {
|
||||
id
|
||||
content
|
||||
|
||||
@ -9,7 +9,7 @@ const instance = getNeode()
|
||||
const driver = getDriver()
|
||||
|
||||
const updateDonationsMutation = gql`
|
||||
mutation($goal: Int, $progress: Int) {
|
||||
mutation ($goal: Int, $progress: Int) {
|
||||
UpdateDonations(goal: $goal, progress: $progress) {
|
||||
id
|
||||
goal
|
||||
|
||||
@ -37,7 +37,7 @@ afterEach(async () => {
|
||||
|
||||
describe('AddEmailAddress', () => {
|
||||
const mutation = gql`
|
||||
mutation($email: String!) {
|
||||
mutation ($email: String!) {
|
||||
AddEmailAddress(email: $email) {
|
||||
email
|
||||
verifiedAt
|
||||
@ -142,7 +142,7 @@ describe('AddEmailAddress', () => {
|
||||
|
||||
describe('VerifyEmailAddress', () => {
|
||||
const mutation = gql`
|
||||
mutation($email: String!, $nonce: String!) {
|
||||
mutation ($email: String!, $nonce: String!) {
|
||||
VerifyEmailAddress(email: $email, nonce: $nonce) {
|
||||
email
|
||||
createdAt
|
||||
@ -309,7 +309,7 @@ describe('VerifyNonce', () => {
|
||||
})
|
||||
|
||||
const verifyNonceQuery = gql`
|
||||
query($email: String!, $nonce: String!) {
|
||||
query ($email: String!, $nonce: String!) {
|
||||
VerifyNonce(email: $email, nonce: $nonce)
|
||||
}
|
||||
`
|
||||
|
||||
@ -37,8 +37,7 @@ const babyLovesCatEmbedResponse = new Response(
|
||||
thumbnail_height: 360,
|
||||
provider_url: 'https://www.youtube.com/',
|
||||
thumbnail_width: 480,
|
||||
html:
|
||||
'<iframe width="480" height="270" src="https://www.youtube.com/embed/qkdXAtO40Fo?start=18&feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
|
||||
html: '<iframe width="480" height="270" src="https://www.youtube.com/embed/qkdXAtO40Fo?start=18&feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
|
||||
thumbnail_url: 'https://i.ytimg.com/vi/qkdXAtO40Fo/hqdefault.jpg',
|
||||
version: '1.0',
|
||||
author_name: 'Merkley Family',
|
||||
@ -57,7 +56,7 @@ describe('Query', () => {
|
||||
})
|
||||
const { query } = createTestClient(server)
|
||||
const embed = gql`
|
||||
query($url: String!) {
|
||||
query ($url: String!) {
|
||||
embed(url: $url) {
|
||||
type
|
||||
title
|
||||
@ -204,8 +203,7 @@ Have all the information for the brand in separate config files. Set these defau
|
||||
video: null,
|
||||
lang: 'de',
|
||||
sources: ['resource', 'oembed'],
|
||||
html:
|
||||
'<iframe width="480" height="270" src="https://www.youtube.com/embed/qkdXAtO40Fo?start=18&feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
|
||||
html: '<iframe width="480" height="270" src="https://www.youtube.com/embed/qkdXAtO40Fo?start=18&feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
|
||||
},
|
||||
},
|
||||
errors: undefined,
|
||||
|
||||
@ -16,7 +16,7 @@ let user2
|
||||
let variables
|
||||
|
||||
const mutationFollowUser = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
followUser(id: $id) {
|
||||
name
|
||||
followedBy {
|
||||
@ -29,7 +29,7 @@ const mutationFollowUser = gql`
|
||||
`
|
||||
|
||||
const mutationUnfollowUser = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
unfollowUser(id: $id) {
|
||||
name
|
||||
followedBy {
|
||||
@ -42,7 +42,7 @@ const mutationUnfollowUser = gql`
|
||||
`
|
||||
|
||||
const userQuery = gql`
|
||||
query($id: ID) {
|
||||
query ($id: ID) {
|
||||
User(id: $id) {
|
||||
followedBy {
|
||||
id
|
||||
|
||||
@ -11,7 +11,7 @@ let mutate
|
||||
const driver = getDriver()
|
||||
|
||||
const generateInviteCodeMutation = gql`
|
||||
mutation($expiresAt: String = null) {
|
||||
mutation ($expiresAt: String = null) {
|
||||
GenerateInviteCode(expiresAt: $expiresAt) {
|
||||
code
|
||||
createdAt
|
||||
@ -31,7 +31,7 @@ const myInviteCodesQuery = gql`
|
||||
`
|
||||
|
||||
const isValidInviteCodeQuery = gql`
|
||||
query($code: ID!) {
|
||||
query ($code: ID!) {
|
||||
isValidInviteCode(code: $code)
|
||||
}
|
||||
`
|
||||
|
||||
@ -31,7 +31,7 @@ describe('resolvers', () => {
|
||||
describe('custom mutation, not handled by neo4j-graphql-js', () => {
|
||||
let variables
|
||||
const updateUserMutation = gql`
|
||||
mutation($id: ID!, $name: String) {
|
||||
mutation ($id: ID!, $name: String) {
|
||||
UpdateUser(id: $id, name: $name) {
|
||||
name
|
||||
location {
|
||||
|
||||
@ -16,7 +16,7 @@ let mutate,
|
||||
closeReportVariables
|
||||
|
||||
const reviewMutation = gql`
|
||||
mutation($resourceId: ID!, $disable: Boolean, $closed: Boolean) {
|
||||
mutation ($resourceId: ID!, $disable: Boolean, $closed: Boolean) {
|
||||
review(resourceId: $resourceId, disable: $disable, closed: $closed) {
|
||||
createdAt
|
||||
updatedAt
|
||||
|
||||
@ -139,7 +139,7 @@ describe('given some notifications', () => {
|
||||
|
||||
describe('notifications', () => {
|
||||
const notificationQuery = gql`
|
||||
query($read: Boolean, $orderBy: NotificationOrdering) {
|
||||
query ($read: Boolean, $orderBy: NotificationOrdering) {
|
||||
notifications(read: $read, orderBy: $orderBy) {
|
||||
from {
|
||||
__typename
|
||||
@ -249,7 +249,7 @@ describe('given some notifications', () => {
|
||||
const deletePostAction = async () => {
|
||||
authenticatedUser = await author.toJson()
|
||||
const deletePostMutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
DeletePost(id: $id) {
|
||||
id
|
||||
deleted
|
||||
@ -284,7 +284,7 @@ describe('given some notifications', () => {
|
||||
|
||||
describe('markAsRead', () => {
|
||||
const markAsReadMutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
markAsRead(id: $id) {
|
||||
from {
|
||||
__typename
|
||||
|
||||
@ -55,7 +55,7 @@ describe('passwordReset', () => {
|
||||
|
||||
describe('requestPasswordReset', () => {
|
||||
const mutation = gql`
|
||||
mutation($email: String!) {
|
||||
mutation ($email: String!) {
|
||||
requestPasswordReset(email: $email)
|
||||
}
|
||||
`
|
||||
@ -116,7 +116,7 @@ describe('resetPassword', () => {
|
||||
}
|
||||
|
||||
const mutation = gql`
|
||||
mutation($nonce: String!, $email: String!, $newPassword: String!) {
|
||||
mutation ($nonce: String!, $email: String!, $newPassword: String!) {
|
||||
resetPassword(nonce: $nonce, email: $email, newPassword: $newPassword)
|
||||
}
|
||||
`
|
||||
@ -196,7 +196,7 @@ describe('resetPassword', () => {
|
||||
it('updates password of the user', async () => {
|
||||
await mutate({ mutation, variables })
|
||||
const checkLoginMutation = gql`
|
||||
mutation($email: String!, $password: String!) {
|
||||
mutation ($email: String!, $password: String!) {
|
||||
login(email: $email, password: $password)
|
||||
}
|
||||
`
|
||||
|
||||
@ -16,7 +16,7 @@ const categoryIds = ['cat9', 'cat4', 'cat15']
|
||||
let variables
|
||||
|
||||
const createPostMutation = gql`
|
||||
mutation($id: ID, $title: String!, $content: String!, $language: String, $categoryIds: [ID]) {
|
||||
mutation ($id: ID, $title: String!, $content: String!, $language: String, $categoryIds: [ID]) {
|
||||
CreatePost(
|
||||
id: $id
|
||||
title: $title
|
||||
@ -323,7 +323,7 @@ describe('CreatePost', () => {
|
||||
describe('UpdatePost', () => {
|
||||
let author, newlyCreatedPost
|
||||
const updatePostMutation = gql`
|
||||
mutation($id: ID!, $title: String!, $content: String!, $image: ImageInput) {
|
||||
mutation ($id: ID!, $title: String!, $content: String!, $image: ImageInput) {
|
||||
UpdatePost(id: $id, title: $title, content: $content, image: $image) {
|
||||
id
|
||||
title
|
||||
@ -497,7 +497,7 @@ describe('UpdatePost', () => {
|
||||
describe('pin posts', () => {
|
||||
let author
|
||||
const pinPostMutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
pinPost(id: $id) {
|
||||
id
|
||||
title
|
||||
@ -773,7 +773,7 @@ describe('pin posts', () => {
|
||||
|
||||
it('pinned post appear first even when created before other posts', async () => {
|
||||
const postOrderingQuery = gql`
|
||||
query($orderBy: [_PostOrdering]) {
|
||||
query ($orderBy: [_PostOrdering]) {
|
||||
Post(orderBy: $orderBy) {
|
||||
id
|
||||
pinned
|
||||
@ -816,7 +816,7 @@ describe('pin posts', () => {
|
||||
describe('unpin posts', () => {
|
||||
let pinnedPost
|
||||
const unpinPostMutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
unpinPost(id: $id) {
|
||||
id
|
||||
title
|
||||
@ -928,7 +928,7 @@ describe('unpin posts', () => {
|
||||
describe('DeletePost', () => {
|
||||
let author
|
||||
const deletePostMutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
DeletePost(id: $id) {
|
||||
id
|
||||
deleted
|
||||
@ -1052,14 +1052,14 @@ describe('DeletePost', () => {
|
||||
describe('emotions', () => {
|
||||
let author, postToEmote
|
||||
const PostsEmotionsCountQuery = gql`
|
||||
query($id: ID!) {
|
||||
query ($id: ID!) {
|
||||
Post(id: $id) {
|
||||
emotionsCount
|
||||
}
|
||||
}
|
||||
`
|
||||
const PostsEmotionsQuery = gql`
|
||||
query($id: ID!) {
|
||||
query ($id: ID!) {
|
||||
Post(id: $id) {
|
||||
emotions {
|
||||
emotion
|
||||
@ -1093,7 +1093,7 @@ describe('emotions', () => {
|
||||
|
||||
describe('AddPostEmotions', () => {
|
||||
const addPostEmotionsMutation = gql`
|
||||
mutation($to: _PostInput!, $data: _EMOTEDInput!) {
|
||||
mutation ($to: _PostInput!, $data: _EMOTEDInput!) {
|
||||
AddPostEmotions(to: $to, data: $data) {
|
||||
from {
|
||||
id
|
||||
@ -1210,7 +1210,7 @@ describe('emotions', () => {
|
||||
describe('RemovePostEmotions', () => {
|
||||
let removePostEmotionsVariables, postsEmotionsQueryVariables
|
||||
const removePostEmotionsMutation = gql`
|
||||
mutation($to: _PostInput!, $data: _EMOTEDInput!) {
|
||||
mutation ($to: _PostInput!, $data: _EMOTEDInput!) {
|
||||
RemovePostEmotions(to: $to, data: $data) {
|
||||
from {
|
||||
id
|
||||
@ -1309,13 +1309,13 @@ describe('emotions', () => {
|
||||
let PostsEmotionsByCurrentUserVariables
|
||||
|
||||
const PostsEmotionsCountByEmotionQuery = gql`
|
||||
query($postId: ID!, $data: _EMOTEDInput!) {
|
||||
query ($postId: ID!, $data: _EMOTEDInput!) {
|
||||
PostsEmotionsCountByEmotion(postId: $postId, data: $data)
|
||||
}
|
||||
`
|
||||
|
||||
const PostsEmotionsByCurrentUserQuery = gql`
|
||||
query($postId: ID!) {
|
||||
query ($postId: ID!) {
|
||||
PostsEmotionsByCurrentUser(postId: $postId)
|
||||
}
|
||||
`
|
||||
|
||||
@ -36,7 +36,7 @@ afterEach(async () => {
|
||||
|
||||
describe('Signup', () => {
|
||||
const mutation = gql`
|
||||
mutation($email: String!, $inviteCode: String) {
|
||||
mutation ($email: String!, $inviteCode: String) {
|
||||
Signup(email: $email, inviteCode: $inviteCode) {
|
||||
email
|
||||
}
|
||||
@ -145,7 +145,7 @@ describe('Signup', () => {
|
||||
|
||||
describe('SignupVerification', () => {
|
||||
const mutation = gql`
|
||||
mutation(
|
||||
mutation (
|
||||
$name: String!
|
||||
$password: String!
|
||||
$email: String!
|
||||
|
||||
@ -11,7 +11,7 @@ describe('file a report on a resource', () => {
|
||||
let authenticatedUser, currentUser, mutate, query, moderator, abusiveUser, otherReportingUser
|
||||
const categoryIds = ['cat9']
|
||||
const fileReportMutation = gql`
|
||||
mutation($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) {
|
||||
mutation ($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) {
|
||||
fileReport(
|
||||
resourceId: $resourceId
|
||||
reasonCategory: $reasonCategory
|
||||
@ -42,7 +42,7 @@ describe('file a report on a resource', () => {
|
||||
reasonDescription: 'Violates code of conduct !!!',
|
||||
}
|
||||
const reportsQuery = gql`
|
||||
query($closed: Boolean) {
|
||||
query ($closed: Boolean) {
|
||||
reports(orderBy: createdAt_desc, closed: $closed) {
|
||||
id
|
||||
createdAt
|
||||
@ -74,7 +74,7 @@ describe('file a report on a resource', () => {
|
||||
}
|
||||
`
|
||||
const reviewMutation = gql`
|
||||
mutation($resourceId: ID!, $disable: Boolean, $closed: Boolean) {
|
||||
mutation ($resourceId: ID!, $disable: Boolean, $closed: Boolean) {
|
||||
review(resourceId: $resourceId, disable: $disable, closed: $closed) {
|
||||
createdAt
|
||||
resource {
|
||||
|
||||
@ -76,7 +76,7 @@ describe('rewards', () => {
|
||||
|
||||
describe('reward', () => {
|
||||
const rewardMutation = gql`
|
||||
mutation($from: ID!, $to: ID!) {
|
||||
mutation ($from: ID!, $to: ID!) {
|
||||
reward(badgeKey: $from, userId: $to) {
|
||||
id
|
||||
badges {
|
||||
@ -266,7 +266,7 @@ describe('rewards', () => {
|
||||
}
|
||||
|
||||
const unrewardMutation = gql`
|
||||
mutation($from: ID!, $to: ID!) {
|
||||
mutation ($from: ID!, $to: ID!) {
|
||||
unreward(badgeKey: $from, userId: $to) {
|
||||
id
|
||||
badges {
|
||||
|
||||
@ -28,7 +28,7 @@ afterAll(async () => {
|
||||
})
|
||||
|
||||
const searchQuery = gql`
|
||||
query($query: String!) {
|
||||
query ($query: String!) {
|
||||
searchResults(query: $query, limit: 5) {
|
||||
__typename
|
||||
... on Post {
|
||||
@ -49,7 +49,7 @@ const searchQuery = gql`
|
||||
`
|
||||
|
||||
const searchPostQuery = gql`
|
||||
query($query: String!, $firstPosts: Int, $postsOffset: Int) {
|
||||
query ($query: String!, $firstPosts: Int, $postsOffset: Int) {
|
||||
searchPosts(query: $query, firstPosts: $firstPosts, postsOffset: $postsOffset) {
|
||||
postCount
|
||||
posts {
|
||||
|
||||
@ -9,17 +9,17 @@ const instance = getNeode()
|
||||
const driver = getDriver()
|
||||
|
||||
const mutationShoutPost = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
shout(id: $id, type: Post)
|
||||
}
|
||||
`
|
||||
const mutationUnshoutPost = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
unshout(id: $id, type: Post)
|
||||
}
|
||||
`
|
||||
const queryPost = gql`
|
||||
query($id: ID!) {
|
||||
query ($id: ID!) {
|
||||
Post(id: $id) {
|
||||
id
|
||||
shoutedBy {
|
||||
|
||||
@ -70,7 +70,7 @@ describe('SocialMedia', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
mutation = gql`
|
||||
mutation($url: String!) {
|
||||
mutation ($url: String!) {
|
||||
CreateSocialMedia(url: $url) {
|
||||
id
|
||||
url
|
||||
@ -131,7 +131,7 @@ describe('SocialMedia', () => {
|
||||
describe('ownedBy', () => {
|
||||
beforeEach(() => {
|
||||
mutation = gql`
|
||||
mutation($url: String!) {
|
||||
mutation ($url: String!) {
|
||||
CreateSocialMedia(url: $url) {
|
||||
url
|
||||
ownedBy {
|
||||
@ -162,7 +162,7 @@ describe('SocialMedia', () => {
|
||||
const socialMedia = await setUpSocialMedia()
|
||||
|
||||
mutation = gql`
|
||||
mutation($id: ID!, $url: String!) {
|
||||
mutation ($id: ID!, $url: String!) {
|
||||
UpdateSocialMedia(id: $id, url: $url) {
|
||||
id
|
||||
url
|
||||
@ -225,7 +225,7 @@ describe('SocialMedia', () => {
|
||||
const socialMedia = await setUpSocialMedia()
|
||||
|
||||
mutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
DeleteSocialMedia(id: $id) {
|
||||
id
|
||||
url
|
||||
|
||||
@ -39,7 +39,7 @@ afterAll(async () => {
|
||||
})
|
||||
|
||||
const userDataQuery = gql`
|
||||
query($id: ID!) {
|
||||
query ($id: ID!) {
|
||||
userData(id: $id) {
|
||||
user {
|
||||
id
|
||||
|
||||
@ -171,7 +171,7 @@ describe('currentUser', () => {
|
||||
|
||||
describe('login', () => {
|
||||
const loginMutation = gql`
|
||||
mutation($email: String!, $password: String!) {
|
||||
mutation ($email: String!, $password: String!) {
|
||||
login(email: $email, password: $password)
|
||||
}
|
||||
`
|
||||
@ -287,7 +287,7 @@ describe('login', () => {
|
||||
|
||||
describe('change password', () => {
|
||||
const changePasswordMutation = gql`
|
||||
mutation($oldPassword: String!, $newPassword: String!) {
|
||||
mutation ($oldPassword: String!, $newPassword: String!) {
|
||||
changePassword(oldPassword: $oldPassword, newPassword: $newPassword)
|
||||
}
|
||||
`
|
||||
|
||||
@ -17,7 +17,7 @@ const driver = getDriver()
|
||||
const neode = getNeode()
|
||||
|
||||
const deleteUserMutation = gql`
|
||||
mutation($id: ID!, $resource: [Deletable]) {
|
||||
mutation ($id: ID!, $resource: [Deletable]) {
|
||||
DeleteUser(id: $id, resource: $resource) {
|
||||
id
|
||||
name
|
||||
@ -46,7 +46,7 @@ const deleteUserMutation = gql`
|
||||
`
|
||||
|
||||
const switchUserRoleMutation = gql`
|
||||
mutation($role: UserGroup!, $id: ID!) {
|
||||
mutation ($role: UserGroup!, $id: ID!) {
|
||||
switchUserRole(role: $role, id: $id) {
|
||||
name
|
||||
role
|
||||
@ -81,7 +81,7 @@ describe('User', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
userQuery = gql`
|
||||
query($email: String) {
|
||||
query ($email: String) {
|
||||
User(email: $email) {
|
||||
name
|
||||
}
|
||||
@ -144,7 +144,7 @@ describe('UpdateUser', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
updateUserMutation = gql`
|
||||
mutation(
|
||||
mutation (
|
||||
$id: ID!
|
||||
$name: String
|
||||
$termsAndConditionsAgreedVersion: String
|
||||
|
||||
@ -9,7 +9,7 @@ const driver = getDriver()
|
||||
let authenticatedUser, mutate, query, variables
|
||||
|
||||
const updateUserMutation = gql`
|
||||
mutation($id: ID!, $name: String!, $locationName: String) {
|
||||
mutation ($id: ID!, $name: String!, $locationName: String) {
|
||||
UpdateUser(id: $id, name: $name, locationName: $locationName) {
|
||||
locationName
|
||||
}
|
||||
@ -17,7 +17,7 @@ const updateUserMutation = gql`
|
||||
`
|
||||
|
||||
const queryLocations = gql`
|
||||
query($place: String!, $lang: String!) {
|
||||
query ($place: String!, $lang: String!) {
|
||||
queryLocations(place: $place, lang: $lang) {
|
||||
place_name
|
||||
id
|
||||
|
||||
@ -93,7 +93,7 @@ describe('muteUser', () => {
|
||||
muteAction = (variables) => {
|
||||
const { mutate } = createTestClient(server)
|
||||
const muteUserMutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
muteUser(id: $id) {
|
||||
id
|
||||
name
|
||||
@ -310,7 +310,7 @@ describe('unmuteUser', () => {
|
||||
unmuteAction = (variables) => {
|
||||
const { mutate } = createTestClient(server)
|
||||
const unmuteUserMutation = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
unmuteUser(id: $id) {
|
||||
id
|
||||
name
|
||||
|
||||
@ -32,7 +32,7 @@ afterAll(async () => {
|
||||
describe('count post teaser views', () => {
|
||||
let aUser, bUser
|
||||
const markTeaserAsViewed = gql`
|
||||
mutation($id: ID!) {
|
||||
mutation ($id: ID!) {
|
||||
markTeaserAsViewed(id: $id) {
|
||||
id
|
||||
viewedTeaserCount
|
||||
|
||||
@ -7833,10 +7833,10 @@ prettier-linter-helpers@^1.0.0:
|
||||
dependencies:
|
||||
fast-diff "^1.1.2"
|
||||
|
||||
prettier@~2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.0.tgz#8a03c7777883b29b37fb2c4348c66a78e980418b"
|
||||
integrity sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==
|
||||
prettier@~2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
|
||||
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==
|
||||
|
||||
pretty-format@^25.3.0:
|
||||
version "25.3.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user