# Calling composite query with javascript

**URL:** <https://forum.dfinity.org/t/calling-composite-query-with-javascript/28940>\
**Category:** JavaScript\
**Tags:** Discussing\
**Created:** [March 26, 2024, 5:38pm UTC](https://forum.dfinity.org/t/calling-composite-query-with-javascript/28940 "2024-03-26T17:38:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaesharma](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jaesharma/32/7297_2.png) [@jaesharma](https://forum.dfinity.org/u/jaesharma)\
**Post date:** [March 26, 2024, 5:38pm UTC](https://forum.dfinity.org/t/calling-composite-query-with-javascript/28940/1 "2024-03-26T17:38:14Z")

</div>

i’m using this library in my nodejs application: [@dfinity/agent - npm](https://www.npmjs.com/package/@dfinity/agent?activeTab=readme)  
Whenever I attempt a composite query using the agent from the aforementioned library, it becomes unresponsive, neither failing nor providing any results. Are there any restrictions or limitations on composite query calls from the JavaScript side?

---

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [March 28, 2024, 4:22pm UTC](https://forum.dfinity.org/t/calling-composite-query-with-javascript/28940/2 "2024-03-28T16:22:37Z")

</div>

I did investigate this in the Discord, but for anyone here - methods tagged with `composite_query` ought to work. Using this code:

```ts
import {Actor} from '@dfinity/agent';
const actorInterface = idlFactory;
const httpAgent = new HttpAgent({
  host: 'https://icp-api.io',
});
const canisterId = Principal.fromText('lw5dr-uiaaa-aaaak-ae2za-cai');
const actor = Actor.createActor(actorInterface, { canisterId, agent: httpAgent });

await actor.getArchivedDexTxns(Principal.from('5u2c6-kyaaa-aaaar-qadiq-cai'), 2, 2);

```

and the IDL from the [dashboard](https://dashboard.internetcomputer.org/canister/lw5dr-uiaaa-aaaak-ae2za-cai), I could make a call to a canister that uses composite queries without issue
