Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

NrqlQuery.query does not call the api after refresh interval


#1

Hi I am new to New Relic, My question is as follows

  1. i have defined a method and inside which i am calling NrqlQuery.query({query: “…”, accountId: “…”})
  2. The above defined method i am calling every 2 min using setInterval (javascript/ES6)
  3. the method is getting called, but the NrqlQuery.query method is not getting called since i dont see any request going the network tab of debugger in browser, probably i guess it if fetching from cache but not sure.

My query is given below
SELECT ... FROM ... FACET ... where appName like '%.${graph}' TIMESERIES 2 MINUTES SINCE 30 MINUTES AGO;

the above query should refresh every 2 min. Kindly request help here.


#2

Hey @skg

I’ve spoken to some people internally and we have matched this behaviour.

The workaround for now is, rather than using nrqlQuery.query, using NerdGraphQuery.FETCH_POLICY_TYPE.NO_CACHE

Ensuring the nerdgraph query is set to NO_CACHE, you should get the calls continuing after your refresh interval. See docs on this: https://developer.newrelic.com/client-side-sdk/index.html#data-fetching/NerdGraphQuery