> ## Documentation Index
> Fetch the complete documentation index at: https://nestjs-query.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# v0.14.x to v0.15.x

> In the  the cursor connection type was updated to allow for enabling a  field. When enabling this field  needed to explicitly name each connection type to allow each relation connection to independently enable the  field.

In previous versions of `nestjs-query` the connection type was shared between all instances which caused the totalCount field to not always be exposed. In `v0.15.x` all instances of a connection are uniquely named.

For example, suppose the following DTOS.

<Tabs>
  <Tab title="todo-item.dto.ts">
    todo-item.dto.ts
  </Tab>

  <Tab title="sub-task.dto.ts">
    ```ts theme={null}
    import { FilterableField, Connection } from '@ptc-org/nestjs-query-graphql';
    import { ObjectType, ID, GraphQLISODateTime } from '@nestjs/graphql';
    import { SubTaskDTO } from '../../sub-task/dto/sub-task.dto';

    @ObjectType('TodoItem')
    @Connection('subTasks', () => SubTaskDTO, { enableTotalCount: true })
    export class TodoItemDTO {

      @FilterableField(() => ID)
      id!: number;

      @FilterableField()
      title!: string;

      @FilterableField({ nullable: true })
      description?: string;

      @FilterableField()
      completed!: boolean;

      @FilterableField(() => GraphQLISODateTime)
      created!: Date;

      @FilterableField(() => GraphQLISODateTime)
      updated!: Date;

      @FilterableField()
      priority!: number;
    }
    ```
  </Tab>

  <Tab title="Example">sub-task.dto.ts</Tab>

  <Tab title="Example">
    ```ts theme={null}
    import { FilterableField, Relation } from '@ptc-org/nestjs-query-graphql';
    import { ObjectType, ID, GraphQLISODateTime } from '@nestjs/graphql';
    import { TodoItemDTO } from '../../todo-item/dto/todo-item.dto';

    @ObjectType('SubTask')
    @Relation('todoItem', () => TodoItemDTO, { disableRemove: true })
    export class SubTaskDTO {

      @FilterableField(() => ID)
      id!: number;

      @FilterableField()
      title!: string;

      @FilterableField({ nullable: true })
      description?: string;

      @FilterableField()
      completed!: boolean;

      @FilterableField(() => GraphQLISODateTime)
      created!: Date;

      @FilterableField(() => GraphQLISODateTime)
      updated!: Date;

      @FilterableField()
      todoItemId!: string;
    }
    ```
  </Tab>
</Tabs>

In previous versions the generated graphql would have been

```graphql theme={null}
type TodoItem {
  id: ID!
  title: String!
  description: String
  completed: Boolean!
  created: DateTime!
  updated: DateTime!
  age: Float!
  priority: Float!
  subTasks(paging: CursorPaging = { first: 10 }, filter: SubTaskFilter = {}, sorting: [SubTaskSort!] = []): SubTaskConnection!
}
type SubTaskConnection {
  pageInfo: PageInfo!
  edges: [SubTaskEdge!]!
}
```

In the latest version the relation gets its own connection type.

```graphql theme={null}
type TodoItem {
  id: ID!
  title: String!
  description: String
  completed: Boolean!
  created: DateTime!
  updated: DateTime!
  age: Float!
  priority: Float!
  subTasks(
    paging: CursorPaging = { first: 10 }
    filter: SubTaskFilter = {}
    sorting: [SubTaskSort!] = []
  ): TodoItemSubTasksConnection!
}
type TodoItemSubTasksConnection {
  pageInfo: PageInfo!
  edges: [SubTaskEdge!]!
  totalCount: Int!
}
```

[Edit this page](https://github.com/tripss/nestjs-query/edit/master/docs/migration-guides/v0.14.x-to-v0.15.x)
