RETURN not work on Javascript Driver

This cypher query is working on Neo4j Browser but its not working with javascript driver. It returns 0 record. I need ID of node a.

const result: v1.StatementResult = await
      'MATCH (f:Firma) WHERE id(f) = $fId MERGE (f)-[y:YASIYOR{tip:$aTip}]->(a:Adres{mahalle: $aMah, cadSok: $aCadSok, numara: $aNo, daire: $aDaire}) RETURN a',
        aCadSok: 'some',
        aDaire: 'dummy',
        aMah: 'variables',
        aNo: 'for',
        aTip: 'testing',
        fId: 1163

You might need to do for fId.

Thanks for the reply,

I found the problem. When I try to use MATCH and MERGE in the same, that is not works in Javascript Driver but it works on Neo4j's browser. But when i run MATCH and MERGE at different function, that works. I think i need to write a transaction for that situation.