feat: Allow Custom Directives - #815
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #815 +/- ##
============================================
- Coverage 95.72% 94.28% -1.45%
- Complexity 1773 2138 +365
============================================
Files 154 207 +53
Lines 4586 5718 +1132
============================================
+ Hits 4390 5391 +1001
- Misses 196 327 +131 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@michael-georgiadis any updates on this one? |
|
@oojacoboo, kinda. I can make the CI green but I have to up the lowest support version of |
|
@michael-georgiadis yes, that would be okay. Are there any known BC breaks? Even if so, that's not an issue. I can hold off on the next tagged release and determine that accordingly. |
…tives-v2 # Conflicts: # src/SchemaFactory.php
|
@oojacoboo made the CI go green. Feel free to have a look |
Description
As discussed in #807, the library can support custom defined directives as well. This PR addresses that concern by adding:
@oneOf,@deprecated), validating each at discovery time and enforcing unique names.Directive definition
Defining a directive
Name reservation
@oneOf/@deprecated(names we bind): reserved for custom use unless the directive declares builtIn: true to intentionally override the bundled binding.@skip/@include/@specifiedBy(webonyx directives we don't bind): hard-reserved — sourced from Directive::*_NAME constants — so a custom directive can't collide with them at schema build.