We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I query a collection with a single file field I can no longer rename the field.
GraphQL returns.
Cannot destructure property 'type' of 'field' as it is undefined.
Create a new collection test with a default id and add one "Single File" file field. You'd end up with something like this.
test
file
CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `file` char(36) DEFAULT NULL, PRIMARY KEY (`id`), KEY `test_file_foreign` (`file`), CONSTRAINT `test_file_foreign` FOREIGN KEY (`file`) REFERENCES `directus_files` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
You could add an item to the collection for easier debugging, but it isn't necessary to reproduce the issue.
Query the file field with permissions (or set public read access to the collection and directus_files).
directus_files
Without renamed fields it works fine 👍
{ test { file { id } } }
With a renamed field it returns an error ⚠️
{ test { renamedField: file { id } } }
{ "errors": [ { "message": "Cannot destructure property 'type' of 'field' as it is undefined.", "locations": [ { "line": 1, "column": 17 } ], "path": [ "test" ] } ], "data": { "test": null } }
This was not an issue in rc-93. The issue is producible in both rc-94 and rc-95.
I dug into the code and commits between those versions without success. If I have to guess I'd say it came with the Insight module changes.
v9.0.0-rc.95
14.16.0
mysql:5.7
Firefox Developer Edition
macOS
Jenkins
The text was updated successfully, but these errors were encountered:
Duplicate of #8402 👍🏻
Sorry, something went wrong.
No branches or pull requests
Preflight Checklist
Describe the Bug
When I query a collection with a single file field I can no longer rename the field.
GraphQL returns.
To Reproduce
Create a new collection
test
with a default id and add one "Single File"file
field. You'd end up with something like this.You could add an item to the collection for easier debugging, but it isn't necessary to reproduce the issue.
Query the file field with permissions (or set public read access to the collection and
directus_files
).Without renamed fields it works fine 👍
With a renamed field it returns an error⚠️
This was not an issue in rc-93. The issue is producible in both rc-94 and rc-95.
I dug into the code and commits between those versions without success. If I have to guess I'd say it came with the Insight module changes.
What version of Directus are you using?
v9.0.0-rc.95
What version of Node.js are you using?
14.16.0
What database are you using?
mysql:5.7
What browser are you using?
Firefox Developer Edition
What operating system are you using?
macOS
How are you deploying Directus?
Jenkins
The text was updated successfully, but these errors were encountered: