cofacts / rumors-api

GraphQL API server for clients like rumors-site and rumors-line-bot
https://api.cofacts.tw
MIT License
109 stars 26 forks source link

fix(mutations): createOrUpdateCooccurrence should return id properly #327

Closed MrOrz closed 6 months ago

MrOrz commented 6 months ago

Currently CreateOrUpdateCooccurrence will error if id is queried in the mutation.

The root cause is that id is not given in the resolver. We did not capture this error because we do not include id in test script.

This PR fixes the root cause and make sure it's tested properly.

Blocks https://github.com/cofacts/rumors-line-bot/pull/379 .

coveralls commented 6 months ago

Coverage Status

coverage: 88.365%. remained the same when pulling 940015a9d87fdfcf5babeab81b62fed6030face0 on fix-cooccurrence into 4b00d586e44cb6aa15c858e9c945b8ea4c67d3bc on master.