I'm getting this warning:
backend.js:6 Missing field getCurrentConfigurations in [
{
"id": "135631",
"zone": {
"id": 2,
"name": "ZONA 1",
"color": "#ba9b
It's a warning but my entire app has sometimes some weird behaviours. So I wonder how could fix those warnings. Apparently, the app works ok when I trigger a function that send that warning on chrome console, but I don't know why is happening.
I had to deal with an error about writing to cache some data, the solution in that case was adding an id
value to each object and also a __typename
About the error and some solutions: https://github.com/apollographql/apollo-client/issues/2510
About the same but with _typename
: https://github.com/apollographql/apollo-client/issues/1826
...but that's another story, anyway, that error occurs like 1 fro 20 times that I use the same function... it's all weird and random, but now I want to know if some one has a clue about the warning.
This is part of the code that shows what I'm using from Apollo
import AWSAppSyncClient, { createAppSyncLink, AUTH_TYPE } from 'aws-appsync';
import { setContext } from "apollo-link-context";
import { ApolloLink } from "apollo-link";
import { createHttpLink } from "apollo-link-http";
const client = new AWSAppSyncClient(AppSyncConfig, {
link: createAppSyncLink({ ...AppSyncConfig,
resultsFetcherLink: ApolloLink.from([
setContext((request, previousContext) => ({
headers: { ...previousContext.headers,
Authorization: localStorage.getItem('token') ? localStorage.getItem('token') : ''
}
})),
createHttpLink({
uri: AppSyncConfig.url
})
])
})
});