DEV Community

anuragshah17
anuragshah17

Posted on

React app with Apollo APQ

const GET_NODES = {
operationName: 'nodeById',
variables: null,
extensions: {
persistedQuery: {
version: 1,
sha256Hash: 'hashOfQuery'
}
}
};
I want to export this but it is a object. What needs to be done for converting it into string.

Top comments (1)

Collapse
 
alvpopa profile image
Valentin A. Popa

I'm not really sure what you're trying to achieve, but maybe you need:

JSON.stringify(GET_NODES);