Skip to content

Commit

Permalink
fix(mutations): createOrUpdateCooccurrence should return id properly
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Jan 2, 2024
1 parent 4b00d58 commit 1f4103d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
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 1f4103d

Please sign in to comment.