From 42d49dd4f1233b05f4cd770402a6a7c1bfbb37bf Mon Sep 17 00:00:00 2001 From: Tai Sakuma Date: Mon, 26 Aug 2024 13:38:18 -0400 Subject: [PATCH 1/2] Upgrade urql --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d605ecd..a52add7 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@material/material-color-utilities": "^0.3.0", - "@urql/vue": "^1.3.2", + "@urql/vue": "^1.4.1", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", "@vueuse/core": "^10.11.0", diff --git a/yarn.lock b/yarn.lock index 436a533..d60bf0d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2277,10 +2277,10 @@ "@0no-co/graphql.web" "^1.0.5" wonka "^6.3.2" -"@urql/vue@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@urql/vue/-/vue-1.3.2.tgz#2a4c610e761fce2c0818808da82411b1f46371bb" - integrity sha512-QzuAAoJ0RRby7+HWvI+36IAdH4bpQd1JHVxTE8kYQZEkxtw3rcKapoxFJr/+6ZW9CFHjihdBHy9Kgncm54w86A== +"@urql/vue@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@urql/vue/-/vue-1.4.1.tgz#469a44b408faacf1db35d5f7995a53f85c2bb2c6" + integrity sha512-Y8hknHUVQ2s5e9Nt8Q8XAknYeNUP2VdOLxyTL9pPuVzE14BDF2pwlewFqxofKTfZA6w8Uc7mP/0nFkdrnG0diA== dependencies: "@urql/core" "^5.0.0" wonka "^6.3.2" From fcad6cea95eadd6c71b3efd29cf6f651d2c0606f Mon Sep 17 00:00:00 2001 From: Tai Sakuma Date: Mon, 26 Aug 2024 13:48:43 -0400 Subject: [PATCH 2/2] Fix type errors and sort imports --- src/api/use-continuous-enabled-subscription.ts | 11 +++++++---- src/api/use-run-no-subscription.ts | 8 ++++---- src/api/use-schedule-auto-mode-mode-subscription.ts | 11 +++++++---- .../use-schedule-auto-mode-state-subscription.ts | 11 +++++++---- src/api/use-schedule-queue-items-subscription.ts | 13 ++++++++----- src/api/use-state-subscription.ts | 11 +++++++---- src/api/use-trace_ids-subscription.ts | 8 ++++---- 7 files changed, 44 insertions(+), 29 deletions(-) diff --git a/src/api/use-continuous-enabled-subscription.ts b/src/api/use-continuous-enabled-subscription.ts index 519eb52..62ffa0e 100644 --- a/src/api/use-continuous-enabled-subscription.ts +++ b/src/api/use-continuous-enabled-subscription.ts @@ -1,9 +1,9 @@ -import { computed } from "vue"; -import type { ComputedRef } from "vue"; import { useCtrlContinuousEnabledQuery, useCtrlContinuousEnabledSSubscription, } from "@/graphql/codegen/generated"; +import type { ComputedRef } from "vue"; +import { computed } from "vue"; interface _ContinuousEnabledSubscription { continuousEnabled: ComputedRef; @@ -16,8 +16,11 @@ type ContinuousEnabledSubscription = _ContinuousEnabledSubscription & PromiseLike<_ContinuousEnabledSubscription>; export function useSubscribeContinuousEnabled(): ContinuousEnabledSubscription { - const query = useCtrlContinuousEnabledQuery({ requestPolicy: "network-only" }); - const subscription = useCtrlContinuousEnabledSSubscription({}); + const query = useCtrlContinuousEnabledQuery({ + requestPolicy: "network-only", + variables: {}, + }); + const subscription = useCtrlContinuousEnabledSSubscription({ variables: {} }); const error = computed(() => subscription.error?.value || query.error?.value); diff --git a/src/api/use-run-no-subscription.ts b/src/api/use-run-no-subscription.ts index f0ac235..54ddf5b 100644 --- a/src/api/use-run-no-subscription.ts +++ b/src/api/use-run-no-subscription.ts @@ -1,9 +1,9 @@ -import { computed } from "vue"; -import type { ComputedRef } from "vue"; import { useCtrlRunNoQuery, useCtrlRunNoSSubscription, } from "@/graphql/codegen/generated"; +import type { ComputedRef } from "vue"; +import { computed } from "vue"; interface _RunNoSubscription { runNo: ComputedRef; @@ -15,8 +15,8 @@ interface _RunNoSubscription { type RunNoSubscription = _RunNoSubscription & PromiseLike<_RunNoSubscription>; export function useSubscribeRunNo(): RunNoSubscription { - const query = useCtrlRunNoQuery({ requestPolicy: "network-only" }); - const subscription = useCtrlRunNoSSubscription({}); + const query = useCtrlRunNoQuery({ requestPolicy: "network-only", variables: {} }); + const subscription = useCtrlRunNoSSubscription({ variables: {} }); const error = computed(() => subscription.error?.value || query.error?.value); diff --git a/src/api/use-schedule-auto-mode-mode-subscription.ts b/src/api/use-schedule-auto-mode-mode-subscription.ts index 95a7908..e27f36e 100644 --- a/src/api/use-schedule-auto-mode-mode-subscription.ts +++ b/src/api/use-schedule-auto-mode-mode-subscription.ts @@ -1,9 +1,9 @@ -import { computed } from "vue"; -import type { ComputedRef } from "vue"; import { useScheduleAutoModeModeQuery, useScheduleAutoModeModeSSubscription, } from "@/graphql/codegen/generated"; +import type { ComputedRef } from "vue"; +import { computed } from "vue"; // type AutoMode = "off" | "scheduler" | "queue"; @@ -18,8 +18,11 @@ type ScheduleAutoModeModeSubscription = _ScheduleAutoModeModeSubscription & PromiseLike<_ScheduleAutoModeModeSubscription>; export function useSubscribeScheduleAutoModeMode(): ScheduleAutoModeModeSubscription { - const query = useScheduleAutoModeModeQuery({ requestPolicy: "network-only" }); - const subscription = useScheduleAutoModeModeSSubscription({}); + const query = useScheduleAutoModeModeQuery({ + requestPolicy: "network-only", + variables: {}, + }); + const subscription = useScheduleAutoModeModeSSubscription({ variables: {} }); const error = computed(() => subscription.error?.value || query.error?.value); diff --git a/src/api/use-schedule-auto-mode-state-subscription.ts b/src/api/use-schedule-auto-mode-state-subscription.ts index 5931086..a736082 100644 --- a/src/api/use-schedule-auto-mode-state-subscription.ts +++ b/src/api/use-schedule-auto-mode-state-subscription.ts @@ -1,9 +1,9 @@ -import { computed } from "vue"; -import type { ComputedRef } from "vue"; import { useQScheduleAutoModeStateQuery, useScheduleAutoModeStateSSubscription, } from "@/graphql/codegen/generated"; +import type { ComputedRef } from "vue"; +import { computed } from "vue"; interface _ScheduleAutoModeStateSubscription { autoModeState: ComputedRef; @@ -16,8 +16,11 @@ type ScheduleAutoModeStateSubscription = _ScheduleAutoModeStateSubscription & PromiseLike<_ScheduleAutoModeStateSubscription>; export function useSubscribeScheduleAutoModeState(): ScheduleAutoModeStateSubscription { - const query = useQScheduleAutoModeStateQuery({ requestPolicy: "network-only" }); - const subscription = useScheduleAutoModeStateSSubscription({}); + const query = useQScheduleAutoModeStateQuery({ + requestPolicy: "network-only", + variables: {}, + }); + const subscription = useScheduleAutoModeStateSSubscription({ variables: {} }); const error = computed(() => subscription.error?.value || query.error?.value); diff --git a/src/api/use-schedule-queue-items-subscription.ts b/src/api/use-schedule-queue-items-subscription.ts index 46b2654..bf556d8 100644 --- a/src/api/use-schedule-queue-items-subscription.ts +++ b/src/api/use-schedule-queue-items-subscription.ts @@ -1,10 +1,10 @@ -import { computed } from "vue"; -import type { ComputedRef } from "vue"; +import type { ScheduleQueueItem } from "@/graphql/codegen/generated"; import { useScheduleQueueItemsQuery, useScheduleQueueItemsSSubscription, } from "@/graphql/codegen/generated"; -import type { ScheduleQueueItem } from "@/graphql/codegen/generated"; +import type { ComputedRef } from "vue"; +import { computed } from "vue"; interface _ScheduleQueueItemsSubscription { items: ComputedRef; @@ -18,8 +18,11 @@ type ScheduleQueueItemsSubscription = _ScheduleQueueItemsSubscription & PromiseLike<_ScheduleQueueItemsSubscription>; export function useSubscribeScheduleQueueItems(): ScheduleQueueItemsSubscription { - const query = useScheduleQueueItemsQuery({ requestPolicy: "network-only" }); - const subscription = useScheduleQueueItemsSSubscription({}); + const query = useScheduleQueueItemsQuery({ + requestPolicy: "network-only", + variables: {}, + }); + const subscription = useScheduleQueueItemsSSubscription({ variables: {} }); const loading = computed(() => query.fetching?.value); const error = computed(() => subscription.error?.value || query.error?.value); diff --git a/src/api/use-state-subscription.ts b/src/api/use-state-subscription.ts index 01cf81d..902a6c8 100644 --- a/src/api/use-state-subscription.ts +++ b/src/api/use-state-subscription.ts @@ -1,6 +1,9 @@ -import { computed } from "vue"; +import { + useCtrlStateQuery, + useCtrlStateSSubscription, +} from "@/graphql/codegen/generated"; import type { ComputedRef } from "vue"; -import { useCtrlStateQuery, useCtrlStateSSubscription } from "@/graphql/codegen/generated"; +import { computed } from "vue"; interface _StateSubscription { state: ComputedRef; @@ -12,8 +15,8 @@ interface _StateSubscription { type StateSubscription = _StateSubscription & PromiseLike<_StateSubscription>; export function useSubscribeState(): StateSubscription { - const query = useCtrlStateQuery({ requestPolicy: "network-only" }); - const subscription = useCtrlStateSSubscription({}); + const query = useCtrlStateQuery({ requestPolicy: "network-only", variables: {} }); + const subscription = useCtrlStateSSubscription({ variables: {} }); const error = computed(() => subscription.error?.value || query.error?.value); diff --git a/src/api/use-trace_ids-subscription.ts b/src/api/use-trace_ids-subscription.ts index 15b8104..36f6d09 100644 --- a/src/api/use-trace_ids-subscription.ts +++ b/src/api/use-trace_ids-subscription.ts @@ -1,9 +1,9 @@ -import { computed } from "vue"; -import type { ComputedRef } from "vue"; import { useCtrlTraceIdsQuery, useCtrlTraceIdsSSubscription, } from "@/graphql/codegen/generated"; +import type { ComputedRef } from "vue"; +import { computed } from "vue"; interface _TraceIdsSubscription { traceIds: ComputedRef; @@ -15,8 +15,8 @@ interface _TraceIdsSubscription { type TraceIdsSubscription = _TraceIdsSubscription & PromiseLike<_TraceIdsSubscription>; export function useSubscribeTraceIds(): TraceIdsSubscription { - const query = useCtrlTraceIdsQuery({ requestPolicy: "network-only" }); - const subscription = useCtrlTraceIdsSSubscription({}); + const query = useCtrlTraceIdsQuery({ requestPolicy: "network-only", variables: {} }); + const subscription = useCtrlTraceIdsSSubscription({ variables: {} }); const error = computed(() => subscription.error?.value || query.error?.value);