diff --git a/packages/client/mutations/AutogroupMutation.ts b/packages/client/mutations/AutogroupMutation.ts index 3a66969a2e1..8f05c4d042c 100644 --- a/packages/client/mutations/AutogroupMutation.ts +++ b/packages/client/mutations/AutogroupMutation.ts @@ -13,7 +13,6 @@ graphql` reflectionGroups { id title - smartTitle reflections { id plaintextContent diff --git a/packages/client/mutations/EndDraggingReflectionMutation.ts b/packages/client/mutations/EndDraggingReflectionMutation.ts index 541ff78ce6d..1f36e79c72c 100644 --- a/packages/client/mutations/EndDraggingReflectionMutation.ts +++ b/packages/client/mutations/EndDraggingReflectionMutation.ts @@ -181,8 +181,7 @@ const EndDraggingReflectionMutation: SimpleMutation { private sourceStream: SubscriptionIterator private req: SubscribeRequest @@ -51,7 +53,7 @@ export default class ResponseStream implements AsyncIterableIterator g.id === oldReflectionGroupId)! + const oldReflectionGroup = meetingReflectionGroups.find((g) => g.id === oldReflectionGroupId) const reflectionGroupsInColumn = meetingReflectionGroups .filter((g) => g.promptId === promptId) .sort((a, b) => (a.sortOrder < b.sortOrder ? -1 : 1)) let newSortOrder = 1e6 const oldReflectionGroupIdx = reflectionGroupsInColumn.findIndex( - (group) => group.id === oldReflectionGroup.id + (group) => group.id === oldReflectionGroup?.id ) const sortOrderAtBottom = (reflectionGroupsInColumn[reflectionGroupsInColumn.length - 1]?.sortOrder ?? 1e6) + 1 + dndNoise() - if (oldReflectionGroupIdx === -1 || reflection.promptId !== oldReflectionGroup.promptId) { + if ( + oldReflectionGroupIdx === -1 || + !oldReflectionGroup || + reflection.promptId !== oldReflectionGroup.promptId + ) { newSortOrder = sortOrderAtBottom } else if (oldReflectionGroupIdx === reflectionGroupsInColumn.length - 1) { newSortOrder = oldReflectionGroup.sortOrder + 1 + dndNoise() diff --git a/packages/server/utils/publishInternalGQL.ts b/packages/server/utils/publishInternalGQL.ts index 28560b26ec4..5f96bc44d26 100644 --- a/packages/server/utils/publishInternalGQL.ts +++ b/packages/server/utils/publishInternalGQL.ts @@ -11,6 +11,8 @@ interface Options { authToken: AuthToken } +const {SERVER_ID} = process.env + const publishInternalGQL = async (options: Options) => { const {socketId, query, ip, authToken, variables} = options try { @@ -32,7 +34,7 @@ const publishInternalGQL = async (options: Options) => { authToken: JSON.stringify(authToken), query: query || '', variables: JSON.stringify(variables), - socketServerId: socketId + socketServerId: SERVER_ID! } }) } else {