Benedikt Franke

Results 377 comments of Benedikt Franke

As of now, only primary keys work: https://github.com/nuwave/lighthouse/blob/50a6b714c40766ac308dc7e25d5b64291963ce3f/src/Schema/Directives/CanDirective.php#L147 The documentation is unclear about this, so we should at least fix that. (Update: I just did.) I see how it might...

> Wouldn't something like `$enhancedBuilder->where($find, $findValue)->firstOrFail();` work? Not necessarily, as `find` references the name of the field argument, which might be different from the actual column name. We might simply...

@dbbk if the functionality of a built-in directive does not fit you, there is always the option of creating a custom field directive: https://lighthouse-php.com/master/custom-directives/field-directives.html You can even override the name...

As I said in my comment above: > We might simply do the same as in other directives such as @all or @find and apply the argument filters. I am...

For your specific use-case, the `@group` directive should suffice as a convenient way to apply common middleware to multiple fields. Check out the PR i just made to the docs...

Yup https://github.com/nuwave/lighthouse-docs/pull/33 it is a typo. I recommend to use the `next` branch of the docs

Closing this for now, if some more interest in this pops up we might discuss it again. You might not need it as you can just: - Use `@can` or...

The main point that is unclear to me is which parts of the configuration should be global and which ones have to be schema-specific. Obviously the schema path has to...

To be clear: Lighthouse has no such mechanism as of now. I propose that we might add something like this in a future PR.