taikn
10/05/2017, 11:04 AMtype Profile @model {
id: ID! @isUnique
name: String!
…
owner: User! @relation(name: "UserOnProfile")
}
In graphcool.yml I have defined following permissions:
permissions:
- operation: Profile.update
authenticated: true
query: ./permissions/updateProfile.graphql
Here’s the contents of my permission query:
query permitProfileUpdate($node_id: ID!, $user_id: ID!) {
SomeProfileExists(filter: {
id: $node_id,
owner: {
id: $user_id
}
})
}
This is the update mutation I am trying to run:
mutation UpdateProfileName($id: ID!, $name: String!) {
updateProfile(id: $id, name: $name) {
id
}
}
And this is the error i am getting:
"Permission Query is invalid. Could not be parsed. Error Message: Syntax error while parsing GraphQL query. Invalid input \"query ($node_id: ID, $user_id: ID) q\", expected OperationDefinition, FragmentDefinition or TypeSystemDefinition (line 1, column 1):\nquery ($node_id: ID, $user_id: ID) query permitProfileUpdate($node_id: ID!, $user_id: ID!) {\n^"
What am i doing wrong?agartha
10/05/2017, 11:10 AMgraphcool version
to get this information.taikn
10/05/2017, 11:31 AMnilan
10/05/2017, 12:15 PMnilan
10/05/2017, 12:16 PM{
SomeProfileExists(filter: {
id: $node_id,
owner: {
id: $user_id
}
})
}
taikn
10/05/2017, 12:27 PM