diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e8ea08c548..fe1d7d9d5a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,10 +2,6 @@ /docs/*.md @benhaynes -/packages/cli @WoLfulus -/packages/sdk @WoLfulus -/packages/gatsby-source-directus @WoLfulus - /packages/shared @nickrum /packages/extension-sdk @nickrum /app/vite.config.js @nickrum diff --git a/api/src/database/run-ast.ts b/api/src/database/run-ast.ts index a3baeb0abc..f08661eeac 100644 --- a/api/src/database/run-ast.ts +++ b/api/src/database/run-ast.ts @@ -154,7 +154,6 @@ async function parseCurrentLevel( function getColumnPreprocessor(knex: Knex, schema: SchemaOverview, table: string) { const helper = getGeometryHelper(); - return function (column: string): Knex.Raw { const field = schema.collections[table].fields[column]; diff --git a/api/src/services/graphql.ts b/api/src/services/graphql.ts index eeb1ba34a6..de98642255 100644 --- a/api/src/services/graphql.ts +++ b/api/src/services/graphql.ts @@ -1248,6 +1248,8 @@ export class GraphQLService { validateQuery(query); + validateQuery(query); + return query; } diff --git a/api/src/utils/apply-query.ts b/api/src/utils/apply-query.ts index 15436bf94e..e28cadae99 100644 --- a/api/src/utils/apply-query.ts +++ b/api/src/utils/apply-query.ts @@ -444,6 +444,23 @@ export function applyFilter( if (operator == '_nintersects_bbox') { dbQuery[logical].whereRaw(geometryHelper.nintersects_bbox(key, compareValue)); } + + const geometryHelper = getGeometryHelper(); + + if (operator == '_intersects') { + dbQuery[logical].whereRaw(geometryHelper.intersects(key, compareValue)); + } + + if (operator == '_nintersects') { + dbQuery[logical].whereRaw(geometryHelper.nintersects(key, compareValue)); + } + if (operator == '_intersects_bbox') { + dbQuery[logical].whereRaw(geometryHelper.intersects_bbox(key, compareValue)); + } + + if (operator == '_nintersects_bbox') { + dbQuery[logical].whereRaw(geometryHelper.nintersects_bbox(key, compareValue)); + } } function getWhereColumn(path: string[], collection: string) { diff --git a/changelog.md b/changelog.md index 61b1feaf0b..f287fdb108 100644 --- a/changelog.md +++ b/changelog.md @@ -7,40 +7,28 @@ _Changes marked with a :warning: contain potential breaking changes depending on ### :rocket: Improvements - **App** - - [#7358](https://github.com/directus/directus/pull/7358) Add missing translations - ([@dimitrov-adrian](https://github.com/dimitrov-adrian)) + - [#7358](https://github.com/directus/directus/pull/7358) Add missing translations ([@dimitrov-adrian](https://github.com/dimitrov-adrian)) - **API** - - [#7310](https://github.com/directus/directus/pull/7310) Add permission check for sqlite, upload and extensions - directories ([@paescuj](https://github.com/paescuj)) + - [#7310](https://github.com/directus/directus/pull/7310) Add permission check for sqlite, upload and extensions directories ([@paescuj](https://github.com/paescuj)) ### :bug: Bug Fixes - **API** - - [#7331](https://github.com/directus/directus/pull/7331) Check for non-existing parent pk records - ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7323](https://github.com/directus/directus/pull/7323) Check for related collection before creation relation - ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7319](https://github.com/directus/directus/pull/7319) Fix graphql GET request cache query extraction - ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7315](https://github.com/directus/directus/pull/7315) Clear the file payload after file upload - ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7312](https://github.com/directus/directus/pull/7312) Fix uuid resolving in DBs without returning support - ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7331](https://github.com/directus/directus/pull/7331) Check for non-existing parent pk records ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7323](https://github.com/directus/directus/pull/7323) Check for related collection before creation relation ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7319](https://github.com/directus/directus/pull/7319) Fix graphql GET request cache query extraction ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7315](https://github.com/directus/directus/pull/7315) Clear the file payload after file upload ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7312](https://github.com/directus/directus/pull/7312) Fix uuid resolving in DBs without returning support ([@rijkvanzanten](https://github.com/rijkvanzanten)) - **App** - - [#7327](https://github.com/directus/directus/pull/7327) Fix schema field types not being translated in the app - ([@dimitrov-adrian](https://github.com/dimitrov-adrian)) - - [#7322](https://github.com/directus/directus/pull/7322) Fix colors on different types - ([@dimitrov-adrian](https://github.com/dimitrov-adrian)) + - [#7327](https://github.com/directus/directus/pull/7327) Fix schema field types not being translated in the app ([@dimitrov-adrian](https://github.com/dimitrov-adrian)) + - [#7322](https://github.com/directus/directus/pull/7322) Fix colors on different types ([@dimitrov-adrian](https://github.com/dimitrov-adrian)) - **sdk** - - [#7304](https://github.com/directus/directus/pull/7304) Fix HTTP method for collections.createMany in SDK - ([@paescuj](https://github.com/paescuj)) + - [#7304](https://github.com/directus/directus/pull/7304) Fix HTTP method for collections.createMany in SDK ([@paescuj](https://github.com/paescuj)) ### :package: Dependency Updates -- [#7303](https://github.com/directus/directus/pull/7303) update dependency rollup to v2.56.2 - ([@renovate[bot]](https://github.com/apps/renovate)) -- [#7300](https://github.com/directus/directus/pull/7300) update dependency eslint-plugin-vue to v7.16.0 - ([@renovate[bot]](https://github.com/apps/renovate)) +- [#7303](https://github.com/directus/directus/pull/7303) update dependency rollup to v2.56.2 ([@renovate[bot]](https://github.com/apps/renovate)) +- [#7300](https://github.com/directus/directus/pull/7300) update dependency eslint-plugin-vue to v7.16.0 ([@renovate[bot]](https://github.com/apps/renovate)) ## v9.0.0-rc.89 (August 9, 2021)