Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Converting circular structure to JSON #7

Open
vjpr opened this issue Feb 22, 2021 · 1 comment
Open

Uncaught TypeError: Converting circular structure to JSON #7

vjpr opened this issue Feb 22, 2021 · 1 comment

Comments

@vjpr
Copy link

vjpr commented Feb 22, 2021

VM704:1 Uncaught TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'InMemoryCache'
    |     property 'policies' -> object with constructor 'Policies'
    |     property 'config' -> object with constructor 'Object'
    --- property 'cache' closes the circle
    at JSON.stringify (<anonymous>)
    at eval (eval at push.../../../../../node_modules/.pnpm/[email protected]/node_modules/apollo-link-webextensions-messaging/lib/rpcs.js.exports.operationRequestRPC (rpcs.js:37), <anonymous>:1:6)
    at Object.push.../../../../../node_modules/.pnpm/[email protected]/node_modules/apollo-link-webextensions-messaging/lib/rpcs.js.exports.operationRequestRPC (rpcs.js:37)
    at index.js:90

Stringifying operation.getContext() is causing this issue.

exports.operationRequestRPC = function (operationId, operation) { return ({
    jsonrpc: '2.0',
    method: exports.OPERATION_REQUEST_METHOD,
    params: JSON.stringify({
        operationId: operationId,
        operationName: operation.operationName,
        variables: operation.variables,
        query: graphql_1.print(operation.query),
        context: operation.getContext(),
    })
}); };
@YerimMoral3s
Copy link

any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants