Migrations from V3 to V4


I have followed the steps to migrate the strapi from v3 to v4 from official docs.
Controllers and services does not seem to have migrated properly.
I have 2 issues right now.

  1. Collections from V3 are visible in the admin panel (content type builder and content type manager).

In the Users and Permissions Plugin list of collection types and there permissions is absent.
But the missing collection types and their permissions are available for the admin users.

If I create any new collections with the same name (I will have to delete the existing ones); they appear as they should.

One thing I checked is the permissions endpoint in the admin panel. I checked the source code of the method below and understand that its calculating the list of controllers in that collection type.
Is there any connection?

  1. I changed something in the code and I dont know what. Before the change I was able to access graphql but after the change I am unable to access graphql. I searched on internet but did not get any results.

{"data":null,"error":{"status":401,"name":"UnauthorizedError","message":"Missing or invalid credentials","details":{}}}

Please tell me what I am missing and how to fix it!


1 Like

Can you share what your controller file look like? It should be using factory functions. I just released this blog post, maybe it can help. How To Migrate From Strapi v3 to v4 Walkthrough