Running introspection query with apollo-client results in RangeError: maximum call stack size exceeded
See original GitHub issueIntended outcome:
Running the graqhql introspection query with apollo-client. It should return the server’s schema in JSON format.
import { parse, introspectionQuery} from 'graphql';
const query = parse(introspectionQuery);
client.query({query})
.then(...)
.catch(...);
Actual outcome:
RangeError: Maximum call stack size exceeded
at cloneDeep (D:\Users\###\Documents\EVE\teddie\teddie-client\node_modules\apollo-client\util\cloneDeep.…:1)
at cloneDeep (D:\Users\###\Documents\EVE\teddie\teddie-client\node_modules\apollo-client\util\cloneDeep.…:9)
at cloneDeep (D:\Users\###\Documents\EVE\teddie\teddie-client\node_modules\apollo-client\util\cloneDeep.…:9)
at cloneDeep (D:\Users\###\Documents\EVE\teddie\teddie-client\node_modules\apollo-client\util\cloneDeep.…:9)
...
(goes one for quite some lines)
Comment
Replacing the client.query
code with networkInterface.query
(not using all the fancy apollo features) works.
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (8 by maintainers)
Top Results From Across the Web
Refetching queries in Apollo Client - Apollo GraphQL Docs
The InMemoryCache helps you determine which active queries might have been invalidated by recent cache updates. Local cache updates and refetching work ...
Read more >GraphQL: File Upload & Troubleshooting - Szhshp
That may help your issue, GraphQL may regard it as custom scalar. createReadStream() crashes-RangeError: Maximum call stack size exceeded.
Read more >Using GraphQL queries with Apollo Client iOS SDK
This step-by-step guide explains how to use the Apollo client and Contentstack GraphQL queries to power the content of your iOS SDK apps....
Read more >RangeError: Maximum call stack size exceeded React Native
When running the app, the query works as expected and I receive data from GraphQL server. However, the console shows error messages: Unhandled ......
Read more >ra-data-graphql - npm
In a nutshell, ra-data-graphql runs an introspection query on your ... actual HTTP request is sent (using ApolloClient) to your GraphQL API.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would be great to have a solution for this.
addTypename: false
trick doesn’t work for me.As pointed out above, this is happening because
parse
creates an object with circular references. These references are only in the location fields of the resulting object so I don’t think they’re actually needed. So you can try:and see if that works for you.