masumsoft / express-cassandra

Cassandra ORM/ODM/OGM for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.
http://express-cassandra.readthedocs.io
GNU Lesser General Public License v3.0
227 stars 67 forks source link

Custom index cannot be created if "on" field is empty #216

Open joppino opened 4 years ago

joppino commented 4 years ago

Hello there,

I'm trying to define a custom index on a model, but the index is not on a specific field. The definition in cassandra is like this: CREATE CUSTOM INDEX xxxx_index ON keyspace.table_name () USING 'com.xxx.xxxx.xxx.Index' WITH OPTIONS = { ...yadda yadda yadda

So when I'm defining the custom index in my model definition I'd expect this to work: custom_indexes: [ { on: "", using: "com.xxxx.xxxx.xxxx.Index", options: {... yadda yadda yadda

But it doesn't: apollo.model.validator.invalidschema: custom_index must have an 'on' attribute with string value and value must be a valid field name