fix: authmode in graphql (#6636)

This commit is contained in:
sanish chirayath
2026-01-02 20:51:19 +05:30
committed by GitHub
parent a35b455041
commit 481fa4ed12

View File

@@ -20,6 +20,7 @@ import GraphQLSchemaActions from '../GraphQLSchemaActions/index';
import HeightBoundContainer from 'ui/HeightBoundContainer';
import Settings from 'components/RequestPane/Settings';
import ResponsiveTabs from 'ui/ResponsiveTabs';
import AuthMode from '../Auth/AuthMode/index';
const TAB_CONFIG = [
{ key: 'query', label: 'Query' },
@@ -134,11 +135,15 @@ const GraphQLRequestPane = ({ item, collection, onSchemaLoad, toggleDocs, handle
return <div className="pb-4 px-4">An error occurred!</div>;
}
const rightContent = (
const rightContent = requestPaneTab === 'auth' ? (
<div ref={schemaActionsRef} className="flex flex-grow justify-start items-center">
<AuthMode item={item} collection={collection} />
</div>
) : requestPaneTab === 'query' ? (
<div ref={schemaActionsRef}>
<GraphQLSchemaActions item={item} collection={collection} onSchemaLoad={setSchema} toggleDocs={toggleDocs} />
</div>
);
) : null;
return (
<div className="flex flex-col h-full relative">
@@ -147,7 +152,7 @@ const GraphQLRequestPane = ({ item, collection, onSchemaLoad, toggleDocs, handle
activeTab={requestPaneTab}
onTabSelect={selectTab}
rightContent={rightContent}
rightContentRef={schemaActionsRef}
rightContentRef={rightContent ? schemaActionsRef : null}
/>
<section className={classnames('flex w-full flex-1 mt-4')}>