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
}
}
`;
Avertissement: obsolète: '@rest (chemin:' contient un ':' deux-points, ce format sera supprimé dans les versions futures
Quel pourrait être le problème?
[email protected]
[email protected]
[email protected]
[email protected]
Vous voudrez mettre à jour la nouvelle syntaxe pour vous débarrasser de cet avertissement:
@rest(type: "Person", path: "people/:id") {
devient
@rest(type: "Person", path: "people/{args.id}") {
bonne réponse @dbryand!
Commentaire le plus utile
Vous voudrez mettre à jour la nouvelle syntaxe pour vous débarrasser de cet avertissement:
devient