I have written below code :
On Certain User Action below method is called :
handleFolderClicked = (topic, parent) => {
console.log('Main : handleFolderClicked called : ', parent);
this.props.relay.setVariables({
parentFolder: parent,
email: loginEmail
});
}
Main = Relay.createContainer(Main, {
initialVariables: {
pageSize: pageSize,
email: loginEmail,
parentFolder: parentFolder,
},
fragments: {
store: () => Relay.QL`
fragment on Store {
id,
fileConnection(first:999, email:$email, parentFolder:$parentFolder) {
${DirectoryListing.getFragment('files')},
}
users {
email,
}
}
`,
}
});
export default Main;
On the time of page load its working fine and fetching results but when value of parentFolder is changed using setVariables, it throws above error.
An insight might be useful and appreciated. Thanks