Commit Graph

43 Commits

Author SHA1 Message Date
Nicola Krumschmidt
d64ca14348 Explicitly set catch parameters to any type (#7654)
This fixes not being able to build the repo due to type issues
introduced by the Typescript 4.4 option "useUnknownInCatchVariables",
which is enabled by default in strict mode.
2021-08-27 10:33:30 -04:00
Rijk van Zanten
92e1ee77bd Add support for Conditional Fields (#6864)
* Add conditions field to directus_fields

* Add conditions configuration

* Apply conditional overrides

* Handle conditions in nested groups

* Fix reverse mutating conditions

* Start on filter setup interface

* Move field types/constants to shared

* [WIP] Updated client side filter validation

* Support logical operators in client validation step

* Use new validation util in conditions check

* Add nesting in filter seutp

* Add filter rule setup configurator

* Fixes that should've been done in the merge

* Strip out filter-settings interface

TBD in a new PR

* Move browser to index
2021-07-26 18:02:24 -04:00
Rijk van Zanten
68add053b7 Fixed issue that would prevent the corresponding o2m field from being created on m2o relational setup (#6060)
Fixes #6009
2021-06-03 23:56:22 -04:00
rijkvanzanten
74861e6f81 Add default display template for directus_files
Fixes #5364
2021-04-29 20:40:52 -04:00
rijkvanzanten
801e868554 Fix remaining eslint errors
h/t @paescuj
2021-04-29 15:55:12 -04:00
Rijk van Zanten
dd551f3571 Add non-items system Resolvers (#4863)
* Add auth resolvers

* Add password request/reset

* Add up until file import

* Make revisions read only

* Add server resolvers

* Add utils

* Add schema resolvers for schema manipulation
2021-04-06 18:04:35 -04:00
Rijk van Zanten
f90c31b798 GraphQL 2.0 (#4625)
* Start on GraphQL "2.0", add methodnotallowed exceptoin

* Fix relative file pointer in peer dep

* [WIP] Add pre-filtered schema to SchemaOverview

* Use root schema as is, add reduce-schema util

* Use reduceSchema in the wild

* Base schema on local reduced schema

* Remove todo

* Use graphql-compose to build out schema

* Start restructuring resolvers

* Add create mutation

* Return boolean true for empty create mutation selections

* Add update mutation

* Add delete mutation

* Add system/items scoping

* Fix merge conflicts for real now

* Use system services, rename ids->keys

* Start on docs on mutations

* Updates to match main

* Add fetch-by-id

* Add one/many resolvers for mutations

* Check system collection rows for singleton

* Fix resolver extraction for single read

* Share delete return type

* Add comments

* Use collection root name for readable type

* Add specs endpoint for GraphQL SDL

* Update docs

* Add note on SDL spec

* Fix delete single example

* Remove package-lock

* Fix collection read scoping in non-read
2021-03-30 17:06:35 -04:00
rijkvanzanten
3d33b9db55 Allow and ignore null schema in field update
Fixes #4254
2021-02-23 17:06:35 -05:00
Nitwel
953b141245 fix fields not updateable because type is null (#4061) 2021-02-15 12:01:26 -05:00
Rijk van Zanten
81fc8443df Don't wrap text in nav (#4035)
* Move v-list-item-text to v-text-overflow, use in tables

* Fix type issue
2021-02-12 16:39:17 -05:00
Rijk van Zanten
ee3f5cbad3 Various m2a builder fixes (#4032)
* Fix drawer opening empty item after sort

* Fix null sorting

* Fix sending null for a type in field creation

* Fix sort / edit existing on sorted values in m2a builder

Fixes #4005, fixes #4007

* Remove stray console log
2021-02-12 15:23:23 -05:00
rijkvanzanten
351a6991dd Fix field name validation on field update 2021-02-11 14:46:53 -05:00
Rijk van Zanten
b7d87e581a System permissions for app access (#4004)
* Pass relations through schema, instead of individual reads

* Fetch field transforms upfront

* Fix length check

* List if user has app access or not in accountability

* Load permissions up front, merge app access minimal permissions

* Show app access required permissions in permissions overview

* Show system minimal permissions in permissions detail

* Fix app access check in authenticate for jwt use

* Fix minimal permissions for presets

* Remove /permissions/me in favor of root use w/ permissions

* Fix logical nested OR in an AND

* Use root permissions endpoint with filter instead of /me

* Allow filter query on /permissions

* Add system minimal app access permissions into result of /permissions

* Remove stray console log

* Remove stray console.dir

* Set current role as role for minimal permissions

* Fix no-permissions state for user detail

* Add filter items function that allows altering existing result set
2021-02-11 12:50:56 -05:00
Rijk van Zanten
41240fae14 Revert patch on fields root (#3994)
Fixes #3991
2021-02-10 09:51:10 -05:00
rijkvanzanten
82f9af67e0 Validate field update payload
Fixes #3928
2021-02-09 18:45:21 -05:00
Rijk van Zanten
e6fa07dba8 Allow field creation with just field/type combo (#3990)
Fixes #3926
2021-02-09 18:43:25 -05:00
rijkvanzanten
a0fb2abbe9 Remove batch delete for fields/collections
It's too destructive
2021-02-04 11:19:32 -05:00
rijkvanzanten
178e91106b Remove unused imports 2021-01-12 16:15:44 -05:00
rijkvanzanten
6b029b416b iRemove imported types that aren't needed 2021-01-12 16:11:08 -05:00
WoLfulus
c5f3802da3 Replace express-async-handler for a local function. 2020-12-22 17:11:08 -03:00
Igor Savin
7cddb458cb Run prettier across app and api 2020-12-08 02:22:00 +02:00
rijkvanzanten
8cbdfb409b Use prefetched schema info 2020-11-09 17:13:48 -05:00
rijkvanzanten
3f387eb471 Remove check for comment in field creation 2020-10-20 11:03:10 -04:00
rijkvanzanten
4147ff9278 Allow null as max length value
Fixes #513
2020-10-05 17:38:39 -04:00
rijkvanzanten
eeedc01c53 Add /utils/revert, use in app
Fixes #485
2020-10-02 16:20:06 -04:00
rijkvanzanten
48fca55651 Restructure exports for services 2020-09-22 13:16:14 -04:00
rijkvanzanten
0a266e098a Fix creation of junction fields on m2m when using corresponding
Fixes #368
2020-09-22 11:32:29 -04:00
rijkvanzanten
ba85e4e6a2 Add dynamic export file name
Closes #387
2020-09-21 17:56:35 -04:00
rijkvanzanten
bb7b76aef9 Return 200 OK on create/update with no read permissions
Fixes #33
2020-09-21 16:29:07 -04:00
rijkvanzanten
09518f7816 Allow auto-generating o2m collection/field 2020-09-11 15:02:59 -04:00
rijkvanzanten
b19ffd960b Add response middleware and cache 2020-09-08 18:28:23 -04:00
rijkvanzanten
266c07fde7 Temporarily disable caching 2020-09-08 17:22:34 -04:00
kukulaka
2c63941a72 Merge branch 'main' into feature-redis-cache 2020-09-02 23:09:17 +01:00
rijkvanzanten
70e54515f8 Fix typing issue 2020-08-31 19:39:37 -04:00
rijkvanzanten
56ba0eec64 Various relational updates 2020-08-31 19:22:25 -04:00
kukulaka
8a21d6fd01 Making sure delete is present 2020-08-31 17:40:16 +01:00
kukulaka
9d6f80149c changes for caching
Most changes should be here, just making sure flush cache is in for each post / delete
2020-08-31 17:16:45 +01:00
rijkvanzanten
336cd65646 Only return fields you're allowed to read 2020-08-28 16:12:32 -04:00
Tanya Byrne
226280d6ba update caching 2020-08-25 13:49:08 +01:00
Tanya Byrne
236d29d078 adding to all gets
when fetching add ?TTL=600&dTTL=600 for use the cache
2020-08-24 15:39:51 +01:00
Tanya Byrne
fb10e32c9f Some examples of how to use 2020-08-24 14:04:09 +01:00
rijkvanzanten
3a0ce08fe4 Allow schema comment null, allow unknown fields in schema
Fixes #154
2020-08-22 10:44:08 -06:00
rijkvanzanten
c2b6b2a090 Rename routes to controllers 2020-08-15 16:56:45 -06:00