Open maxbec opened 10 months ago
We are unable to deep-query the fields of a custom type collection which uses the built-in DirectusUser type.
Query-Code:
export const festivityQueryFields = [ 'id', { assignee: ['*'], calendar_events: ['*'], }, ] satisfies Query<DirectusTypes, Festivities>['fields']; export default async function getFestivities() { return await directusRequest({ restCommand: readItems('festivities', { fields: festivityQueryFields, }), loggingStatement: 'Fetching Festivities', });
Type:
import { DirectusUser } from '@directus/sdk'; export type Festivities = { assignee?: string | DirectusUser<DirectusTypes> | null; calendar_events: any[] | CalendarEvents[]; };
Create a type and link a field with a built-in SDK collection. Then try to query this field with a M2M query.
latest
Self-Hosted (Docker Image)
Likely either related or has the same root cause as https://github.com/directus/directus/issues/19815
Adding a directus collection to the root schema helped and fixed the issue.
directus_files: object;
Describe the Bug
We are unable to deep-query the fields of a custom type collection which uses the built-in DirectusUser type.
Query-Code:
Type:
To Reproduce
Create a type and link a field with a built-in SDK collection. Then try to query this field with a M2M query.
Directus Version
latest
Hosting Strategy
Self-Hosted (Docker Image)