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
One of our sponsors has asked if there's a potential N+1 problem within this example, which Benjie has described as "terrible".
withPgClient by default is designed for use in mutations. It runs the query once for each entry in the batch. At the root level (as here) there is no N (we're at root) so this is fine; but if you were to add that to a non-root type (e.g. User or Post or whatever) then yes absolutely it would destroy performance. Further withPgClient is flagged as a mutation (hasSideEffects = true) and that will impact the efficiency of your plans too.
The text was updated successfully, but these errors were encountered:
Summary
https://postgraphile.org/postgraphile/next/make-extend-schema-plugin#example-2 needs fixing, add some warnings around it for context
Additional context
One of our sponsors has asked if there's a potential N+1 problem within this example, which Benjie has described as "terrible".
The text was updated successfully, but these errors were encountered: