Canary. When I add fields to a
schema.prisma model and to its associated
graphql/<model>.sdl.ts file, I expect running
yarn rw g types will result in those fields being included in
graphql.d.ts (web and api) as needed for general scaffolding queries and mutations. They do seem to get added to the input types, but they do NOT get added to the generated query and mutation types.
I’ve tried deleting
graphql.d.ts and rerunning
yarn rw g types but for some reason only the fields that were originally added in the schema.prisma model are generated, none of the new fields.
Could you write up an issue in GitHub with steps tk reproduce?
Fresh eyes helped. I was assuming yesterday that the loss of the new fields was happening on save but in actuality, it was happening on subsequent FindEditById query. That made me look into the web-side Cell code and I immediately realized I failed to add the new fields to the Cell queries. The updates were working the whole time.
Once I updated the cell queries, I relaized the second thing I didn’t know: That the graphql.t.ts web-side files are autogenerated from client-side code. I thought they were entirely driven by schema and sdl code defined in the API, which is why I spent all day yesterday looking there. It all makes much more sense what is going on now.