Hello
I think I might be missing something here but I am seeing some unexpected failures when extending an externally stitched schema and querying on either the interface or concrete type.
A quick example. Say I have the below resolver that adds stock data onto a product:
resolvers: {
Product: {
stockRecord: {
fragment: ` ... on IProduct { id } `,
resolve(obj, __, ___, info) {
return info.mergeInfo?.delegateToSchema({
schema: remote,
operation: "query",
fieldName: "stockRecord",
args: { id: obj.id },
info,
});
},
},
}
}
When a user queries on the IProduct interface it works. However if the user queries on the concrete type Product that implements the IProduct interface, the resolver will not receive the id field. The same is true in reverse, if we were to change the resolver implementation to use the concrete type, the resolver will not receive the id field if the user queries on the interface type.
I have created a full reproduction here as I wasn't sure if it was another part of our application causing the issue.
Hello
I think I might be missing something here but I am seeing some unexpected failures when extending an externally stitched schema and querying on either the interface or concrete type.
A quick example. Say I have the below resolver that adds stock data onto a product:
When a user queries on the
IProductinterface it works. However if the user queries on the concrete typeProductthat implements theIProductinterface, the resolver will not receive theidfield. The same is true in reverse, if we were to change the resolver implementation to use the concrete type, the resolver will not receive theidfield if the user queries on the interface type.I have created a full reproduction here as I wasn't sure if it was another part of our application causing the issue.