raducotescu commented on code in PR #37:
URL:
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/37#discussion_r1311259577
##########
src/main/java/org/apache/sling/graphql/api/SelectedField.java:
##########
@@ -39,6 +39,34 @@ public interface SelectedField {
@Nullable
String getName();
+ /** @return the simple qualified name of the selected field **/
+ @Nullable
+ String getQualifiedName();
+
+ /**
+ * @return the fully qualified name of the item
+ */
+ @Nullable
+ String getFullyQualifiedName();
+
+ /** @return level of the selected field within the query **/
+ int getLevel();
+
+ /** @return whether the field is conditionally present **/
+ boolean isConditional();
+
+ /**
+ * @return the alias of the selected field or null if not alias was used
+ */
+ String getAlias();
+
+ /**
+ * The result key is either the field query alias OR the field name in
that preference order
+ *
+ * @return the result key of the selected field
+ */
+ String getResultKey();
+
Review Comment:
Can you please add the JSR-305 annotations to all the methods? (return
values and parameters)
##########
src/main/java/org/apache/sling/graphql/core/engine/SelectedFieldWrapper.java:
##########
@@ -74,18 +94,53 @@ public String getName() {
}
@Override
+ public @Nullable String getQualifiedName() {
+ return qualifiedName;
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return fullyQualifiedName;
+ }
+
+ @Override
+ public boolean isConditional() {
+ return conditional;
+ }
+
+ @Override
+ public int getLevel() {
+ return 0;
+ }
+
+ @Override
+ public String getAlias() {
+ return null;
+ }
+
+ @Override
+ public String getResultKey() {
+ return null;
+ }
Review Comment:
Why don't you return the actual values?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]