We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using graphql-shield or https://blog.graph.cool/graphql-directive-permissions-authorization-made-easy-54c076b5368e
graphql-shield
Step1. Allow only users with role ADMIN to perform those mutations:
ADMIN
# Upsert mutations upsertBrand(brandId: ID, categoryId: ID!, name: String!): Brand upsertAttribute(attributeId: ID, categoryId: ID!, value: String!): Attribute upsertCategory(categoryId: ID, name: String!): Category upsertOption(optionId: ID, name: String!, values: [OptionValueInput!]!, categoryId: ID!): Option upsertProduct( productId: ID, name: String!, categoryId: ID!, brandId: ID!, available: Boolean!, optionIds: [ID!]!, variants: [ProductVariantInput!]!, attributesIds: [ID!]!, unavailableOptionsValuesIds: [ID!]!, displayPrice: Float!, imageUrl: String ): Product #Upsert Shop metadata upsertBestSalesProducts(shopMetadataId: ID, bestSalesProducts: [OrderableProductInput!]!): ShopMetadata! upsertNewProducts(shopMetadataId: ID, newProducts: [OrderableProductInput!]!): ShopMetadata! upsertMOTD(shopMetadataId: ID, MOTD: String!): ShopMetadata! # Delete mutations deleteProduct(productId: ID!): Product deleteOption(optionId: ID!): Option deleteBrand(brandId: ID!): Brand deleteAttribute(attributeId: ID!): Attribute deleteCategory(categoryId: ID!): Category #Order mutations setOrderAsPrepared(orderId: ID!): Order #Can be updated only by admins (eg: to set order as prepared)
And those queries:
allCustomers: [User!]!
The text was updated successfully, but these errors were encountered:
+1 to graphql-shield
Sorry, something went wrong.
No branches or pull requests
Using
graphql-shield
or https://blog.graph.cool/graphql-directive-permissions-authorization-made-easy-54c076b5368eStep1. Allow only users with role
ADMIN
to perform those mutations:And those queries:
The text was updated successfully, but these errors were encountered: