Skip to content
This repository was archived by the owner on Jun 22, 2023. It is now read-only.
This repository was archived by the owner on Jun 22, 2023. It is now read-only.

Bug when performing filters with substring matches #187

@alastair

Description

@alastair

I added some data to the production API, ItemList id e91489d7-a776-40dd-8abf-0c934922bd99
I can query it and get all items (these queries work on prod api):

query {
  ItemList(identifier:"e91489d7-a776-40dd-8abf-0c934922bd99") {
    identifier
    name
    itemListElement {
      identifier
      name
    }
  }
}

and I can also filter and ask it to give me the item list, and all itemListElements that have a particular name:

query {
  ItemList(identifier:"e91489d7-a776-40dd-8abf-0c934922bd99") {
    identifier
    name
    itemListElement(filter:{name:"Magnificat quinti toni"}) {
      identifier
      name
    }
  }
}

But I'd also like to be able to do a more wildcard-like search, so I tried:

query {
  ItemList(identifier:"e91489d7-a776-40dd-8abf-0c934922bd99") {
    identifier
    name
    itemListElement(filter:{name_starts_with:"Missa"}) {
      identifier
      name
    }
  }
}

However this fails with an error:

Invalid input '_filter': expected
  "OR"
  "XOR"
  "AND"
  "="
  "!="
  "<>"
  "<="
  ">="
  "<"
  ">"
  "+"
  "-"
  "*"
  "/"
  "%"
  "^"
  "."
  ")"
  "["
  ":" (line 1, column 251 (offset: 250))
"MATCH (`itemList`:`ItemList` {identifier:$identifier}) RETURN `itemList` { .identifier , .name ,itemListElement: [(`itemList`)-[:`ITEM_LIST_ELEMENT`]->(`itemList_itemListElement`:`ThingInterface`) WHERE (`itemList_itemListElement`.name STARTS WITH $1_filter.name_starts_with) | `itemList_itemListElement` {FRAGMENT_TYPE: head( [ label IN labels(`itemList_itemListElement`) WHERE label IN $ThingInterface_derivedTypes ] ), .identifier , .name }] } AS `itemList`"

This makes me think that there's an issue with all of the automatically generated filters that work on strings, but I'm not sure if this is related to the graphql bindings, or something that we do with them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions