[SOLVED] GraphQL Search API Issues

I am trying to search based on alphanumeric string but getting error:

graphql:

query{
    queryStockDetailContents(search: "RFA100") {
        id,
        created,
        flatData{
            stockCode,            
            fitmentGuides{
                title,
                url
            },            
        }
    }
}

I get:

"errors": [
        {
            "message": "OData $search clause not valid: Syntax error: character '1' is not valid at position 3 in 'RFA100'.",
            "locations": [
                {
                    "line": 2,
                    "column": 5
                }
            ],
            "path": [
                "queryStockDetailContents"
            ]
        }
    ],

If my search term is just alphabetical then works fine… like “RFA” instead of “RFA100”

can u please help.
Thanks a lot.

just to add to it, I can’t even search as follows either (numbers):

queryStockDetailContents(search: “100”) {

Can you try the following?

queryStockDetailContents(search: "\"RFA100\"") {}

This topic was automatically closed after 2 days. New replies are no longer allowed.