yoga2 icon indicating copy to clipboard operation
yoga2 copied to clipboard

Types.ts does not override types

Open homoky opened this issue 5 years ago • 2 comments

I follow the docs here, so please maybe I am doing something wrong here.

I have User model defined via Nexus. It is working, I want extend its root type, I want to add new fields that I can access in parent. I've tried to create types.ts in ./src folder.

// types.ts

interface User {
  test: string;
}

After restarting server the .yoga/nexus.ts does not contain updated types.

homoky avatar May 18 '19 19:05 homoky

Hey there, have you tried exporting your types?

Weakky avatar May 19 '19 17:05 Weakky

Yes I've tried it. Here is simple creating new project, creating types.ts with try to adjust existing root type:

my-app.zip

homoky avatar May 20 '19 09:05 homoky