I’m having a problem when using react-apollo
with FlowRouter
(in a meteor
project). This is my graphql
query (it is supposed to update each 5 seconds):
@graphql(myQuery, {
options: {
pollInterval: 5000,
variables: {
userId: FlowRouter.getQueryParam('r'),
registerToken: FlowRouter.getQueryParam('registerToken')
}
},
})
export const default class MyComponent;
If I hard-coding the userId
and registerToken
arguments, the query works just fine.
So I guess the problem here is that these FlowRouter.getQueryParam()
functions return undefined
(even though I'm on client side). They work well if I call them inside of MyComponent
or the browser console.