Could not find query
seunghwako opened this issue · 0 comments
type Category @model @auth( rules: [{ allow: public, operations: [read] }, { allow: groups, groups: ["user", "adminUser"] }] ) @key( name: "byMainCategoryName" fields: ["mainCategoryName", "id"] queryField: "mainCategoryNamesByName" ) { id: ID! mainCategoryName: String! subName: [String]! }
This is Cateogry Schema, Error "Could not find query" occurs when attempting to category edit.
export const getCategory = /* GraphQL */
query GetCategory($id: ID!) {
getCategory(id: $id) {
id
mainCategoryName
subName
createdAt
updatedAt
}
}
; export const listCategories = /* GraphQL */
query ListCategories(
$filter: ModelCategoryFilterInput
$limit: Int
$nextToken: String
) {
listCategories(filter: $filter, limit: $limit, nextToken: $nextToken) {
items {
id
mainCategoryName
subName
createdAt
updatedAt
}
nextToken
}
}
;
This is query for Category. How do I solve this?