mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
console: show cache button in EE console
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5840 GitOrigin-RevId: 3ba01eaa04ae66ee62b60403643e71bb720f961a
This commit is contained in:
parent
cbddcce26b
commit
255310f9ed
@ -33,7 +33,7 @@ import {
|
||||
} from '../../Actions/Add/reducer';
|
||||
import { getGraphQLEndpoint } from '../utils';
|
||||
import snippets from './snippets';
|
||||
import globals from '../../../../Globals';
|
||||
import { canAccessCacheButton } from '@/utils/permissions';
|
||||
|
||||
import 'graphiql/graphiql.css';
|
||||
import 'graphiql-code-exporter/CodeExporter.css';
|
||||
@ -240,7 +240,7 @@ class GraphiQLWrapper extends Component {
|
||||
label: 'Cache',
|
||||
title: 'Cache the response of this query',
|
||||
onClick: _toggleCacheDirective,
|
||||
hide: globals.consoleType !== 'cloud',
|
||||
hide: !canAccessCacheButton(),
|
||||
},
|
||||
{
|
||||
label: 'Code Exporter',
|
||||
|
@ -4,3 +4,5 @@ import { isProConsole } from './proConsole';
|
||||
export const canAccessReadReplica = () => isProConsole(window.__env);
|
||||
|
||||
export const canAccessSecuritySettings = () => isProConsole(window.__env);
|
||||
|
||||
export const canAccessCacheButton = () => isProConsole(window.__env);
|
||||
|
Loading…
Reference in New Issue
Block a user