Skip to content

Commit

Permalink
add implements property for object and interface
Browse files Browse the repository at this point in the history
  • Loading branch information
taras-dubyk committed Dec 20, 2024
1 parent c6ef8d1 commit c28bb3b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 7 deletions.
2 changes: 2 additions & 0 deletions localization/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
57 changes: 55 additions & 2 deletions properties_pane/field_level/fieldLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ making sure that you maintain a proper JSON format.
}

*/
{
[{
"lowerTab": "JsonDetails",
"structure": {
"String": [
Expand Down Expand Up @@ -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"
}
]
}
]
}
}]
10 changes: 5 additions & 5 deletions snippets/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit c28bb3b

Please sign in to comment.