Comments (4)
If it fits for graphql-laravel, I definitely welcome more docs. The updates on the readme are⦠not so many.
I'm still not sure what the actual issue is you are having, but maybe you should propose a PR for the docs (aka: readme.md) and we take it from there?
from graphql-laravel.
graphql-laravel is a wrapper over https://github.com/webonyx/graphql-php/ and therefore knowledge how this library works and handles those things is necessary to answer this.
Your question is not very specific, but in general there's the concept of a "default field resolver" which uses specific algorithm to "traverse" GraphQL request paths of fields into the returned payload (be it array, objects with getters or attributes etc.)
Specifically, I'm talking about the default implementation from http://webonyx.github.io/graphql-php/data-fetching/#default-field-resolver
This library uses the same (but it can be overriden via config defaultFieldResolver
).
From there, we now can learn how the returned data facts are by default handled and so we know what we need to do with relations.
We either can use the SelectFields
approach, which handles basic and some advanced cases well but has limitations in other places and therefore I would not recommend it.
Or, for relations, you implement your own resolve
and use a dataloader like https://webonyx.github.io/graphql-php/data-fetching/#solving-n1-problem explains, to "lazy eager load" the relational data. But it's definitely more setup work than SelectFields
but is indefinitely flexible.
So, not sure that covers your question though? π€
from graphql-laravel.
from graphql-laravel.
I'm closing this issue because there's no hard actionable here.
Bugfixes or doc upgrades are of course always welcome.
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
- 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
- Using getRelations of SelectFields involves only selecting the requested fields for relationships HOT 5
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.