Martijn de Haan

Results 25 comments of Martijn de Haan

I made a change to address this earlier. https://github.com/correttojs/graphql-codegen-apollo-next-ssr/pull/258

I ran into this as well. To resolve, I patched the inject repository by checking if the metadata exists by calling `connection.hasMetadata` for the entity type. If not, I assume...

Is this something you can advise on @MichalLytek as you've approved #37?

I don't mind defaulting to `unknown` instead of `any`, but can we have something like this `json(): Promise;` instead?

Aha, I see. Up to you of course. In my opinion it's a bit more ergonomic to provide a type argument in the cases where you opt out of any...

So, regarding the type of the column in the select row, you are right. Mammoth defaults to `undefined` and not to `null` or `null | undefined`. Personally, I generally try...

In your opinion, what should the type be of a nullable column's value in a row?

That's interesting. I've also seen codebases where null is avoided and undefined is used instead. There is even a specific case in [eslint's eqeqeq rule](https://eslint.org/docs/rules/eqeqeq#require-and-eqeqeq) to warn when doing strict...

Personally, I prefer never to use null and always use undefined. I make no semantic difference between undefined and null. This simplifies a lot of code in my opinion. But,...

I agree it's error prone. TypeScript 4.4 is addressing this through exact optional property types though. https://devblogs.microsoft.com/typescript/announcing-typescript-4-4-beta/#exact-optional-property-types.