Hi all, first off thanks so much for open-sourcing this project! As we were evaluating this internally we ran into an issue for extended Entities in the generated code for client projections. The property added to the extended Entity is not present in the generated code.
type JavaBook @key(fields: "id") {
"The unique identifier of the javaBook"
id: ID!
"The title of the javaBook"
title: String
"The Synopsis of the javaBook"
description: String
"The publication year of the javaBook"
yearPublished: Int
"Genre of the javaBook"
genre: JavaGenre
"Author of the javaBook"
author: JavaAuthor
"Similar books based on the Genre"
similarBooks: [JavaBook]
}
type JavaAuthor @key(fields: "id") @extends {
"The unique identifier of the author"
id: ID! @external
books: [JavaBook]
}
enum JavaGenre {
FICTION,
NON_FICTION
}
package com.acme.dgs.generated.client;
import com.netflix.graphql.dgs.client.codegen.BaseSubProjectionNode;
import java.lang.Override;
import java.lang.String;
public class EntitiesJavaAuthorKeyProjection extends BaseSubProjectionNode<EntitiesProjectionRoot, EntitiesProjectionRoot> {
{
getFields().put("__typename", null);
}
public EntitiesJavaAuthorKeyProjection(EntitiesProjectionRoot parent,
EntitiesProjectionRoot root) {
super(parent, root);
}
public EntitiesJavaAuthorKeyProjection id() {
getFields().put("id", null);
return this;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("... on JavaAuthor {");
getFields().forEach((k, v) -> {
builder.append(" ").append(k);
if(v != null) {
builder.append(" ").append(v.toString());
}
});
builder.append("}");
return builder.toString();
}
}
public EntitiesJavaBookKeyAuthorBooksProjection books() {
EntitiesJavaBookKeyAuthorBooksProjection projection =
new EntitiesJavaBookKeyAuthorBooksProjection(null, getRoot());
getFields().put("books", projection);
return projection;
}