I have been trying to extend graphql plugin to be able to remove the nested data and attributes. But after checking the internal code I’m not sure if the response by a function inside graphql plugin.
would you please help if this is something that can be extended? And if yes which function should I extend to be able to change the returned json object using graphql API.
I’m using strapi v4.
The only possible way to accomplish what you are looking to do is with custom resolvers with custom types that will return the data in the format that you require.
Thank you to @Convly for the help answering this question.