mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
simplefied cypher, cleanDatabase after specs
This commit is contained in:
parent
3ba72526b9
commit
106e2713d6
@ -3,8 +3,8 @@ export default {
|
||||
userData: async (object, args, context, resolveInfo) => {
|
||||
const id = context.user.id
|
||||
const cypher = `
|
||||
MATCH (u:User { id: $id })
|
||||
WITH u AS user
|
||||
MATCH (user:User { id: $id })
|
||||
WITH user
|
||||
OPTIONAL MATCH (p:Post)
|
||||
WHERE (p)<-[:COMMENTS]-(:Comment)<-[:WROTE]-(user)
|
||||
OR (user)-[:WROTE]->(p)
|
||||
|
||||
@ -35,7 +35,7 @@ beforeAll(async () => {
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
// await cleanDatabase()
|
||||
await cleanDatabase()
|
||||
})
|
||||
|
||||
const userDataQuery = gql`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user