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

fragment which has __typename only is removed by removeClientSetsFromDocument #6311

Closed
mtsmfm opened this issue May 19, 2020 · 8 comments · Fixed by #10560
Closed

fragment which has __typename only is removed by removeClientSetsFromDocument #6311

mtsmfm opened this issue May 19, 2020 · 8 comments · Fixed by #10560
Assignees

Comments

@mtsmfm
Copy link
Contributor

mtsmfm commented May 19, 2020

Intended outcome:

The following code which works in v2 should not throw an error in v3:

client.query({
  query: gql`
    query {
      gameStatus(gameId: "gcn811f") {
        maze {
          cells {
            ...CellFragment
          }
        }
      }
    }

    fragment CellFragment on Cell {
      __typename
    }
  `
});

Actual outcome:

The above code throws an error Validation error of type UndefinedFragment: Undefined fragment CellFragment @ 'gameStatus/maze/cells' because the CellFragment only contains __typename

How to reproduce the issue:

https://codesandbox.io/s/apollo-3-fragment-bug-yf8f7?file=/src/index.ts
https://codesandbox.io/s/apollo-2-with-fragment-lfe8e?file=/src/index.ts

Versions

@apollo/client 3.0.0-beta.49

@mtsmfm
Copy link
Contributor Author

mtsmfm commented May 25, 2020

@hwillson I sent a PR to fix this issue #6322
Can I ask you to review?

@LaureRC
Copy link

LaureRC commented Jun 14, 2021

@hwillson any updates on this? :)

@chris110408
Copy link
Contributor

I will take a look at it

@Emmanuel-Melon
Copy link

@chris110408 any updates?

@kevinbgreene
Copy link

@hwillson did this get lost or a "won't fix"? No movement here or PR.

@chris110408
Copy link
Contributor

Sorry I was totally forget this. any one please feel free to take over this ticket

@kevinbgreene
Copy link

Thanks for the quick reply @chris110408. We'll get something together.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.