mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-30 20:14:01 +01:00
Always show GQL schema dropdown.
Fixes https://feedback.yaak.app/p/unable-to-disable-graphql-automatic-introspection
This commit is contained in:
1 parent
4c4eaba7d2
commit
d86549f492
3 files changed
+57
-38
No files matched your search
@@ -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]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user