pimcore / data-hub

Data delivery & consumption platform for Pimcore.
Other
124 stars 105 forks source link

[Bug, EC]: Mutations to tables don't work at all #863

Open wisconaut opened 2 months ago

wisconaut commented 2 months ago

Expected behavior

Mutations work.

Actual behavior

Discussed in https://github.com/orgs/pimcore/discussions/17026

Originally posted by **khenow1978** May 8, 2024 Hi, I just came across an issue that really bothers me. We want to use a table for storing data about quantity and measurement calculations. Therefore I'm currently testing how to query the content of a table and create new entries. However as long as I use the table within the query schema all works fine but as soon as I add it to the Mutation schema the whole API crashes. This is the response: image The documentation tells me that mutations of tables are supported in the current version.. we are running Pimcore 11.1.5. But somehow it doesn't work at all. Any suggestions?

The problem occurs because the $tableDef variable is empty. This is not filled in the “getFieldDefinition”. This seems to be due to the name of the field:

Ueberstand~tblMengenumrechnung

The table is in an object brick and therefore there is the prefix “Ueberstand”. The function doesn’t seem to be able to cope with this and ends up with “return zero”.

I copied the element and used it directly in my class. This means that the GraphQL interface runs smoothly. I was able to work around/solve the problem for myself at first.

Steps to reproduce

github-actions[bot] commented 1 month ago

Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.