Hi anh, em có entity People (id, name, age, gender) với user A em chỉ cho hiện id,name. Với user B chỉ cho hiện id,name,gender. Trong tình huống này, có nên sử dụng GraphQL k ạ. GraphQL có hỗ trợ cho việc cache ở client k ạ. Thank a
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ý em là đây là 2 câu lệnh truy vấn khác nhau nhỉ? Trong trường hợp này thì GraphQL sẽ phù hợp hơn vì đỡ phải sinh ra nhiều API. Tuy nhiên câu hỏi của em không được thực tế lắm nhỉ?
GraphQL là ngôn ngữ truy vấn và nó không liên quan gì đến cache client cả em ạ.
https://graphql.org/learn/caching/ cache của GraphQL có giống các loại cache mình dùng không ạ
Cái này chỉ là cách thức sử dụng Globally Unique IDs để client có thể cache lại dữ liệu và không cần gọi lại request thôi em ạ, về bản chất nó không liên quan gì đến GraphQL cả.