Skip to content

Commit 599368a

Browse files
author
Pascal Klesse
committed
fix: fix wrong export of subscription type
1 parent 674be8e commit 599368a

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/runtime/composables/gql-subscription.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
import { subscription } from 'gql-query-builder';
22
import gql from 'graphql-tag';
33
import { useNuxtApp } from 'nuxt/app';
4-
import { type Ref, ref } from 'vue';
4+
import { ref } from 'vue';
55

66
import type { IGraphQLOptions } from '../interfaces/graphql-options.interface';
7+
import type { ReturnTypeOfSubscription } from '../interfaces/return-type-of-subscription.interface';
78

89
import { hashPasswords } from '../functions/graphql-meta';
910

10-
export interface ReturnTypeOfSubscription<T> {
11-
data: Ref<T>;
12-
error: Ref<string>;
13-
loading: Ref<boolean>;
14-
start: void;
15-
stop: void;
16-
}
17-
1811
export async function gqlSubscription<T = any>(method: string, options: IGraphQLOptions = {}): Promise<ReturnTypeOfSubscription<T>> {
1912
const { _meta, _wsClient } = useNuxtApp();
2013

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { Ref } from 'vue';
2+
3+
export interface ReturnTypeOfSubscription<T> {
4+
data: Ref<T | null>;
5+
error: Ref<null | string>;
6+
loading: Ref<boolean>;
7+
start: () => void;
8+
stop: () => void;
9+
}

0 commit comments

Comments
 (0)