Open
Description
Expected Behavior
Using flatten on a struct without any other fields should work, as it used to. This is a regression. And yes I know that this pattern is strange but I have good reasons to be using it, haha.
Actual Behavior
It gives an error now:
error: A GraphQL Object type must define one or more fields.
Steps to Reproduce the Problem
#[derive(Debug, SimpleObject)]
pub struct Inner {
pub foo: String
}
pub struct Foo;
#[Object]
impl Foo {
#[graphql(flatten)]
async fn _inner(&self) -> Inner {
Inner {
foo: "bar".to_string()
}
}
}
Specifications
- Version: 7.0.2
- Platform: macos