|
I am wondering what the best way for customizing the connection types generated for Let's say I want to implement a GraphQL service matching this example from the Introduction to GraphQL which has an extra query HeroComparison($first: Int = 3) {
leftComparison: hero(episode: EMPIRE) {
...comparisonFields
}
rightComparison: hero(episode: JEDI) {
...comparisonFields
}
}
fragment comparisonFields on Character {
name
friendsConnection(first: $first) {
totalCount
edges {
node {
name
}
}
}
}As far as I understand Is there a smarter way than replacing |
Answered by
vojtapol
Jan 1, 2021
Replies: 1 comment
|
Currently, the only way to achieve that is to indeed write your own type factory. You can start by copy pasting the existing |
0 replies
Answer selected by
vojtapol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the only way to achieve that is to indeed write your own type factory. You can start by copy pasting the existing
RelayConnectionFactory. Moreover, you will need to choose a different directive as@connectionis already taken by the existing Relay implementation.