Skip to content

Commit b77b65e

Browse files
authored
feat: Add example of how to use codegen without gql clients (#371)
1 parent eda28d6 commit b77b65e

3 files changed

Lines changed: 2057 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
type Media {
2+
id: ID
3+
type: String
4+
title: MediaTitle
5+
coverImage: MediaCoverImage
6+
nextEpisode: Int
7+
}
8+
9+
type MediaTitle {
10+
romaji: String
11+
userPreferred: String
12+
}
13+
14+
type MediaCoverImage {
15+
large: String
16+
medium: String
17+
}
18+
19+
type Query {
20+
Media(id: Int, search: String): Media
21+
}
22+
23+
24+
fragment MediaMinimalFrag on Media {
25+
id
26+
type
27+
title {
28+
romaji
29+
userPreferred
30+
}
31+
coverImage {
32+
large
33+
medium
34+
}
35+
}
36+
37+
query MediaMinimal($id: Int, $search: String) {
38+
Media(id: $id, search: $search) {
39+
...MediaMinimalFrag
40+
}
41+
}
42+
43+
query MediaFull($id: Int, $search: String) {
44+
Media(id: $id, search: $search) {
45+
...MediaMinimalFrag
46+
nextEpisode
47+
}
48+
}

0 commit comments

Comments
 (0)