Accessors in GraphQL Resources #757
Replies: 2 comments 1 reply
-
Well, I need to refresh my GraphQL theory. So @ThisaruGuruge correct me if I am wrong. AFAIR, GraphQL specification does not mandate sending Anyway, now that you brought this up, I am thinking if we should have three accessors as Also, when designing APIs, I think it is always good to follow the below principle. So that we can serve both good citizens as well as bad citizens of a given community. Because usually in large communities, there could be slightly different implementations of the same spec. HTTP is notoriously famous for this. "Be conservative in what you do, be liberal in what you accept from others" |
Beta Was this translation helpful? Give feedback.
-
Great explanation! I agree. Let's go with the |
Beta Was this translation helpful? Give feedback.
-
Currently, the Ballerina GraphQL module allows all the types of accessors for a resource function.
I think we should only support the
get
accessor for GraphQL queries and thepost
accessor for mutations (when we support mutations).@shafreenAnfar WDYT?
Beta Was this translation helpful? Give feedback.
All reactions