console: remove FF check for naming-convention in GraphQLCustomizationWidget

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10233
GitOrigin-RevId: 1cebde3abe6321a2118a54a4cda925756bf01cb6
This commit is contained in:
Vijay Prasanna 2023-08-30 17:56:06 +05:30 committed by hasura-bot
parent caca39d51e
commit 752b077648
2 changed files with 19 additions and 15 deletions

View File

@ -272,6 +272,7 @@ export const TestPostgresForm: StoryObj<typeof ConnectPostgresForm> = {
prefix: 'type_names_prefix',
suffix: 'type_names_suffix',
},
namingConvention: 'hasura-default',
},
})
);

View File

@ -3,6 +3,7 @@ import {
GraphQLSanitizedInputField,
Select,
} from '../../../../new-components/Form';
import { IndicatorCard } from '../../../../new-components/IndicatorCard';
import { IconTooltip } from '../../../../new-components/Tooltip';
export const GraphQLCustomization = ({ name }: { name: string }) => {
@ -12,26 +13,28 @@ export const GraphQLCustomization = ({ name }: { name: string }) => {
return (
<div className="my-2">
{!isNamingConventionEnabled ? (
<div className="bg-white border border-hasGray-300 rounded-md shadow-sm overflow-hidden p-sm mb-sm">
Naming convention is not enabled. To enable this, restart your Hasura
server with environment variable
{isNamingConventionEnabled && (
<IndicatorCard status="info" showIcon>
Looks like you have
<code className="mx-2 bg-red-100 text-red-800 rounded">
HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: &quot;naming_convention&quot;
</code>
</div>
) : (
<Select
label="Naming Convention"
options={[
{ label: 'hasura-default', value: 'hasura-default' },
{ label: 'graphql-default', value: 'graphql-default' },
]}
name={`${name}.namingConvention`}
tooltip="Choose a default naming convention for your auto-generated GraphQL schema objects (fields, types, arguments, etc.)"
/>
environment variable enabled in your Hasura instance. The feature is
now in available without the flag, and the feature flag be safely
removed.
</IndicatorCard>
)}
<Select
label="Naming Convention"
options={[
{ label: 'hasura-default', value: 'hasura-default' },
{ label: 'graphql-default', value: 'graphql-default' },
]}
name={`${name}.namingConvention`}
tooltip="Choose a default naming convention for your auto-generated GraphQL schema objects (fields, types, arguments, etc.)"
/>
<div className="bg-white border border-hasGray-300 rounded-md shadow-sm overflow-hidden">
<div className="bg-white px-3 py-1.5 font-semibold flex">
Root Fields{' '}