Codegen chokes on FragmentSpread operators in the wrong locations. e.g.:
fragment PartialBlogPost on BlogPost {
title
}
query OperationName {
interface {
id
... on BlogPost {
...PartialBlogPost
}
... on Image {
url
}
}
}
hits an AssertionError
π’
We hjt the same error in the following special case:
fragment AnimalProjection on Animal {
age
}
query OperationName {
__typename
union {
... on Animal {
...AnimalProjection
}
... on Person {
name
}
}
}
At least for python, the rule has typically been that fragments
(when included via a Spread operator) become a shared class so the client doesn't generate multiple versions of this same object. So there is a special case in the above where if we have a FragmentSpread
with no common fields (other than __typename
), then we probably should continue to re-use the existing type.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too