Skip to content

Commit

Permalink
Merge pull request #327 from cofacts/fix-cooccurrence
Browse files Browse the repository at this point in the history
fix(mutations): createOrUpdateCooccurrence should return id properly
  • Loading branch information
MrOrz authored Jan 3, 2024
2 parents 4b00d58 + 940015a commit 8a34ef6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Builds production image for rumors-api.
#
FROM node:18-alpine AS builder
FROM node:18-alpine3.18 AS builder
WORKDIR /srv/www

# make node_modules cached.
Expand All @@ -17,7 +17,7 @@ RUN node_modules/.bin/babel src -d build
RUN npm prune --production

#########################################
FROM node:18-alpine
FROM node:18-alpine3.18
RUN apk update && apk add ffmpeg

WORKDIR /srv/www
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/mutations/CreateOrUpdateCooccurrence.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function createOrUpdateCooccurrence({ articleIds, user }) {
const isCreated = result === 'created';

return {
cooccurrence: { ..._source },
cooccurrence: { id, ..._source },
isCreated,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('CreateOrUpdateCooccurrence', () => {
const { data, errors } = await gql`
mutation($articleIds: [String!]) {
CreateOrUpdateCooccurrence(articleIds: $articleIds) {
id
articles {
text
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Object {
"text": "i am a2",
},
],
"id": "test_test_a1_a2",
"userId": "test",
}
`;

0 comments on commit 8a34ef6

Please sign in to comment.