When returning gql extended types, they are always null

System Information
  • Strapi Version: 4.5.6
  • Operating System: Windows 11
  • Database: postgres
  • Node Version: v14.21.3
  • NPM Version: 6.14.18
  • Yarn Version:

I’m using strapi 4.5.6 and GQL plugin, I have custom GQL resolvers and I need to expand types to return what I need. To be more precise I’m trying to extend some components with nexus, that are in a dynamic zone.

these components need to have an index and user_completed fields, so I extended them using Nexus, and GQL recognize all changes. Can be queried now, but the result for these fields will always be “null” for some reason. Also, I checked the response on BE before returning it, and those fields are there.

I was thinking maybe it’s something with Nexus, and I add typeDefs as raw SDL instead of Nexus extendType, but still no luck.

Gql will see all of these changes, but when you query result is null always. The only way that worked for me, is if I force “questions” to be JSON type, then I will get “index” and “user_completed”.

Exactly the same thing worked for me in strapi v3