Skip to content

Conversation

@taras-dubyk
Copy link
Contributor

@taras-dubyk taras-dubyk commented Mar 21, 2025

Sub-taskHCK-10333 Add object type definitions RE

Content

This PR adds reverse engineering for object type definitions.

@taras-dubyk taras-dubyk self-assigned this Mar 21, 2025
description?: string; // Description of the object type
isActivated?: boolean; // If the object type is activated
implementsInterfaces?: Interfaces; // Interfaces that the object type implements
typeDirectives?: DirectivePropertyData[]; // Directives for the type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, we don't parse SDL directives to raw directive types. I think it is better to use StructuredDirective[] type

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UPD: as we reuse it in FE logic, maybe better to move it to generic as Interfaces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it to generic parameters.

@sonarqubecloud
Copy link

@VitaliiBedletskyi VitaliiBedletskyi merged commit b4ac1a5 into feature/re Mar 24, 2025
2 checks passed
@VitaliiBedletskyi VitaliiBedletskyi deleted the feature/HCK-10333 branch March 24, 2025 14:20
taras-dubyk added a commit that referenced this pull request Apr 4, 2025
* HCK-10099: RE init (#85)

* re from file init

* fix linter

* Added base logic for RE from GraphQL server (#87)

* add entry point for RE from GraphQL server

* reformat package.json

* update title

* fix sonarlint remark

* HCK-10206: add directives RE (#86)

* add directives RE

* add tests for directives definitions mapping

* add tests for directives usage

* fix remarks

* HCK-10331: add custom scalars RE (#89)

* add custom scalars RE

* fix mapping directive argument value

* update tests

* add custom scalars RE tests

* add directive prefix

* fix package of plugin (#90)

* Enabled strict JSDoc usage and type highlights (#91)

* move types to centralized place and add prettier and eslint for them

* add type check using typescript

* disable multiline JSDoc

* align types and eslint with latest changes

* update unit test

* delete duplicated file

* Add strict types check (#92)

* align types and fix all type related issues

* enable types validation on pre-push git hook

* add custom rule to restrict ambiguous types in @return tag

* align types with more strict rules

* remove redundant type

* reconcile type names

* reconcile some RE types

* fix name of parameters in enum mapper

* HCK-10332: RE Enum types (#93)

* implement parsing of Enum types

* add unit tests

* add prettier for TS files

* remove console.log

* HCK-10333: add object type definitions RE (#94)

* add object types RE

* update types

* add field mapper tests

* add object type tests

* move field mapper test for consistent files structure

* update types

* update types

* add RE of interfaces (#95)

* HCK-10335: add RE of input types definitions (#96)

* add input types RE

* fix linter warning

* fix types

* add root types RE (#98)

* HCK-10473: add arguments mapping for RE (#99)

* add arguments mapping for RE

* add arguments mapping tests

* add unions RE (#97)

* Fix running unit tests with node22 (#101)

* add schema validation during RE (#102)

* HCK-10653: fix fallback type name (#103)

* fix fallback type name

* update test

* HCK-10661: Improve error handling for RE from file (#104)

* improve error handling

* refactor

* HCK-10657: finalize RE from instance (#105)

* HCK-10657: finalize RE from instance

* fix progress messages

* remove type import

* fix type

* fix types

---------

Co-authored-by: Vitalii Bedletskyi <70570504+VitaliiBedletskyi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants