diff --git a/localization/en.json b/localization/en.json index 05c2fa5..10171f1 100644 --- a/localization/en.json +++ b/localization/en.json @@ -57,6 +57,8 @@ "PROPERTIES_PANE___NORMALIZATION": "Normalization", "PROPERTIES_PANE___DIRECTIVES_INFO_MODAL_TITLE": "Structured directive format not supported", "PROPERTIES_PANE___DIRECTIVES_INFO_MODAL_BODY": "The current version of the GraphQL plugin allows you to attach directives as raw input. Please ensure that you follow the GraphQL specifications to generate a correct script.", + "PROPERTIES_PANE___IMPLEMENTS_INFO_MODAL_TITLE": "Current interface implementation support", + "PROPERTIES_PANE___IMPLEMENTS_INFO_MODAL_BODY": "The current version of the GraphQL plugin allows you to define the interfaces that an object and an interface implement. This feature simplifies modeling by copying fields from the interface to the implementing type. However, please note that there is no automatic link between the types and fields. This means that changes made to the interface will not automatically update the implementing type.\nIf you would like to request a smart link feature between interfaces and implementing types, please contact the support team. Sharing your use case and goals for using GraphQL directives will help improve the user experience and guide future enhancements.", "CENTRAL_PANE___TAB_MONGODB_VIEW_SCRIPT": "Create View Script", "CENTRAL_PANE___TAB_DIAGRAM": "Operations ERD", "CONTEXT_MENU___ADD_BUCKET": "Add graph", diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index a5e071f..324eafc 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -116,7 +116,7 @@ making sure that you maintain a proper JSON format. } */ -{ +[{ "lowerTab": "JsonDetails", "structure": { "String": [ @@ -1288,4 +1288,57 @@ making sure that you maintain a proper JSON format. "comments" ] } -} +}, +{ + "lowerTab": "Implements", + "structure": { + "object": [ + { + "propertyName": "Interfaces", + "propertyKeyword": "implementsInterfaces", + "propertyTooltip": "Select interfaces to implement", + "propertyType": "group", + "helpInfo": { + "type": "modal", + "title": "PROPERTIES_PANE___IMPLEMENTS_INFO_MODAL_TITLE", + "content": "PROPERTIES_PANE___IMPLEMENTS_INFO_MODAL_BODY", + "featureNameForHelp": "Implementing Interfaces in GraphQL", + "buttons": ["contactSupport", "ok"] + }, + "structure": [ + { + "propertyName": "Interface", + "propertyKeyword": "interface", + "propertyTooltip": "Select interface", + "propertyType": "selecthashed", + "template": "definitions" + } + ] + } + ], + "interface": [ + { + "propertyName": "Interfaces", + "propertyKeyword": "implementsInterfaces", + "propertyTooltip": "Select interfaces to implement", + "propertyType": "group", + "helpInfo": { + "type": "modal", + "title": "PROPERTIES_PANE___IMPLEMENTS_INFO_MODAL_TITLE", + "content": "PROPERTIES_PANE___IMPLEMENTS_INFO_MODAL_BODY", + "featureNameForHelp": "Implementing Interfaces in GraphQL", + "buttons": ["contactSupport", "ok"] + }, + "structure": [ + { + "propertyName": "Interface", + "propertyKeyword": "interface", + "propertyTooltip": "Select interface", + "propertyType": "selecthashed", + "template": "definitions" + } + ] + } + ] + } +}] diff --git a/snippets/definitions.json b/snippets/definitions.json index 5eda665..506b5a7 100644 --- a/snippets/definitions.json +++ b/snippets/definitions.json @@ -6,10 +6,7 @@ { "name": "Scalars", "type": "type", - "subtype": "scalar", - "hackoladeMeta": { - "source": true // TODO: source is used to indicate that the component is a parent of definitions, should be checked - } + "subtype": "scalar" }, { "name": "Enums", @@ -24,7 +21,10 @@ { "name": "Interfaces", "type": "type", - "subtype": "interface" + "subtype": "interface", + "hackoladeMeta": { + "source": true // is used by "Implements interfaces" selechashed property, to indicate which definitions to show in interfaces dropdown + } }, { "name": "Unions",