Skip to content

Commit

Permalink
feat: Add example of how to use codegen without gql clients
Browse files Browse the repository at this point in the history
  • Loading branch information
budde377 committed Nov 26, 2024
1 parent eda28d6 commit 712a6bb
Show file tree
Hide file tree
Showing 3 changed files with 2,058 additions and 0 deletions.
48 changes: 48 additions & 0 deletions packages/graphql_codegen/test/assets/issue_370/document.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type Media {
id: ID
type: String
title: MediaTitle
coverImage: MediaCoverImage
nextEpisode: Int
}

type MediaTitle {
romaji: String
userPreferred: String
}

type MediaCoverImage {
large: String
medium: String
}

type Query {
Media(id: Int, search: String): Media
}


fragment MediaMinimalFrag on Media {
id
type
title {
romaji
userPreferred
}
coverImage {
large
medium
}
}

query MediaMinimal($id: Int, $search: String) {
Media(id: $id, search: $search) {
...MediaMinimalFrag
}
}

query MediaFull($id: Int, $search: String) {
Media(id: $id, search: $search) {
...MediaMinimalFrag
nextEpisode
}
}
Loading

0 comments on commit 712a6bb

Please sign in to comment.