n1ru4l / envelop

Envelop is a lightweight library allowing developers to easily develop, share, collaborate and extend their GraphQL execution layer. Envelop is the missing GraphQL plugin system.
https://envelop.dev
MIT License
785 stars 127 forks source link

[core] remove `useOnResolve` #2226

Open EmrysMyrddin opened 5 months ago

EmrysMyrddin commented 5 months ago

Context

useOnResolve plugin was created to replace onResolve hook that was previously available for Envelop plugins.

In our opinion, wrapping resolvers should ba avoided at any cost, since it introduced a lot of overhead and can introduce performance issues.

Also, Envelop aims to be a runtime plugin system. This means schema modifications should not be part of the plugin lifecycle and should be done at schema build time.

Solution

Because of the point previously exposed, we should deprecate then remove this plugin.

Additional context

This removal necessitate the refactoring of multiple plugins (mostly monitoring related):