express-cassandra icon indicating copy to clipboard operation
express-cassandra copied to clipboard

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

Open joppino opened this issue 5 years ago • 0 comments

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

joppino avatar Mar 08 '20 23:03 joppino