Custom Resolver missing nested object values #2586
Unanswered
HellFirePvP
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Does joining |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, i'm uncertain how to properly phrase the question/title.
So i have a larger Datastructure and i have a entrypoint into it via a custom resolver such as
listEntries(name: xyz, year: 2000)
that then returns entries. That works. However, when i try to extend my result via a query like this:However, it seems that it doesn't resolve the 'parent' at all. Any value inside it is null, suggesting the object is not joined to the result at all. In my resolver i just create a query with Eloquent's syntax
Entry::query()->select('entry.*')->join(parent)->where parent year = given year
and then return the result via query->get() from the resolver. Am i missing something? Do i somehow have to manually join all tables i want the resolver result to ever potentially be returned from the graphql query?I'm also more or less forced to use custom resolvers for all resolvers and such, because the underlying permissions logic will work on the individual models if they should be visible to the logged-in user or not, in addition to permissions based on the queries themselves.
Thanks in advance for any suggestions or thoughts.
Beta Was this translation helpful? Give feedback.
All reactions