juniper icon indicating copy to clipboard operation
juniper copied to clipboard

Create a schema with custom directives first change for #156

Open MarcoFuykschot opened this issue 7 months ago • 3 comments

modified:   juniper/src/lib.rs
modified:   juniper/src/schema/model.rs

(feat) create schema with custom directives

First change for #156

MarcoFuykschot avatar Apr 17 '25 08:04 MarcoFuykschot

@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 avatar May 02 '25 12:05 MarcoFuykschot

@MarcoFuykschot

Step 3: Create a mechanisme for user code to react on directives during execution.

Could you sketch your vision of API?

tyranron avatar May 09 '25 16:05 tyranron

For the api, i have two idea's

  1. A visitor like pattern, on the the incoming query,
  2. 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.

MarcoFuykschot avatar Jun 01 '25 06:06 MarcoFuykschot