【发布时间】:2020-09-30 12:44:12
【问题描述】:
我正在使用 graphql,我想知道突变/查询/订阅有标准的命名约定。
如果我把它命名为:
mutation {
createOrGetUUID() # create a uuid if not exit, otherwise return the existing one
}
query {
uuid() # query uuid
}
我担心的是突变createOrGetUUID。它有两种工作,一种是创造,另一种是获得。我应该给这个方法起什么名字?听起来这种方法同时适用于mutation 和query。
【问题讨论】:
标签: graphql