I have a nested object to return. The first screen is the network response, the second one is the actual JS object from Apollo:
The query is simple:
query{
order(_id:"5fe71dd045491e1cf0d2b58c"){
_id
orderId
manager{
_id
firstName
lastName
fullName
email
}
}
}
Any idea what can be the issue? I have tried without caching, like fetchPolicy: "network-only"
, but it didn't help. Feel like need to work with vanilla XmlRequest instead.
My client is "@apollo/client": "^3.2.1"
.
import {
ApolloClient,
InMemoryCache,
createHttpLink,
NormalizedCacheObject,
} from "@apollo/client";
const { REACT_APP_API_URL } = process.env;
const link = createHttpLink({
uri: REACT_APP_API_URL,
credentials: "include",
});
const s: any = {
cache: new InMemoryCache({
typePolicies: {
Locations: {
keyFields: [],
},
},
}),
link,
};
const client: ApolloClient<NormalizedCacheObject> = new ApolloClient(s);
export { client };