graphql-ppx
graphql-ppx copied to clipboard
Inline fragment inside a fragment doesn't work
fragment Html on Node {
... on MarkdownRemark {
__typename
html
}
}
The compiler fails with this message:
Error: Inline fragments are not yet supported
However, using the inline fragment inside a regular query works as expected:
query {
foo {
bar {
... on MarkdownRemark {
__typename
html
}
}
}
}
That query compiles without error.
Thanks for getting this on the radar! Should be supported in fragments as well indeed!
Inline fragments are not yet supported except when being used in interfaces.
I've been avoiding inline fragments in my codebase because of lack of support, but I just came across a situation where not having them results in some duplication that will be hard to maintain. Is there a chance we can expect this feature to be available soon?
PR is welcome :)