简体   繁体   中英

Nexus GraphQl does not generate types when schema.prisma is changed

So, the core of the problem is described in title, but When I commiting changes to schema.prisma my autogenerated export types in./generated/nexus.ts don't refresh. I also don't see changes in apollo playground on my localhost:4000 I tried to migrate my schema and 'npx generate path to my schema ' but they didn't work neither. Without this I can't proceed with writing mutations and queries because TS can't see new types.

Ok, so I managed to fix it, if any other faced with this problem so the solution can be found here https://github.com/prisma/prisma-examples/blob/latest/typescript/graphql-auth/README.md The main issue was that you have to run your server after migration with db and after changes to schema.ts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM