Skip to content

GraphQL Nested Children error ( is used outside the scope of its declaration ) #5007

Description

@develth

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:

[Semantical Error] line 0, col 89 near 'o_a6.id = m_a7.deletedBy': Error: 'o_a6' is used outside the scope of its declaration.

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

  • DoctrineExtension with a NestedSet
  • Query an Item with Children and that have a manyToOne relation to another Object

Additional Context

GraphQL Query:

query listTreeItemsQuery($treeItem: ID!) {
  treeItem(id: $treeItem) {
          id
          name
          children{
              totalCount
          }
        
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions