Skip to main content

Removed Public ConnectionType and SortType function.

In versions prior to v0.24.0 the ConnectionType and SortType functions could be used to get a reference to a Connection and Sort graphql implementation. In v0.24.0 there public methods were removed in favor of pulling them off of the QueryArgs. This change was made to remove possibility of creating ConnectionTypes and SortTypes that are incompatible with the QueryArgsType.

Old

New

@QueryOptions Decorator

In previous versions you had to specify options for querying and connections in your resolver. In v0.24.0 a new @QueryOptions decorator was introduced to allow specifying all query related options along side the DTO, instead of splitting the configuration between the resolver and DTO. The new @QueryOptions provides a few benefits.
  • Better re-use across types by avoiding passing configuration options all the way through the code to each piece that may need them.
  • Decoupling query options from the resolver. This puts us in a better position to decouple the DTO definition from the transport layer (e.g. graphql)
  • Keeps DTO configuration options closer to the source.

Old

todo-item.module.ts

New

todo-item.dto.ts
Edit this page