1 Star 0 Fork 0

piao / gqlgen-todos

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
schema.graphql 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
phil.wang 提交于 2019-04-29 20:26 . add
type Todo {
id: ID!
text: String!
done: Boolean!
user: User!
}
type User {
id: ID!
name: String!
}
#type Query {
# todos: [Todo!]!
#
#}
input NewTodo {
text: String!
userId: String!
}
#type Mutation {
# createTodo(input: NewTodo!): Todo!
#
#}
# wiki
directive @hasPermission(role:Role!) on MUTATION | QUERY
enum Role {
Public
StoreAssociateManager
StoreAssociateEmployee
StoreBindoSaleAssociate
StoreBindoSaleManager
BindoAccountManager
VendorSalePeople
StoreAssociateJunior
StoreAssicateAPI
StoreAssociateNewAPI
StoreAssociate
StoresAssociate
BindoStaff
StoreCustomer
StoreAssociateOrBindoStaff
dynamicPermission
}
directive @mutationLog on MUTATION
input WikiInput{
key:String!
value:String!
}
type Wiki{
key:String!
value:String!
createdAt:Time!
updatedAt:Time!
deletedAt:Time
}
type Success {
success: Boolean!
}
type Query{
todos:[Todo!]!
# get wiki
wiki(storeID:Int!,key:String!):Wiki! @hasPermission(role: StoreAssociateOrBindoStaff)
}
type Mutation {
createTodo(input: NewTodo!): Todo!
#create Wiki
wikiCreate(storeID:Int!,input:WikiInput!):Wiki! @hasPermission(role: StoreAssociateOrBindoStaff) @mutationLog()
#update Wiki
wikiUpdate(storeID:Int!,input:WikiInput!):Wiki! @hasPermission(role: StoreAssociateOrBindoStaff) @mutationLog()
#delete Wiki
wikiDelete(storeID:Int!,key:String!):Success! @hasPermission(role: StoreAssociateOrBindoStaff) @mutationLog()
}
schema {
query: Query
mutation: Mutation
}
scalar Time
1
https://gitee.com/piao/gqlgen-todos.git
git@gitee.com:piao/gqlgen-todos.git
piao
gqlgen-todos
gqlgen-todos
master

搜索帮助