You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a general issue to track improvements, for which there are many opportunities. The code was kept simple and flexible during the early design, leaving the following opportunities:
Use the "data loader" pattern to batch and memoize entity calls within the same request
Use parameterized scopes to query the database within an authorization's context
Translate filters and pagination to SQL and execute on the database
The text was updated successfully, but these errors were encountered:
This addresses #158 by using the dataloader pattern to batch and memoize entity calls within the same request.
The design followed here introduces the concept of an "execution context" or Executor. An Executor instance is unique to the request, and is to be used as a key to WeakMap caches of entities.
Special care must be taken to avoid reusing stale data after a mutation. Accordingly, the Executor instance is replaced in the broader context object by each mutation. Because GraphQL guarantees that mutations are run serially, we don't have to worry about race conditions here.
This is a general issue to track improvements, for which there are many opportunities. The code was kept simple and flexible during the early design, leaving the following opportunities:
The text was updated successfully, but these errors were encountered: