Skip to content

Commit

Permalink
HCK-9178: add directives properties (#25)
Browse files Browse the repository at this point in the history
* add field level directives property

* add root type directives property

* add config for help message

* add help for entity level directive

---------

Co-authored-by: Vitalii Bedletskyi <[email protected]>
  • Loading branch information
taras-dubyk and VitaliiBedletskyi authored Dec 19, 2024
1 parent 11b4f29 commit c229a17
Show file tree
Hide file tree
Showing 3 changed files with 676 additions and 50 deletions.
2 changes: 2 additions & 0 deletions localization/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
"PROPERTIES_PANE___MAX_VARIABLE": "Max variable",
"PROPERTIES_PANE___BACKWARDS": "Backwards",
"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.",
"CENTRAL_PANE___TAB_MONGODB_VIEW_SCRIPT": "Create View Script",
"CENTRAL_PANE___TAB_DIAGRAM": "Operations ERD",
"CONTEXT_MENU___ADD_BUCKET": "Add graph",
Expand Down
41 changes: 35 additions & 6 deletions properties_pane/entity_level/entityLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,41 @@ making sure that you maintain a proper JSON format.
"markdown": false
},
{
"propertyName": "Directive",
"propertyKeyword": "directive",
"propertyTooltip": "Popup for multi-line text entry",
"propertyType": "details",
"template": "textarea",
"markdown": false
"propertyName": "Directives",
"propertyKeyword": "typeDirectives",
"propertyTooltip": "Type directives",
"propertyType": "group",
"structure": [
{
"propertyName": "Directive format",
"propertyKeyword": "directiveFormat",
"propertyTooltip": "Select directive format",
"propertyType": "select",
"options": [
"Raw"
],
"defaultValue": "Raw",
"helpInfo": {
"type": "modal",
"title": "PROPERTIES_PANE___DIRECTIVES_INFO_MODAL_TITLE",
"content": "PROPERTIES_PANE___DIRECTIVES_INFO_MODAL_BODY",
"featureNameForHelp": "GraphQL directives",
"buttons": ["contactSupport", "ok"]
}
},
{
"propertyName": "Raw directive",
"propertyKeyword": "rawDirective",
"propertyTooltip": "Enter raw directive",
"propertyType": "details",
"template": "textarea",
"markdown": false,
"dependency": {
"key": "directiveFormat",
"value": "Raw"
}
}
]
},
{
"propertyName": "Comments",
Expand Down
Loading

0 comments on commit c229a17

Please sign in to comment.