stevan / p5-Graph-QL

GraphQL implementation in Perl
2 stars 2 forks source link

How to bind resolvers to a schema in GraphQL #31

Open stevan opened 6 years ago

stevan commented 6 years ago

We need a way to say, in pure GraphQL Type System language, that we want the schema to be bound to the resolvers from a given Perl namespace.

This is using Graph::QL::SchemaResolver::new_from_namespace under the hood of course.

Here is what I propose:

directive @resolvers(namespace: String!) on SCHEMA;

schema @resolvers(namespace: "My::GraphQL::Resolvers") {

}