Closed aggelosgkiokas closed 4 years ago
It looks like the issue is here:
rangeIncludes: "DigitalDocument"
because when I search for ValidAdditionalPropertyNodeValueType in the CE, I see that it's an enum.
In the CE, enums don't have quotes around them. for example when we set a language we do language: en
not language: "en"
The documentation for this method says that it takes a list of string constants: https://github.com/trompamusic/trompa-ce-client/blob/master/trompace/mutations/property.py#L52, which should be correct for representing an enum.
It should be correctly loaded here: https://github.com/trompamusic/trompa-ce-client/blob/0ec27fcca02a3b453d8c067a3eba4090071db5b2/trompace/application/entrypoint_subs.py#L170, are you using this method, or did you write something different?
DigitalDocument is an enum value, please try it without the quotation symbols.
In the methods for creating people/compositions, etc, we accept a string argument and turn it into a StringConstant in the method: https://github.com/trompamusic/trompa-ce-client/blob/0ec27fcca02a3b453d8c067a3eba4090071db5b2/trompace/mutations/person.py#L66 I'm not sure what solution is best here, if we should use the same system in this part of the library, or if we should directly require StringConstants. I'll have a think through the best way to go ahead with this
Thanks!
I get the following error:
File "/home/aggelos/PycharmProjects/processing_library/application.py", line 113, in register resp = trompace.connection.submit_query(qry) File "/home/aggelos/envs/tpl/lib/python3.7/site-packages/trompace/connection.py", line 52, in submit_query raise QueryException(resp['errors']) trompace.exceptions.QueryException: Query error
Query executed:
mutation { CreateProperty( title: "Targetfile" name: "Magic input" description: "This is a magical input" rangeIncludes: "DigitalDocument" ) { identifier } }
config file when the pararams were read:
[Property1] name = Magic input title = Targetfile description = This is a magical input rangeincludes = DigitalDocument num_inputs = 1