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
}
}
`;
تحذير: مهمل: "rest (المسار:" يحتوي على ":" نقطتان ، ستتم إزالة هذا التنسيق في الإصدارات المستقبلية
ماذا ممكن ان تكون المشكلة؟
[email protected]
الرسم البياني [email protected]
الرسم البياني [email protected]
الرسم البياني [email protected]
سترغب في التحديث إلى بناء الجملة الجديد للتخلص من هذا التحذير:
@rest(type: "Person", path: "people/:id") {
يصبح
@rest(type: "Person", path: "people/{args.id}") {
إجابة رائعةdbryand!
التعليق الأكثر فائدة
سترغب في التحديث إلى بناء الجملة الجديد للتخلص من هذا التحذير:
يصبح