const restLink = new RestLink({
uri: 'https://swapi.co/api/',
});
const client = new ApolloClient({
link: restLink,
cache: new InMemoryCache(),
});
const Query = gql`
query luke($id: String!) {
person(id: $id)
@rest(type: "Person", path: "people/:id") {
name
}
}
`;
Warnung: Veraltet: '@rest (Pfad:' enthält einen Doppelpunkt ':', dieses Format wird in zukünftigen Versionen entfernt
Was könnte das Problem sein?
[email protected]
[email protected]
[email protected]
[email protected]
Sie sollten auf die neue Syntax aktualisieren, um diese Warnung zu entfernen:
@rest(type: "Person", path: "people/:id") {
wird
@rest(type: "Person", path: "people/{args.id}") {
tolle Antwort @dbryand!
Hilfreichster Kommentar
Sie sollten auf die neue Syntax aktualisieren, um diese Warnung zu entfernen:
wird