enonic / lib-guillotine

Apache License 2.0
3 stars 0 forks source link

Introduce support for new Query DSL #263 #265

Closed anatol-sialitski closed 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Base: 71.05% // Head: 77.27% // Increases project coverage by +6.22% :tada:

Coverage data is based on head (c81fcbc) compared to base (68a719a). Patch coverage: 87.65% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #265 +/- ## ============================================ + Coverage 71.05% 77.27% +6.22% - Complexity 96 127 +31 ============================================ Files 15 18 +3 Lines 494 550 +56 Branches 50 52 +2 ============================================ + Hits 351 425 +74 + Misses 112 92 -20 - Partials 31 33 +2 ``` | [Impacted Files](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic) | Coverage Δ | | |---|---|---| | [...nic/lib/guillotine/handler/ProcessHtmlHandler.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL2hhbmRsZXIvUHJvY2Vzc0h0bWxIYW5kbGVyLmphdmE=) | `63.63% <0.00%> (-6.37%)` | :arrow_down: | | [...ib/guillotine/mapper/FormDescriptorMapperBase.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL21hcHBlci9Gb3JtRGVzY3JpcHRvck1hcHBlckJhc2UuamF2YQ==) | `33.33% <ø> (+6.88%)` | :arrow_up: | | [...enonic/lib/guillotine/macro/ProcessHtmlParams.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL21hY3JvL1Byb2Nlc3NIdG1sUGFyYW1zLmphdmE=) | `90.00% <33.33%> (-10.00%)` | :arrow_down: | | [...guillotine/handler/GetDefaultPageTemplateBean.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL2hhbmRsZXIvR2V0RGVmYXVsdFBhZ2VUZW1wbGF0ZUJlYW4uamF2YQ==) | `83.33% <76.92%> (+83.33%)` | :arrow_up: | | [...enonic/lib/guillotine/macro/HtmlLinkProcessor.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL21hY3JvL0h0bWxMaW5rUHJvY2Vzc29yLmphdmE=) | `90.24% <91.66%> (+1.12%)` | :arrow_up: | | [...om/enonic/lib/guillotine/handler/XDataHandler.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL2hhbmRsZXIvWERhdGFIYW5kbGVyLmphdmE=) | `92.30% <92.30%> (ø)` | | | [...om/enonic/lib/guillotine/macro/MacroDecorator.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL21hY3JvL01hY3JvRGVjb3JhdG9yLmphdmE=) | `100.00% <100.00%> (ø)` | | | [...ib/guillotine/macro/MacroEditorJsonSerializer.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL21hY3JvL01hY3JvRWRpdG9ySnNvblNlcmlhbGl6ZXIuamF2YQ==) | `72.41% <100.00%> (+0.98%)` | :arrow_up: | | [...c/lib/guillotine/macro/ProcessHtmlServiceImpl.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL21hY3JvL1Byb2Nlc3NIdG1sU2VydmljZUltcGwuamF2YQ==) | `84.44% <100.00%> (ø)` | | | [.../com/enonic/lib/guillotine/mapper/XDataMapper.java](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic#diff-c3JjL21haW4vamF2YS9jb20vZW5vbmljL2xpYi9ndWlsbG90aW5lL21hcHBlci9YRGF0YU1hcHBlci5qYXZh) | `100.00% <100.00%> (ø)` | | | ... and [4 more](https://codecov.io/gh/enonic/lib-guillotine/pull/265?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enonic)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

ComLock commented 1 year ago

Looks like the future is bright https://stepzen.com/blog/coming-soon-to-graphql-the-oneof-input-object

ComLock commented 1 year ago

https://github.com/graphql/graphql-spec/pull/825

ComLock commented 1 year ago

https://github.com/graphql/graphql-wg/blob/main/rfcs/Struct.md#composite-type-capable-of-input-polymorphism

ComLock commented 1 year ago

Although I personally like going from "doubleValue" to just "double", I'm going to point out something, just so it's thought about. The words "double" and "boolean" (haven't checked the rest) are reserved words in JavaScript. https://www.w3schools.com/js/js_reserved.asp

This means that they cannot be used as variables, labels, or function names.

So if one wants to deconstruct such a property from an object, one would have to rename the variable in the deconstruct:

const { double: myDouble } = object;