Skip to content

Bug: Query Planner Fails to Build Query for Nested Entity Fields Decorated With @requires #3113

Open
@ryan01010111

Description

@ryan01010111

Issue Description

When querying for nested entity fields decorated with @requires, a gateway for a federated graph fails to build a query plan, resulting in error "Cannot add selection of field \"X\" to selection set of parent type \"Y\"". This is a critical issue for my org.

All @apollo/* packages at latest, and composition done with latest (v2.8.4) rules.

Link to Reproduction

CodeSandbox

Reproduction Steps

  1. Start all services (if not already running) with:
npm run dev
  1. Run test query to reproduce the error with:
npm run test:query

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