Open marktani opened 6 years ago
Issue by martijnvdbrug Friday Jan 05, 2018 at 09:42 GMT Originally opened as https://github.com/graphcool/prisma/issues/1511
Creating a new model type without input scalar fields always returns 'insufficient permissions' error.
Create a graphcool service with the following model and permissions:
graphcool.yml
types: ./types.graphql permissions: # TEST - operation: Test.read authenticated: false query: testExists.graphql - operation: Test.create authenticated: false query: testExists.graphql - operation: Test.update authenticated: false - operation: Test.delete authenticated: false rootTokens: - gateway
types.graphql
type Test @model { id: ID! @isUnique createdAt: DateTime! updatedAt: DateTime! name: String }
testExists.graphql
query test { SomeTestExists }
Executing the following query results in 'insufficient permissions':
mutation{ createTest{ name } }
Executing this query successfully creates a Test type:
mutation{ createTest(name:"test"){ name } }
Both queries should result in a model type Test being created.
This seems like a similar issue: https://www.graph.cool/docs/reference/auth/authorization/important-notes-aej3ne1eez/
Issue by martijnvdbrug Friday Jan 05, 2018 at 09:42 GMT Originally opened as https://github.com/graphcool/prisma/issues/1511
Current behavior
Creating a new model type without input scalar fields always returns 'insufficient permissions' error.
Reproduction
Create a graphcool service with the following model and permissions:
graphcool.yml
types.graphql
testExists.graphql
Executing the following query results in 'insufficient permissions':
Executing this query successfully creates a Test type:
Expected behavior?
Both queries should result in a model type Test being created.