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

Update docs #2461 #2463

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions website/src/pages/docs/advanced/execution-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,3 @@ The next lines show the usage of `@ExecutionContext` decorator. It's a property
This way the Singleton `Data` service runs within the execution context of a GraphQL Operation and can access Operation scoped Injector and the GraphQL Context object.

It also means you gain a lot in terms of performance because the `Data` class is instantiated only once and used in many operations.

<Callout>
`@ExecutionContext` impacts the performance, depending on your Node version
(execution context uses `async_hooks` module).

GraphQL Modules is smart enough to enable `async_hooks` only when
`@ExecutionContext` is used.

</Callout>
2 changes: 0 additions & 2 deletions website/src/pages/docs/recipes/migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ export class MyProvider {

In v0, we had a concept of Session to manage the execution of each operation. In v1, we dropped it, in favor of a simpler solution.

Internally, we are using Node's `async_hooks` to manage a context of an execution, which allow us to share Injectables between Singleton and Operation scope.

## Context

In v0, you could create a `context` per each module. In v1, `context` is external for GraphQL-Modules and it's not directly in use. You can do whatever you want with that, and just access it in GraphQL-Modules if you need, but we no longer require you to do specific things with your `context`.
Expand Down