srhise
10/05/2017, 3:11 AMilija_nl
10/05/2017, 6:23 AMflorian
10/05/2017, 6:23 AMilija_nl
10/05/2017, 6:24 AMBogs
10/05/2017, 7:18 AMflorian
10/05/2017, 7:35 AMflorian
10/05/2017, 7:35 AMgraphcool deploy
I get 'ECONNREFUSED': request to <http://localhost:60000/system>
florian
10/05/2017, 7:49 AMflorian
10/05/2017, 7:49 AMnotrab
10/05/2017, 10:52 AMError: GraphQL error: The provided idToken is invalid. Please see <https://auth0.com/docs/tokens/id_token> for how to obtain a valid idToken
notrab
10/05/2017, 10:53 AMtaikn
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?florian
10/05/2017, 12:19 PM.graphcoolrc
that are available in functions ?florian
10/05/2017, 12:20 PMkharioki
10/05/2017, 12:21 PMBen
10/05/2017, 3:49 PMBen
10/05/2017, 3:50 PMmwickett
10/05/2017, 5:55 PMlastmjs
10/05/2017, 6:54 PMmatty_fresh
10/05/2017, 6:58 PMmutation CreateVoteMutation($userId: ID!, $linkId: ID!) {
createVote(userId: $userId, linkId: $linkId) {
id
link {
votes {
id
user {
id
}
}
}
user {
id
}
}
}
How does graphcool know what to do with userId
and linkId
in this query??matty_fresh
10/05/2017, 6:59 PMallFiles
)... is this something along those lines?matty_fresh
10/05/2017, 7:00 PMmatty_fresh
10/05/2017, 7:01 PMmatty_fresh
10/05/2017, 7:02 PM$linkId
is the ID
prop on a Link
object, but that is not made very plain in the tutorialmatty_fresh
10/05/2017, 7:05 PMProfile
need to implement the Node
interface? just a wild guess. like type Profile implements Node
matty_fresh
10/05/2017, 7:29 PM$userId
and $linkId
lastmjs
10/05/2017, 8:20 PMlastmjs
10/05/2017, 8:21 PMrein
10/05/2017, 8:38 PMrein
10/05/2017, 8:44 PM