mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 22:40:26 +01:00
Decouple core Yaak logic from Tauri (#354)
This commit is contained in:
@@ -33,7 +33,7 @@ export function useIntrospectGraphQL(
|
||||
const upsertIntrospection = useCallback(
|
||||
async (content: string | null) => {
|
||||
const v = await invoke<GraphQlIntrospection>(
|
||||
'plugin:yaak-models|upsert_graphql_introspection',
|
||||
'models_upsert_graphql_introspection',
|
||||
{
|
||||
requestId: baseRequest.id,
|
||||
workspaceId: baseRequest.workspaceId,
|
||||
@@ -122,7 +122,7 @@ function useIntrospectionResult(request: HttpRequest) {
|
||||
return useQuery({
|
||||
queryKey: ['introspection', request.id],
|
||||
queryFn: async () =>
|
||||
invoke<GraphQlIntrospection | null>('plugin:yaak-models|get_graphql_introspection', {
|
||||
invoke<GraphQlIntrospection | null>('models_get_graphql_introspection', {
|
||||
requestId: request.id,
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -67,7 +67,7 @@ export function useGrpcEvents(connectionId: string | null) {
|
||||
return;
|
||||
}
|
||||
|
||||
invoke<GrpcEvent[]>('plugin:yaak-models|grpc_events', { connectionId }).then((events) => {
|
||||
invoke<GrpcEvent[]>('models_grpc_events', { connectionId }).then((events) => {
|
||||
replaceModelsInStore('grpc_event', events);
|
||||
});
|
||||
}, [connectionId]);
|
||||
|
||||
@@ -54,7 +54,7 @@ export function useWebsocketEvents(connectionId: string | null) {
|
||||
return;
|
||||
}
|
||||
|
||||
invoke<WebsocketEvent[]>('plugin:yaak-models|websocket_events', { connectionId }).then(
|
||||
invoke<WebsocketEvent[]>('models_websocket_events', { connectionId }).then(
|
||||
(events) => replaceModelsInStore('websocket_event', events),
|
||||
);
|
||||
}, [connectionId]);
|
||||
|
||||
@@ -2,5 +2,5 @@ import { invoke } from '@tauri-apps/api/core';
|
||||
import type { Settings } from '@yaakapp-internal/models';
|
||||
|
||||
export function getSettings(): Promise<Settings> {
|
||||
return invoke<Settings>('plugin:yaak-models|get_settings');
|
||||
return invoke<Settings>('models_get_settings');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user