Can the ID field on the single-entity generated resolvers be extended to be an object? (Multiple Primary Columns) #338
-
Hey! So I'm having an issue while trying to use the single-entity generated endpoint from Nestjs-Query. I understand the basic structure of that endpoint would be This error comes from TypeORM, but looks like (and as per my investigation) It's expecting an object there, which can be extended If the resolver is manually made but since these resolvers are generated, is there a way for me to tell the generated resolver to extend the ID to an object, so It can process that object? (Bwt I already tried with stringify JSON and does nto work either, typeorm It's expecting an actual object) Thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Maybe checkout IDField. Not sure if it works with multiple fields, but you can always try |
Beta Was this translation helpful? Give feedback.
For solution of this ^ since we use views to connect to generated resolvers, I created a compound id using the entity ids
${id1}-${id2}-...
and used that as unique primary key.