-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStarWarsClient.java
More file actions
41 lines (30 loc) · 1.29 KB
/
StarWarsClient.java
File metadata and controls
41 lines (30 loc) · 1.29 KB
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
38
39
40
41
package com.jacobmountain;
import com.jacobmountain.dto.Episode;
import com.jacobmountain.dto.LengthUnit;
import com.jacobmountain.dto.Review;
import com.jacobmountain.dto.ReviewInput;
import com.jacobmountain.graphql.client.annotations.*;
import java.util.List;
import java.util.Optional;
@GraphQLClient(
schema = "Schema.gql",
nullChecking = true
)
public interface StarWarsClient {
@GraphQLFragment(type = "Character", name = "Hero")
@GraphQLQuery(value = "hero", name = "HeroByEpisode")
com.jacobmountain.dto.Character getHero(Episode episode, int first, String after, LengthUnit unit);
@GraphQLQuery(value = "hero", name = "HeroSummary", maxDepth = 6)
com.jacobmountain.dto.Character getHero(@GraphQLArgument("hero") String id);
@GraphQLQuery(value = "hero", select = {
@GraphQLField("id"),
@GraphQLField("name")
})
com.jacobmountain.dto.Character getHeroSummary(String id);
@GraphQLQuery("hero")
Optional<com.jacobmountain.dto.Character> getHeroOptional(Episode episode, int first, String after, LengthUnit unit);
@GraphQLQuery("reviews")
List<Review> getReviews(Episode episode);
@GraphQLMutation(value = "createReview")
Review createReview(Episode episode, @GraphQLArgument("review") ReviewInput input);
}