forked from odeddoek/graphql-java-spring-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStory.java
More file actions
37 lines (28 loc) · 663 Bytes
/
Copy pathStory.java
File metadata and controls
37 lines (28 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package graphql;
import graphql.annotations.GraphQLField;
public class Story {
private String name;
private User author;
public Story(String name, User author) {
this.name = name;
this.author = author;
}
public User getAuthor() {
return author;
}
public void setAuthor(User author) {
this.author = author;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@GraphQLField
public String name() {
return this.getName();
}
@GraphQLField
public User author() {return this.getAuthor();}
}