ardeois / graphql-codegen-typescript-mock-data

[GraphQL Codegen Plugin](https://github.com/dotansimha/graphql-code-generator) for building mock data based on the schema.
MIT License
134 stars 46 forks source link

feat: optional chaining for overrides #87

Closed JimmyPaolini closed 2 years ago

JimmyPaolini commented 2 years ago

A small improvement to use optional chaining in assessing overrides

JimmyPaolini commented 2 years ago

Ah you're right I didn't think of that, maybe just overrides?.hasOwnProperty('${fieldName}') ? overrides.${fieldName} : ${value}; would work, but it's just a very minor syntax improvement.

ardeois commented 2 years ago

Yeah exactly, I'm not sure it's worth adding this improvement. Are you okay if we close this issue?

JimmyPaolini commented 2 years ago

Yup sounds good, thank you!

ardeois commented 2 years ago

Improvement is too minor to benefit from a commit, so we agreed not to go forward with this PR