remove nestjs-query auto-resolver from index-metadata (#22775)

## Summary

Removes the `NestjsQueryGraphQLModule.forFeature` block from
`IndexMetadataModule`, continuing the incremental migration off
`@ptc-org/nestjs-query`.

- Drops the dead auto-generated read surface: `index` and
`indexMetadatas` queries, the `IndexConnection` /
`IndexObjectMetadataConnection` types, and the `Index.objectMetadata`
field. No client consumes these — the frontend reads indexes via
`ObjectMetadata.indexMetadatas`.
- Keeps `IndexMetadataDTO` nestjs-query-compatible (`@Authorize`,
`@FilterableField`, `@QueryOptions`, `@IDField`) because
`ObjectMetadataDTO` still references it via
`@CursorConnection('indexMetadatas')` until object-metadata is migrated.
- Hand-written `createOneIndex` / `deleteOneIndex` mutations and the
`indexFieldMetadataList` resolve-field are unchanged.
- Deletes the now-obsolete `index-metadatas` integration test and
regenerates the GraphQL schema artifacts (frontend + client-sdk).

## Breaking change

This is an intentional GraphQL schema breaking change
(`api-breaking-changes` CI will flag it)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22775?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
This commit is contained in:
Abdul Rahman
2026-07-10 17:30:23 +05:30
committed by GitHub
parent 04c195a54e
commit ffdda50afc
7 changed files with 1174 additions and 1462 deletions
@@ -535,13 +535,6 @@ type Index {
createdAt: DateTime!
updatedAt: DateTime!
indexFieldMetadataList: [IndexField!]!
objectMetadata(
"""Limit or page results."""
paging: CursorPaging! = {first: 10}
"""Specify to filter the records returned."""
filter: ObjectFilter! = {}
): IndexObjectMetadataConnection!
}
"""Type of the index"""
@@ -550,58 +543,6 @@ enum IndexType {
GIN
}
input CursorPaging {
"""Paginate before opaque cursor"""
before: ConnectionCursor
"""Paginate after opaque cursor"""
after: ConnectionCursor
"""Paginate first"""
first: Int
"""Paginate last"""
last: Int
}
"""Cursor for paging through collections"""
scalar ConnectionCursor
input ObjectFilter {
and: [ObjectFilter!]
or: [ObjectFilter!]
id: UUIDFilterComparison
isRemote: BooleanFieldComparison
isActive: BooleanFieldComparison
isSystem: BooleanFieldComparison
isUIEditable: BooleanFieldComparison
isUICreatable: BooleanFieldComparison
isUIReadOnly: BooleanFieldComparison
isSearchable: BooleanFieldComparison
}
input UUIDFilterComparison {
is: Boolean
isNot: Boolean
eq: UUID
neq: UUID
gt: UUID
gte: UUID
lt: UUID
lte: UUID
like: UUID
notLike: UUID
iLike: UUID
notILike: UUID
in: [UUID!]
notIn: [UUID!]
}
input BooleanFieldComparison {
is: Boolean
isNot: Boolean
}
type Object {
id: UUID!
universalIdentifier: String!
@@ -646,6 +587,23 @@ type Object {
): ObjectIndexMetadatasConnection!
}
input CursorPaging {
"""Paginate before opaque cursor"""
before: ConnectionCursor
"""Paginate after opaque cursor"""
after: ConnectionCursor
"""Paginate first"""
first: Int
"""Paginate last"""
last: Int
}
"""Cursor for paging through collections"""
scalar ConnectionCursor
input FieldFilter {
and: [FieldFilter!]
or: [FieldFilter!]
@@ -657,6 +615,28 @@ input FieldFilter {
objectMetadataId: UUIDFilterComparison
}
input UUIDFilterComparison {
is: Boolean
isNot: Boolean
eq: UUID
neq: UUID
gt: UUID
gte: UUID
lt: UUID
lte: UUID
like: UUID
notLike: UUID
iLike: UUID
notILike: UUID
in: [UUID!]
notIn: [UUID!]
}
input BooleanFieldComparison {
is: Boolean
isNot: Boolean
}
input IndexFilter {
and: [IndexFilter!]
or: [IndexFilter!]
@@ -2001,9 +1981,23 @@ type IndexField {
updatedAt: DateTime!
}
type IndexEdge {
"""The node containing the Index"""
node: Index!
type ObjectRecordCount {
objectNamePlural: String!
totalCount: Int!
}
type SearchField {
id: UUID!
fieldMetadataId: UUID!
tsVectorFieldMetadataId: UUID!
position: Float!
createdAt: DateTime!
updatedAt: DateTime!
}
type ObjectEdge {
"""The node containing the Object"""
node: Object!
"""Cursor for this node."""
cursor: ConnectionCursor!
@@ -2023,44 +2017,6 @@ type PageInfo {
endCursor: ConnectionCursor
}
type IndexConnection {
"""Paging information"""
pageInfo: PageInfo!
"""Array of edges."""
edges: [IndexEdge!]!
}
type ObjectEdge {
"""The node containing the Object"""
node: Object!
"""Cursor for this node."""
cursor: ConnectionCursor!
}
type IndexObjectMetadataConnection {
"""Paging information"""
pageInfo: PageInfo!
"""Array of edges."""
edges: [ObjectEdge!]!
}
type ObjectRecordCount {
objectNamePlural: String!
totalCount: Int!
}
type SearchField {
id: UUID!
fieldMetadataId: UUID!
tsVectorFieldMetadataId: UUID!
position: Float!
createdAt: DateTime!
updatedAt: DateTime!
}
type ObjectConnection {
"""Paging information"""
pageInfo: PageInfo!
@@ -2069,6 +2025,14 @@ type ObjectConnection {
edges: [ObjectEdge!]!
}
type IndexEdge {
"""The node containing the Index"""
node: Index!
"""Cursor for this node."""
cursor: ConnectionCursor!
}
type ObjectIndexMetadatasConnection {
"""Paging information"""
pageInfo: PageInfo!
@@ -3107,17 +3071,6 @@ type Query {
"""Specify to filter the records returned."""
filter: ObjectFilter! = {}
): ObjectConnection!
index(
"""The id of the record to find."""
id: UUID!
): Index!
indexMetadatas(
"""Limit or page results."""
paging: CursorPaging! = {first: 10}
"""Specify to filter the records returned."""
filter: IndexFilter! = {}
): IndexConnection!
findOneLogicFunction(input: LogicFunctionIdInput!): LogicFunction!
findManyLogicFunctions: [LogicFunction!]!
getAvailablePackages(input: LogicFunctionIdInput!): JSON!
@@ -3208,6 +3161,19 @@ input AgentIdInput {
id: UUID!
}
input ObjectFilter {
and: [ObjectFilter!]
or: [ObjectFilter!]
id: UUIDFilterComparison
isRemote: BooleanFieldComparison
isActive: BooleanFieldComparison
isSystem: BooleanFieldComparison
isUIEditable: BooleanFieldComparison
isUICreatable: BooleanFieldComparison
isUIReadOnly: BooleanFieldComparison
isSearchable: BooleanFieldComparison
}
input LogicFunctionIdInput {
"""The id of the function."""
id: ID!
@@ -392,7 +392,6 @@ export interface Index {
createdAt: Scalars['DateTime']
updatedAt: Scalars['DateTime']
indexFieldMetadataList: IndexField[]
objectMetadata: IndexObjectMetadataConnection
__typename: 'Index'
}
@@ -1644,50 +1643,6 @@ export interface IndexField {
__typename: 'IndexField'
}
export interface IndexEdge {
/** The node containing the Index */
node: Index
/** Cursor for this node. */
cursor: Scalars['ConnectionCursor']
__typename: 'IndexEdge'
}
export interface PageInfo {
/** true if paging forward and there are more records. */
hasNextPage?: Scalars['Boolean']
/** true if paging backwards and there are more records. */
hasPreviousPage?: Scalars['Boolean']
/** The cursor of the first returned record. */
startCursor?: Scalars['ConnectionCursor']
/** The cursor of the last returned record. */
endCursor?: Scalars['ConnectionCursor']
__typename: 'PageInfo'
}
export interface IndexConnection {
/** Paging information */
pageInfo: PageInfo
/** Array of edges. */
edges: IndexEdge[]
__typename: 'IndexConnection'
}
export interface ObjectEdge {
/** The node containing the Object */
node: Object
/** Cursor for this node. */
cursor: Scalars['ConnectionCursor']
__typename: 'ObjectEdge'
}
export interface IndexObjectMetadataConnection {
/** Paging information */
pageInfo: PageInfo
/** Array of edges. */
edges: ObjectEdge[]
__typename: 'IndexObjectMetadataConnection'
}
export interface ObjectRecordCount {
objectNamePlural: Scalars['String']
totalCount: Scalars['Int']
@@ -1704,6 +1659,26 @@ export interface SearchField {
__typename: 'SearchField'
}
export interface ObjectEdge {
/** The node containing the Object */
node: Object
/** Cursor for this node. */
cursor: Scalars['ConnectionCursor']
__typename: 'ObjectEdge'
}
export interface PageInfo {
/** true if paging forward and there are more records. */
hasNextPage?: Scalars['Boolean']
/** true if paging backwards and there are more records. */
hasPreviousPage?: Scalars['Boolean']
/** The cursor of the first returned record. */
startCursor?: Scalars['ConnectionCursor']
/** The cursor of the last returned record. */
endCursor?: Scalars['ConnectionCursor']
__typename: 'PageInfo'
}
export interface ObjectConnection {
/** Paging information */
pageInfo: PageInfo
@@ -1712,6 +1687,14 @@ export interface ObjectConnection {
__typename: 'ObjectConnection'
}
export interface IndexEdge {
/** The node containing the Index */
node: Index
/** Cursor for this node. */
cursor: Scalars['ConnectionCursor']
__typename: 'IndexEdge'
}
export interface ObjectIndexMetadatasConnection {
/** Paging information */
pageInfo: PageInfo
@@ -2739,8 +2722,6 @@ export interface Query {
objectRecordCounts: ObjectRecordCount[]
object: Object
objects: ObjectConnection
index: Index
indexMetadatas: IndexConnection
findOneLogicFunction: LogicFunction
findManyLogicFunctions: LogicFunction[]
getAvailablePackages: Scalars['JSON']
@@ -3447,31 +3428,10 @@ export interface IndexGenqlSelection{
createdAt?: boolean | number
updatedAt?: boolean | number
indexFieldMetadataList?: IndexFieldGenqlSelection
objectMetadata?: (IndexObjectMetadataConnectionGenqlSelection & { __args: {
/** Limit or page results. */
paging: CursorPaging,
/** Specify to filter the records returned. */
filter: ObjectFilter} })
__typename?: boolean | number
__scalar?: boolean | number
}
export interface CursorPaging {
/** Paginate before opaque cursor */
before?: (Scalars['ConnectionCursor'] | null),
/** Paginate after opaque cursor */
after?: (Scalars['ConnectionCursor'] | null),
/** Paginate first */
first?: (Scalars['Int'] | null),
/** Paginate last */
last?: (Scalars['Int'] | null)}
export interface ObjectFilter {and?: (ObjectFilter[] | null),or?: (ObjectFilter[] | null),id?: (UUIDFilterComparison | null),isRemote?: (BooleanFieldComparison | null),isActive?: (BooleanFieldComparison | null),isSystem?: (BooleanFieldComparison | null),isUIEditable?: (BooleanFieldComparison | null),isUICreatable?: (BooleanFieldComparison | null),isUIReadOnly?: (BooleanFieldComparison | null),isSearchable?: (BooleanFieldComparison | null)}
export interface UUIDFilterComparison {is?: (Scalars['Boolean'] | null),isNot?: (Scalars['Boolean'] | null),eq?: (Scalars['UUID'] | null),neq?: (Scalars['UUID'] | null),gt?: (Scalars['UUID'] | null),gte?: (Scalars['UUID'] | null),lt?: (Scalars['UUID'] | null),lte?: (Scalars['UUID'] | null),like?: (Scalars['UUID'] | null),notLike?: (Scalars['UUID'] | null),iLike?: (Scalars['UUID'] | null),notILike?: (Scalars['UUID'] | null),in?: (Scalars['UUID'][] | null),notIn?: (Scalars['UUID'][] | null)}
export interface BooleanFieldComparison {is?: (Scalars['Boolean'] | null),isNot?: (Scalars['Boolean'] | null)}
export interface ObjectGenqlSelection{
id?: boolean | number
universalIdentifier?: boolean | number
@@ -3515,8 +3475,22 @@ export interface ObjectGenqlSelection{
__scalar?: boolean | number
}
export interface CursorPaging {
/** Paginate before opaque cursor */
before?: (Scalars['ConnectionCursor'] | null),
/** Paginate after opaque cursor */
after?: (Scalars['ConnectionCursor'] | null),
/** Paginate first */
first?: (Scalars['Int'] | null),
/** Paginate last */
last?: (Scalars['Int'] | null)}
export interface FieldFilter {and?: (FieldFilter[] | null),or?: (FieldFilter[] | null),id?: (UUIDFilterComparison | null),isActive?: (BooleanFieldComparison | null),isSystem?: (BooleanFieldComparison | null),isUIEditable?: (BooleanFieldComparison | null),isUIReadOnly?: (BooleanFieldComparison | null),objectMetadataId?: (UUIDFilterComparison | null)}
export interface UUIDFilterComparison {is?: (Scalars['Boolean'] | null),isNot?: (Scalars['Boolean'] | null),eq?: (Scalars['UUID'] | null),neq?: (Scalars['UUID'] | null),gt?: (Scalars['UUID'] | null),gte?: (Scalars['UUID'] | null),lt?: (Scalars['UUID'] | null),lte?: (Scalars['UUID'] | null),like?: (Scalars['UUID'] | null),notLike?: (Scalars['UUID'] | null),iLike?: (Scalars['UUID'] | null),notILike?: (Scalars['UUID'] | null),in?: (Scalars['UUID'][] | null),notIn?: (Scalars['UUID'][] | null)}
export interface BooleanFieldComparison {is?: (Scalars['Boolean'] | null),isNot?: (Scalars['Boolean'] | null)}
export interface IndexFilter {and?: (IndexFilter[] | null),or?: (IndexFilter[] | null),id?: (UUIDFilterComparison | null),isCustom?: (BooleanFieldComparison | null)}
export interface ApplicationGenqlSelection{
@@ -4758,9 +4732,27 @@ export interface IndexFieldGenqlSelection{
__scalar?: boolean | number
}
export interface IndexEdgeGenqlSelection{
/** The node containing the Index */
node?: IndexGenqlSelection
export interface ObjectRecordCountGenqlSelection{
objectNamePlural?: boolean | number
totalCount?: boolean | number
__typename?: boolean | number
__scalar?: boolean | number
}
export interface SearchFieldGenqlSelection{
id?: boolean | number
fieldMetadataId?: boolean | number
tsVectorFieldMetadataId?: boolean | number
position?: boolean | number
createdAt?: boolean | number
updatedAt?: boolean | number
__typename?: boolean | number
__scalar?: boolean | number
}
export interface ObjectEdgeGenqlSelection{
/** The node containing the Object */
node?: ObjectGenqlSelection
/** Cursor for this node. */
cursor?: boolean | number
__typename?: boolean | number
@@ -4780,51 +4772,6 @@ export interface PageInfoGenqlSelection{
__scalar?: boolean | number
}
export interface IndexConnectionGenqlSelection{
/** Paging information */
pageInfo?: PageInfoGenqlSelection
/** Array of edges. */
edges?: IndexEdgeGenqlSelection
__typename?: boolean | number
__scalar?: boolean | number
}
export interface ObjectEdgeGenqlSelection{
/** The node containing the Object */
node?: ObjectGenqlSelection
/** Cursor for this node. */
cursor?: boolean | number
__typename?: boolean | number
__scalar?: boolean | number
}
export interface IndexObjectMetadataConnectionGenqlSelection{
/** Paging information */
pageInfo?: PageInfoGenqlSelection
/** Array of edges. */
edges?: ObjectEdgeGenqlSelection
__typename?: boolean | number
__scalar?: boolean | number
}
export interface ObjectRecordCountGenqlSelection{
objectNamePlural?: boolean | number
totalCount?: boolean | number
__typename?: boolean | number
__scalar?: boolean | number
}
export interface SearchFieldGenqlSelection{
id?: boolean | number
fieldMetadataId?: boolean | number
tsVectorFieldMetadataId?: boolean | number
position?: boolean | number
createdAt?: boolean | number
updatedAt?: boolean | number
__typename?: boolean | number
__scalar?: boolean | number
}
export interface ObjectConnectionGenqlSelection{
/** Paging information */
pageInfo?: PageInfoGenqlSelection
@@ -4834,6 +4781,15 @@ export interface ObjectConnectionGenqlSelection{
__scalar?: boolean | number
}
export interface IndexEdgeGenqlSelection{
/** The node containing the Index */
node?: IndexGenqlSelection
/** Cursor for this node. */
cursor?: boolean | number
__typename?: boolean | number
__scalar?: boolean | number
}
export interface ObjectIndexMetadatasConnectionGenqlSelection{
/** Paging information */
pageInfo?: PageInfoGenqlSelection
@@ -5943,14 +5899,6 @@ export interface QueryGenqlSelection{
paging: CursorPaging,
/** Specify to filter the records returned. */
filter: ObjectFilter} })
index?: (IndexGenqlSelection & { __args: {
/** The id of the record to find. */
id: Scalars['UUID']} })
indexMetadatas?: (IndexConnectionGenqlSelection & { __args: {
/** Limit or page results. */
paging: CursorPaging,
/** Specify to filter the records returned. */
filter: IndexFilter} })
findOneLogicFunction?: (LogicFunctionGenqlSelection & { __args: {input: LogicFunctionIdInput} })
findManyLogicFunctions?: LogicFunctionGenqlSelection
getAvailablePackages?: { __args: {input: LogicFunctionIdInput} }
@@ -6037,6 +5985,8 @@ export interface AgentIdInput {
/** The id of the agent. */
id: Scalars['UUID']}
export interface ObjectFilter {and?: (ObjectFilter[] | null),or?: (ObjectFilter[] | null),id?: (UUIDFilterComparison | null),isRemote?: (BooleanFieldComparison | null),isActive?: (BooleanFieldComparison | null),isSystem?: (BooleanFieldComparison | null),isUIEditable?: (BooleanFieldComparison | null),isUICreatable?: (BooleanFieldComparison | null),isUIReadOnly?: (BooleanFieldComparison | null),isSearchable?: (BooleanFieldComparison | null)}
export interface LogicFunctionIdInput {
/** The id of the function. */
id: Scalars['ID']}
@@ -7776,46 +7726,6 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null
const IndexEdge_possibleTypes: string[] = ['IndexEdge']
export const isIndexEdge = (obj?: { __typename?: any } | null): obj is IndexEdge => {
if (!obj?.__typename) throw new Error('__typename is missing in "isIndexEdge"')
return IndexEdge_possibleTypes.includes(obj.__typename)
}
const PageInfo_possibleTypes: string[] = ['PageInfo']
export const isPageInfo = (obj?: { __typename?: any } | null): obj is PageInfo => {
if (!obj?.__typename) throw new Error('__typename is missing in "isPageInfo"')
return PageInfo_possibleTypes.includes(obj.__typename)
}
const IndexConnection_possibleTypes: string[] = ['IndexConnection']
export const isIndexConnection = (obj?: { __typename?: any } | null): obj is IndexConnection => {
if (!obj?.__typename) throw new Error('__typename is missing in "isIndexConnection"')
return IndexConnection_possibleTypes.includes(obj.__typename)
}
const ObjectEdge_possibleTypes: string[] = ['ObjectEdge']
export const isObjectEdge = (obj?: { __typename?: any } | null): obj is ObjectEdge => {
if (!obj?.__typename) throw new Error('__typename is missing in "isObjectEdge"')
return ObjectEdge_possibleTypes.includes(obj.__typename)
}
const IndexObjectMetadataConnection_possibleTypes: string[] = ['IndexObjectMetadataConnection']
export const isIndexObjectMetadataConnection = (obj?: { __typename?: any } | null): obj is IndexObjectMetadataConnection => {
if (!obj?.__typename) throw new Error('__typename is missing in "isIndexObjectMetadataConnection"')
return IndexObjectMetadataConnection_possibleTypes.includes(obj.__typename)
}
const ObjectRecordCount_possibleTypes: string[] = ['ObjectRecordCount']
export const isObjectRecordCount = (obj?: { __typename?: any } | null): obj is ObjectRecordCount => {
if (!obj?.__typename) throw new Error('__typename is missing in "isObjectRecordCount"')
@@ -7832,6 +7742,22 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null
const ObjectEdge_possibleTypes: string[] = ['ObjectEdge']
export const isObjectEdge = (obj?: { __typename?: any } | null): obj is ObjectEdge => {
if (!obj?.__typename) throw new Error('__typename is missing in "isObjectEdge"')
return ObjectEdge_possibleTypes.includes(obj.__typename)
}
const PageInfo_possibleTypes: string[] = ['PageInfo']
export const isPageInfo = (obj?: { __typename?: any } | null): obj is PageInfo => {
if (!obj?.__typename) throw new Error('__typename is missing in "isPageInfo"')
return PageInfo_possibleTypes.includes(obj.__typename)
}
const ObjectConnection_possibleTypes: string[] = ['ObjectConnection']
export const isObjectConnection = (obj?: { __typename?: any } | null): obj is ObjectConnection => {
if (!obj?.__typename) throw new Error('__typename is missing in "isObjectConnection"')
@@ -7840,6 +7766,14 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null
const IndexEdge_possibleTypes: string[] = ['IndexEdge']
export const isIndexEdge = (obj?: { __typename?: any } | null): obj is IndexEdge => {
if (!obj?.__typename) throw new Error('__typename is missing in "isIndexEdge"')
return IndexEdge_possibleTypes.includes(obj.__typename)
}
const ObjectIndexMetadatasConnection_possibleTypes: string[] = ['ObjectIndexMetadatasConnection']
export const isObjectIndexMetadatasConnection = (obj?: { __typename?: any } | null): obj is ObjectIndexMetadatasConnection => {
if (!obj?.__typename) throw new Error('__typename is missing in "isObjectIndexMetadatasConnection"')
File diff suppressed because it is too large Load Diff