Thank you very much for opening a space for a discussion. I think it should be clear that you had the best intentions with the change.
However, the GraphQL response in v4 feels very complicated and cumbersome. I understand there shouldn’t be a breaking change and I’m happy you follow the semver conventions.
What about a non-breaking change, which still reverts part of it: you could output the data under attributes
and the root object at the same time. Instead of changing the schema, it would extend it and therefore be a non-breaking change:
query posts {
// current v4
data {
attributes {
title
}
}
meta {}
// desired v4 alternative
data {
title
}
}
At some point the question was raised where to put the meta
information in this flat case and somebody mentioned it could just be repeated with every entity:
query posts {
data {
title
}
meta {}
}
would lead to:
[
data: {
{
title: ''
}
},
meta: {}
]
I don’t know what the implications would look like from an implementation perspective, but from a users perspective this wouldn’t be bad.
Is this something worth considering?