Skip to content

Comment on ExpressJS vs. Actix-Web: performance and running cost comparisonparent

Comments

If they're creating types with optional keys it's probably because that's how you're defining your types in GraphQL. E.g. with

type Foo { bar: String }

bar would be optional in the Typescript type because it's specified as optional in the GraphQL type. You would need to do the following to make it required:

type Foo { bar: String! }

I mean... All keys can be optimal in reality, but in real world you can't put all non optional because defeats the purpose of graphql.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.