mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Introspection tweak
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "Yaak",
|
||||
"version": "2024.3.0-beta.2"
|
||||
"version": "2024.3.0"
|
||||
},
|
||||
"tauri": {
|
||||
"windows": [],
|
||||
|
||||
@@ -183,6 +183,10 @@
|
||||
.cm-completionIcon {
|
||||
@apply italic font-mono;
|
||||
|
||||
&::after {
|
||||
content: 'x' !important; /* Default (eg. for GraphQL) */
|
||||
}
|
||||
|
||||
&.cm-completionIcon-class::after {
|
||||
content: 'o' !important;
|
||||
}
|
||||
@@ -258,7 +262,7 @@
|
||||
}
|
||||
|
||||
.cm-completionIcon {
|
||||
@apply text-sm flex items-center pb-0.5 mr-2 flex-shrink-0;
|
||||
@apply text-xs flex items-center pb-0.5 flex-shrink-0;
|
||||
}
|
||||
|
||||
.cm-completionLabel {
|
||||
|
||||
@@ -22,7 +22,7 @@ export function useIntrospectGraphQL(baseRequest: HttpRequest) {
|
||||
const [refetchKey, setRefetchKey] = useState<number>(0);
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [error, setError] = useState<string>();
|
||||
const [introspection, setIntrospection] = useLocalStorage<IntrospectionQuery>(
|
||||
const [introspection, setIntrospection] = useLocalStorage<IntrospectionQuery | null>(
|
||||
`introspection:${baseRequest.id}`,
|
||||
);
|
||||
|
||||
@@ -61,7 +61,10 @@ export function useIntrospectGraphQL(baseRequest: HttpRequest) {
|
||||
|
||||
const runIntrospection = () => {
|
||||
fetchIntrospection()
|
||||
.catch((e) => setError(e.message))
|
||||
.catch((e) => {
|
||||
setIntrospection(null);
|
||||
setError(e.message);
|
||||
})
|
||||
.finally(() => setIsLoading(false));
|
||||
};
|
||||
|
||||
@@ -82,5 +85,6 @@ export function useIntrospectGraphQL(baseRequest: HttpRequest) {
|
||||
[introspection],
|
||||
);
|
||||
|
||||
console.log('SCHEMA', introspection);
|
||||
return { schema, isLoading, error, refetch };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user