Expose GraphQL field with different name (#12289)
This commit is contained in:
committed by
GitHub
parent
97b2c4d6ea
commit
aef4affc28
+5
@@ -12,4 +12,9 @@ public class PostResolver implements GraphQLResolver<Post> {
|
||||
public Author getAuthor(Post post) {
|
||||
return authorDao.getAuthor(post.getAuthorId()).orElseThrow(RuntimeException::new);
|
||||
}
|
||||
|
||||
public Author getFirst_author(Post post) {
|
||||
return authorDao.getAuthor(post.getAuthorId()).orElseThrow(RuntimeException::new);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ type Post {
|
||||
text: String!
|
||||
category: String
|
||||
author: Author!
|
||||
first_author: Author!
|
||||
}
|
||||
|
||||
type Author {
|
||||
|
||||
Reference in New Issue
Block a user