-
-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL Nested Children error ( is used outside the scope of its declaration ) #5007
Comments
Further Information:
There it seems, that |
Same here in 2.7. It looks like 2.7 and 3.0 have so many issues with graphql that I don't think they are proper releases. I battled with 3.0 for more than a day, then went back to 2.7 and despite the small progress (now it at least returns responses in less than 300 seconds), the issues keep popping. There are some forks that supposedly 'fix' graphql issues, but they only take you that far. GraphQL keeps looking more and more like an afterthought with api-platform. And let's be real here, creating a serious API with REST is so 2000s it's not even funny. |
Did someone saw a solution (in a fork) for this specific issue mentioned here? |
Give a try to #5001 (comment), It solved a similar case and I don't have any issues currently. |
Sorry, I gave up and went back to 2.6.x. Good luck. |
@alanpoulain will there be a fix for that in the near future? |
The fix is probably here, I need to take some time to review it: #5169. |
no really, because currently i get:
It wants to use the ItemProvider for the child collection |
IMHO its caused by this @alanpoulain https://github.com/api-platform/core/blob/v3.0.4/src/GraphQl/Type/FieldsBuilder.php#L265 especially:
With Children, both are same and it will decide everytime for ItemProvider instead of Collection |
The issue is more like, why this line gives you core/src/GraphQl/Type/FieldsBuilder.php Line 253 in c62f66c
|
it is That is why it gets here
and gehts the Class of the Model, what is the same as the parent and does think its also needed for the ItemProvider |
OK it's because the root class is the same as the child class. |
or just use the collectionCheck here, too? |
Are there any news on this topic? I'd like to update my application to ApiPlatform v3, but this bug blocks this update. Do you need any additional information to reproduce the problem? The fix in #5169 does not work for me |
API Platform version(s) affected: 3.0
Description
When query an item that have an nested set ( what i solved with Doctrine Extensions Nested Set ) and want to make query with children, following error appears:
The Request via REST is sucessful.
Debuggin braught me
LinksHandlerTrait
, that wants to make sub query to fields that have a manyToOne relation on this object.How to reproduce
Additional Context
GraphQL Query:
The text was updated successfully, but these errors were encountered: