Skip to content

Commit

Permalink
feat: Add example
Browse files Browse the repository at this point in the history
  • Loading branch information
budde377 committed Feb 1, 2023
1 parent 37b1f96 commit 26280d2
Show file tree
Hide file tree
Showing 2 changed files with 1,197 additions and 0 deletions.
52 changes: 52 additions & 0 deletions packages/graphql_codegen/test/assets/issue_237/document.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
query GetFullProfile($getId: ID!) {
profile {
get(id: $getId) {
...FullProfile
}
}
}

fragment FullProfile on Profile {
id

featuredMedia {
...Media
}
}
fragment Media on Media {
... on Image {
id
src
thumbnailSrc
}
... on Video {
id
src
}
}

type Image {
id: ID!
src: String!
thumbnailSrc: String!
}

type Video {
id: ID!
src: String!
}

union Media = Image | Video

type Profile {
id: ID!
featuredMedia: [Media!]!
}

type ProfileWrapper {
get(id: ID!): Profile
}

type Query {
profile: ProfileWrapper
}
Loading

0 comments on commit 26280d2

Please sign in to comment.