diff --git a/packages/daf-data-store/src/graphql.ts b/packages/daf-data-store/src/graphql.ts index 17041df2e..9bc657860 100644 --- a/packages/daf-data-store/src/graphql.ts +++ b/packages/daf-data-store/src/graphql.ts @@ -9,6 +9,9 @@ export const resolvers = { vc: async (message: any, {}, { dataStore }: Context) => dataStore.credentialsForMessageId(message.id), metaData: async (message: any, {}, { dataStore }: Context) => dataStore.messageMetaData(message.id), thread: async (message: any, {}, { dataStore }: Context) => { + if (!message.threadId) { + return [] + } const messages = await dataStore.findMessages({ threadId: message.threadId }) return messages.filter((item: any) => item.id !== message.id) },