-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add example of how to use codegen without gql clients
- Loading branch information
Showing
3 changed files
with
2,058 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
packages/graphql_codegen/test/assets/issue_370/document.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
Oops, something went wrong.