[
https://issues.apache.org/jira/browse/TINKERPOP-1959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16638482#comment-16638482
]
ASF GitHub Bot commented on TINKERPOP-1959:
-------------------------------------------
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/922
`addProperty()` looks right. On `tp32` I guess the default is GraphSON 2.0
which has this form for `Cardinality` values:
http://tinkerpop.apache.org/docs/3.2.9/dev/io/#_cardinality
I see that the `accept` is set to "application/json". On `tp32` I think
that defaults to GraphSON 1.0 which wouldn't be able to deal with complex
objects. You can only pass primitives that are compatible with JSON data types.
Does it work if you don't use `Cardinality`? maybe, just do something more
simple like:
````js
connection.submit('x+y', { x: 1, y: 1 } );
```
If that works then change to GraphSON 2.0 -
"application/vnd.gremlin-v2.0+json" - and see what happens for complex stuff
like:
````js
connection.submit(card.toString()', { card: t.cardinality.set } );
```
> Provide a way to submit scripts to the server in gremlin-javascript
> -------------------------------------------------------------------
>
> Key: TINKERPOP-1959
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1959
> Project: TinkerPop
> Issue Type: Improvement
> Components: javascript
> Affects Versions: 3.2.8
> Reporter: stephen mallette
> Priority: Critical
>
> It is currently only possible to submit bytecode based requests to the server
> with gremlin-javascript. We should also provide some means for submitting
> scripts.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)