Comments (5)
Ok, as soon as I can I elaborate tests and pr.
from graphql-laravel.
Sorry, same answer as in #979 . I try to keep SelectFields
alive as best as possible, but TBH I've a hard time maintaining and (and also no fun doing so) and I also never truly used it, dataloaders are preferred.
from graphql-laravel.
Does the https://github.com/rebing/graphql-laravel#eager-loading-relationships always-field mentioned here, fixes it for you?
or the query param?
https://github.com/rebing/graphql-laravel#type-relationship-query
from graphql-laravel.
Hi @crissi, I played with both ways (always field and type relationship query) to get around the problem but in the end it all turned out to be too complicated and logically incorrect (IMO the graphql layer must not be aware of the fields needed for any computed field logics on the eloquent side), so I chose another solution, extend SelectFields class and overwrite the method handleFields.
I disabled this check, so instead of this:
graphql-laravel/src/Support/SelectFields.php
Lines 254 to 258 in fc0d1d5
I just left this:
$select = [$parentTable.'.*'];
Doing so I "solved" the problem for me, I hope I was clear and helpful.
from graphql-laravel.
I just remembered this other PR #277, talking about something different but targeting the same area and logic (wasn't merged in the end).
from graphql-laravel.
Related Issues (20)
- Tests are failing on CI HOT 3
- Cannot upgrade to laravel 10x because it cannot coexist with rebing dependency illuminate/contracts and illuminate/support
- Playground, are you thinking of implementing it?
- Unable to enable apq caching
- Is there documentation on returning objects with relation objects as a part of the type? HOT 4
- Pagination on Relation HOT 1
- Unexpected end of JSON input HOT 3
- queryContext in GraphQLController doesn't exist HOT 2
- L11: Unresolvable dependency resolving [Parameter #4 [ <required>; string $basePath ]] in class Illuminate\Foundation\Exceptions\Renderer\Renderer (500 Internal Server Error) HOT 1
- Improve error reporting when a type's name has illegal characters HOT 2
- GraphQL Request must include at least one of those two parameters: \"query\" or \"queryId\" HOT 3
- Add support for thecodingmachine/safe 2.0 HOT 2
- Nullable and Filled
- Resolver context is not updated once a user is logged in HOT 2
- repo description nit
- Pagination error HOT 2
- Integration tests for L9 are not working anymore
- useing $args in the resolve cloture of a type item
- Missing parent table in SelectFields for UnionType and InterfaceType HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-laravel.