dgraph-io/dgraph-js-http

Got error: strconv.ParseInt: parsing

Closed this issue · 1 comments

I have a problem with my query

const query = `query getShopById($shopId: int) {
      node(func: type(Shop)) @filter(eq(shopId, $shopId)) {
        uid
        shopId
        domain
      }
    }`;

    const vars = { $shopId: 1 };
    const shop = await dgraphClient.newTxn().queryWithVars(query, vars);

this code returns an error

errors: [
    {
      message: ': Got error: strconv.ParseInt: parsing "": invalid syntax while running: name:"eq" args:"" ',
      extensions: [Object]
    }
  ]

the same query in the interface works correctly and returns data
image

This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.