INNER CODE UNIT · TypeScript

isGQLOperation

michalkvasnicak/aws-lambda-graphql · packages/aws-lambda-graphql/src/protocol/index.ts:36

export function isGQLOperation(event: any): event is GQLOperation {
  return (
    event &&
    typeof event === 'object' &&
    event.type === CLIENT_EVENT_TYPES.GQL_START
  );
}

/**
 * Client -> Server
 *
 * Stops subscription
 */
export interface GQLStopOperation {
  /** The ID of GQLOperation used to subscribe */
  id: string;
  // there is no payload
  // https://github.com/apollographql/subscriptions-transport-ws/blob/master/src/client.ts#L665

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…