Skip to content
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

apollo-compiler: SelectionSet::is_introspection is incorrect when fragments are repeated #613

Closed
glasser opened this issue Aug 11, 2023 · 0 comments · Fixed by #614
Closed
Labels
bug Something isn't working

Comments

@glasser
Copy link
Member

glasser commented Aug 11, 2023

Description

The function SelectionSet::is_introspection incorrectly returns false when fragment spreads are repeated at the top level of an operation. For example, this operation should return true from is_introspection, but it does not:

query IntrospectRepeatedIndirectFragment {
  ...A
  ...B
}
fragment A on Root { ...C }
fragment B on Root { ...C }
fragment C on Root {
  __schema {
    types {
      name
    }
  }
}

Steps to reproduce

Will post a PR with a fix and unit tests shortly.

Expected result

The operation above should be considered as introspection and is_introspection should return true.

Actual result

It returns false.

Environment

  • Operating system and version: macOS
  • Shell (bash/zsh/powershell): bash
  • apollo-rs crate: main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants