Comments (8)
Hi @gurusamy , can you please share more information and a reproduction?
from graphql-modules.
Hi @dotansimha we are not able to reproduce in dev environment. It is happening on production when traffic is high. We could not reproducible on dev load testing also. We are injecting ExecutionContext
in singleton class. Any guess what could be the issue?
Below is the sample code
import { Injectable, ExecutionContext } from 'graphql-modules'
@Injectable()
export class SampleProvider extends BaseProvider {
constructor() {}
@ExecutionContext()
private context: ExecutionContext
someMethod(data) {
const value = this.callAPI(data)
}
}
export class BaseProvider {
constructor() {}
private context: ExecutionContext
callAPI() {
console.log(this.context.reqContext);
//Call API
}
}
const resolvers = {
Query: {
myQuery(root, args, context, info) {
context.injector.get(SampleProvider).someMethod(args)
}
}
}
from graphql-modules.
@dotansimha We got another error for the same scenario
Maximum call stack size exceeded\n at Map.delete (<anonymous>)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:201:37)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:206:13)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:206:13)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:206:13)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:206:13)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:206:13)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:206:13)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:206:13)\n at destroyContextAndItsChildren (/data/instance/node_modules/graphql-modules/index.js:206:13
from graphql-modules.
Hi @gurusamy and @dotansimha, I have also received this error. However, for me it only occurs when I make database queries with many return objects. Have you already found a solution for this problem?
from graphql-modules.
We need a failing test or a reproduction on CodeSandbox or StackBlitz
from graphql-modules.
Hi @ardatan, I have created a repo on github for reproduction: https://github.com/Simon12121/graphql-modules-bug-replication. Because the error happens only when I make a query to MongoDb with many return objects, you would have to create an Atlas Free cluster. Maybe it happens also with other databases. I have stored my connection-string under environment/.env in the variable MONGO_DB_URI (not present in repo). First you would need to run the Mutation 'initFeatureTest' and the errors happens then when querying 'getAllNames'. I hope you can reproduce the error.
from graphql-modules.
Hey @Simon12121 and @gurusamy, thanks for your patience! Can you try out [email protected] please? #2461 has potential to fix your issue too. Thanks!
from graphql-modules.
Fixed in [email protected]
with #2461. Please try it out!
from graphql-modules.
Related Issues (20)
- Subscription middleware contains only injector HOT 1
- update subscription docs
- Headers info doc HOT 1
- ERR Error: Error during instantiation of BasicProvider
- Error context.ɵgetModuleContext is not a function HOT 1
- Prepare for Typescript 5.0 compatibility HOT 1
- Cannot override Apollo Server's default field resolvers HOT 1
- Typescript 5 support HOT 1
- Enum data type resolves aways as null HOT 1
- Unable to test custom scalars HOT 3
- Feedback for “Migration from v0.X” HOT 1
- Can't use TS typedefs on an ESM setup HOT 7
- Updates to context are not propagated to all operational providers HOT 2
- Map Providers / Interface Providers / Array Providers
- Sharing a single provider instance between multiple Injection Tokens
- Allows modules to not provide any type definition if they provide at least one provider
- Passing a `Module` reference to module throws Error
- Using instanceof for external libs(graphql) is dangerous
- Package types is not being resolved in a TS setup when `moduleResolution` is `bundler` HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-modules.