isAbstract
aerik2 opened this issue · comments
Seems like this was removed here: MichalLytek/type-graphql#1455
But it's still being generated:
src/generated/graphql/resolvers/outputs/WellIdentifierMaxAggregate.ts:7:3 - error TS2345: Argument of type '{ isAbstract: boolean; }' is not assignable to parameter of type 'ObjectTypeOptions'.
Object literal may only specify known properties, and 'isAbstract' does not exist in type 'ObjectTypeOptions'.
7 isAbstract: true
~~~~~~~~~~~~~~~~
src/generated/graphql/resolvers/outputs/WellIdentifierMinAggregate.ts:7:3 - error TS2345: Argument of type '{ isAbstract: boolean; }' is not assignable to parameter of type 'ObjectTypeOptions'.
Object literal may only specify known properties, and 'isAbstract' does not exist in type 'ObjectTypeOptions'.
7 isAbstract: true
~~~~~~~~~~~~~~~~
src/generated/graphql/resolvers/outputs/WellIdentifiersOnOrdersCountAggregate.ts:7:3 - error TS2345: Argument of type '{ isAbstract: boolean; }' is not assignable to parameter of type 'ObjectTypeOptions'.
Object literal may only specify known properties, and 'isAbstract' does not exist in type 'ObjectTypeOptions'.
7 isAbstract: true
Fixed with this script:
const replace = require("replace-in-file");
const results = replace.sync({
files: "src/generated/graphql/**/*.ts",
processor: (input) => input.replace(/isAbstract: true/g, ""),
countMatches: true,
});
Same problem here... Any update on this?
That's the issue with breaking changes 😔
That's the issue with breaking changes 😔
What about throwing it behind a flag?
Also curious because the above PR are your changes, did it happen upstream somewhere?
What about throwing it behind a flag?
We can even try to read the TypeGraphQL version from project package.json
and apply that conditional isAbstract
generation automatically, so the flag would be used only when the detection mechanism failed.
@MichalLytek is there something we can do to temporally solve this issue?
I think this line here type-class.ts:193 should be removed
@MichalLytek I just created a PR to remove the flag from Model, Input and Output clases. #393
Closing as resolved by 19e841b 🔒