Skip to content

Commit

Permalink
fix: Use ID type for message id field
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Nov 13, 2020
1 parent 58f9900 commit 87ebd35
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/message.ts
Expand Up @@ -5,6 +5,7 @@
*/

import { GraphQLError, ExecutionResult } from 'graphql';
import { ID } from './types';
import {
isObject,
areGraphQLErrors,
Expand Down Expand Up @@ -35,7 +36,7 @@ export interface ConnectionAckMessage {
}

export interface SubscribeMessage {
readonly id: string;
readonly id: ID;
readonly type: MessageType.Subscribe;
readonly payload: SubscribePayload;
}
Expand All @@ -47,19 +48,19 @@ export interface SubscribePayload {
}

export interface NextMessage {
readonly id: string;
readonly id: ID;
readonly type: MessageType.Next;
readonly payload: ExecutionResult;
}

export interface ErrorMessage {
readonly id: string;
readonly id: ID;
readonly type: MessageType.Error;
readonly payload: readonly GraphQLError[];
}

export interface CompleteMessage {
readonly id: string;
readonly id: ID;
readonly type: MessageType.Complete;
}

Expand Down

0 comments on commit 87ebd35

Please sign in to comment.