Always show GQL schema dropdown.

Fixes https://feedback.yaak.app/p/unable-to-disable-graphql-automatic-introspection
This commit is contained in:
Gregory Schier
2025-03-21 07:28:08 -07:00
parent 4c4eaba7d2
commit d86549f492
3 changed files with 57 additions and 38 deletions

View File

@@ -51,7 +51,7 @@ export function useIntrospectGraphQL(
const bodyText = await getResponseBodyText(response);
if (response.status < 200 || response.status >= 300) {
return setError(`Request failed with status ${response.status}.\n\n${bodyText}`);
return setError(`Request failed with status ${response.status}.\nThe response body is:\n\n${bodyText}`);
}
if (bodyText === null) {
@@ -80,6 +80,7 @@ export function useIntrospectGraphQL(
}, [request.id, request.url, request.method, activeEnvironment?.id]);
const clear = useCallback(async () => {
setError('');
await setIntrospection(null);
}, [setIntrospection]);