Skip to content

Commit

Permalink
Always return a type.
Browse files Browse the repository at this point in the history
Unclear if this is the right solution, the other option would be to make the `type` field nullable which might be a better solution.
  • Loading branch information
chmac committed May 16, 2019
1 parent 3af0ab7 commit e946c69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema/message/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const resolvers = {
content: (msg) => JSON.stringify(msg.value.content),
sequence: (msg) => msg.value.sequence,
timestamp: (msg) => msg.value.timestamp,
type: (msg) => msg.value.content.type,
type: (msg) => msg.value.content.type || 'unknown',
}

module.exports = { resolvers, typeDef };

0 comments on commit e946c69

Please sign in to comment.