Depending on the position of the fragment, you'll get inconsistent values.
I fixed a similar issue in #453, but in that case the fragment was nested, whereas this case is not.
This fails:
query MyQuery {
node(id: "1000") {
... on Post {
id
...PostFragment
}
}
}
fragment PostFragment on Post {
author {
alwaysFail
}
...PostFragment2 # <--
}
fragment PostFragment2 on Post {
author {
name
}
}
While this is not:
query MyQuery {
node(id: "1000") {
... on Post {
id
...PostFragment
}
}
}
fragment PostFragment on Post {
...PostFragment2 # <--
author {
alwaysFail
}
}
fragment PostFragment2 on Post {
author {
name
}
}
The reason seems to be that deep-merge is not commutative.
Given one of arguments isnil or ::null, exception is thrown.
Depending on the position of the fragment, you'll get inconsistent values.
I fixed a similar issue in #453, but in that case the fragment was nested, whereas this case is not.
This fails:
While this is not:
The reason seems to be that deep-merge is not commutative. Given one of arguments is
nil
or::null
, exception is thrown.