Open elessarperm opened 6 years ago
I'm having the same problem with the Github API
const NODE_PACKAGE_FRAGMENT = gql`
fragment NodePackage on Blob {
id
text
name @client
}
`
const REPOSITORY_FRAGMENT = gql`
fragment Repository on Repository {
id
name
url
pushedAt
isArchived
package: object(expression: "HEAD:package.json") {
...NodePackage
}
}
${NODE_PACKAGE_FRAGMENT}
`
If the name @client
is removed then everything works just fine.
If it's not removed then the problem begins
Missing field package in { "__typename": "Repository", "id": "MDEwOlJlcG9zaXRvcnk1MDAyNDg3Mw=="
Oh, if I remove the alias then everything works fine once again.
I faced some strange behaviour on aliases when using apollo-link-state. They just don't work properly. You can see that field surely exist but alias doesn't work. Nothing special in the code, messages is just an array in
defaults
.Edit: managed to reproduce the issue with
"apollo-cache-inmemory": "^1.2.9"
. Just to be clear: it not only behaves like this in devtools. regular queries result in same behaviour.