olivierwilkinson / prisma-extension-nested-operations

Utils for creating Prisma client extensions with nested operations
Apache License 2.0
28 stars 4 forks source link

fix: changing operation in $rootOperation #3

Closed olivierwilkinson closed 8 months ago

olivierwilkinson commented 8 months ago

In $rootOperation the only way to change the operation type is to use the previous client; in $allNestedOperations we are able to manipulate the args that are passed to the query, but in $rootOperation there is no API for switching the operation type of the query function.

Currently if the $rootOperation does not call the query function then the query hangs, this is because we are awaiting the query function in the $allOperations hook generated by withNestedOperations.

Replace the execution of the $rootOperation with a straight call to $rootOperation as we don't need to track any aspect of its execution.

github-actions[bot] commented 8 months ago

:tada: This PR is included in version 1.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: