juniper
juniper copied to clipboard
Create a schema with custom directives first change for #156
modified: juniper/src/lib.rs
modified: juniper/src/schema/model.rs
(feat) create schema with custom directives
First change for #156
@MarcoFuykschot
First change for #156
Could you provide some grand vision/description of how it's supposed to work? And what would be the next steps?
From the provided example in the code and PR description, it's not very clear.
Step 1: is allow custom directives, added to a schema to pass validation. Step 2: Update graphql parser to support directive definitions Step 3: Create a mechanisme for user code to react on directives during execution.
@MarcoFuykschot
Step 3: Create a mechanisme for user code to react on directives during execution.
Could you sketch your vision of API?
For the api, i have two idea's
- A visitor like pattern, on the the incoming query,
- Add a context like object as paramter to the fields.
Both i still need to reseach the code, on how to implement this in a non breaking way.