You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On version 0.8.0-beta.0 the RestLink implementation is broken. I followed this tutorial but the first code block already breaks:
// Create a RestLink for the Github API
const link = new RestLink({ uri: 'https://api.github.com' });
// Configure the ApolloClient with the recommended cache and our RestLink
const client = new ApolloClient({
cache: new InMemoryCache(),
link,
});
results in the following TypeScript error:
Type 'RestLink' is missing the following properties from type 'ApolloLink': split, concat
details:
{
"resource": "/*redacted*/src/file.ts",
"owner": "typescript",
"code": "2739",
"severity": 8,
"message": "Type 'RestLink' is missing the following properties from type 'ApolloLink': split, concat",
"source": "ts",
"startLineNumber": 11,
"startColumn": 3,
"endLineNumber": 11,
"endColumn": 7,
"relatedInformation": [
{
"startLineNumber": 17,
"startColumn": 5,
"endLineNumber": 17,
"endColumn": 9,
"message": "The expected type comes from property 'link' which is declared here on type 'ApolloClientOptions<NormalizedCacheObject>'",
"resource": "/*redacted*/node_modules/apollo-client/ApolloClient.d.ts"
}
]
}
This behaviour is reproducable on the codesandbox example by upgrading the apollo-link-rest dependency to 0.8.0-beta.0.
Reverting back to v0.7.3 resolves the issue.
The text was updated successfully, but these errors were encountered:
Oke, I didn't know that. I just followed the docs. I will close the issue. It's good to have this documented for others who run in to the same problem. It probably happens to more people since lots of people just npm install (or yarn) the latest version and it won't work.
On version
0.8.0-beta.0
theRestLink
implementation is broken. I followed this tutorial but the first code block already breaks:results in the following TypeScript error:
details:
This behaviour is reproducable on the codesandbox example by upgrading the
apollo-link-rest
dependency to0.8.0-beta.0
.Reverting back to
v0.7.3
resolves the issue.The text was updated successfully, but these errors were encountered: