Closed namttdh closed 8 months ago
Hmm, maybe we need add RelationDirective::class in the config file?
'builder' => [
/**
* The list of the directives which should be copied from the original
* field into the generated `input` field. All other directives except
* {@see Operator} will be ignored.
*
* The `instanceof` operator is used to check.
*/
'allowed_directives' => [
RenameDirective::class,
+ Nuwave\Lighthouse\Schema\Directives\RelationDirective::class,
],
],
Added and it work like a champp.
It seem missing relation type, i don't know why, could you check it?
This is known issue in v5, it should be fixed in main
(v6; #114). So maybe you can try it? (see also Upgrade Guide)
Added and it work like a champp.
Please note that it will not work in main
(v6). Another way
user: User @belongsTo @searchByOperatorRelation
It really really hard code for this way..
user: User @belongsTo @searchByOperatorRelation
I think i'll update to dev-main to test it.
Btw, i'm also seeking for schema generation from model PHPDocs, try define both Eloquent Model and graphql type kinda bored...
Dont understand why can't install dev-main
docker run --rm --pull=always \
-v "$(pwd)":/opt \
-w /opt \
laravelsail/php82-composer:latest \
bash -c "composer require lastdragon-ru/lara-asp-graphql dev-main"
latest: Pulling from laravelsail/php82-composer
Digest: sha256:37549f980be6146efcb16b0dc352644edfc5cca32b9862494631eb197ef89737
Status: Image is up to date for laravelsail/php82-composer:latest
./composer.json has been updated
Running composer update lastdragon-ru/lara-asp-graphql
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires lastdragon-ru/lara-asp-graphql dev-main -> satisfiable by lastdragon-ru/lara-asp-graphql[dev-main].
- lastdragon-ru/lara-asp-graphql dev-main requires lastdragon-ru/lara-asp-core dev-main -> found lastdragon-ru/lara-asp-core[dev-main] but it does not match your minimum-stability.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I think i'll try later
Probably you need to set "minimum-stability": "dev"
in your composer.json
.
Meanwhile the v6 is released 🎉
I hope the issue is not actual in v6, so will close this :)
This our my query
Order type
Generate type
=> It seem missing relation type, i don't know why, could you check it?