Skip to content

Navigation Menu

Sign in
Sign up

eloquent setrelation #2631

Answered by stayallive
slushpuppy asked this question in Q&A
Discussion options

hi, my root resolver returns an eloquent model array with hasOne relationship hydrated using the setRelation method, however when debugging the request, it appears graphql still issues a subquery call on that relationship, How do I prevent this 2nd subquery call from happening?

You must be logged in to vote

I believe you should be able to remove the @relation directive to prevent that.

Replies: 1 comment

Comment options

I believe you should be able to remove the @relation directive to prevent that.

You must be logged in to vote
0 replies
Answer selected by slushpuppy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /