Is it possible to extend graphql plugin in strapi V4 to remove nested data and attributes fields?

You can see the general flow here.

When making a query, we add a resolver to the content type’s definition, then calls the entity service and return the raw data which gets transformed into the needed format. The data then get passed to the graphql types (e.g. for the entity) and their resolvers to format the data into the id/attributes structure

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.

1 Like