[GitHub] [sling-org-apache-sling-graphql-core] schaefa commented on a diff in pull request #37: SLING-12014 - GraphQL Core needs to support additional fields from GraphQL Java

2023-08-31 Thread via GitHub


schaefa commented on code in PR #37:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/37#discussion_r1311971949


##
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:
   I missed that - DONE



-- 
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: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-graphql-core] schaefa commented on a diff in pull request #37: SLING-12014 - GraphQL Core needs to support additional fields from GraphQL Java

2023-08-31 Thread via GitHub


schaefa commented on code in PR #37:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/37#discussion_r1311971673


##
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:
   No, I cannot because the source of the values does not provide any 
annotations or any other indication of the expectation. I will mark the all 
Nullable for now



-- 
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: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org