Implement juniper_graphql_ws::Schema
for &'static RootNode
#1268
Labels
enhancement
Improvement of existing features or bugfix
Is your feature request related to a problem? Please describe.
Currently, the
Schema
trait is only implemented forArc<RootNode>
.Arc
creates overhead that can be avoided for permanent resources.Describe the solution you'd like
Implement
Schema
for&'static RootNode
or for types that implementDeref<Target = RootNode>
(or couldSchema
just be replaced withDeref
?).Then, users can create a static reference via
Box::leak
.Describe alternatives you've considered
Right now, I'm just using a newtype to implement
Schema
. It works, but feels like boilerplate.The text was updated successfully, but these errors were encountered: