artyom
05/01/2017, 2:55 PMmorley
05/01/2017, 2:55 PMjoshjoe
05/01/2017, 2:55 PMpatstrz
05/01/2017, 2:55 PMjoshjoe
05/01/2017, 3:07 PMadamibaker
05/01/2017, 4:07 PM// SCHEMA/TYPE
type User {
id: ID! @isUnique
seenItems: [Json!]
...
}
// Example data
[
{
'key': '567cd61b2eb732d3bf8ff31dabb39890b8ebee840e16b52a326362c8abe37be7',
'liked': true,
'message': 'lorem ipsum dolor emet'
},
{
'key': 'ba40d61af75117c0a96056eff7763ce072dde633e4d40c827e3f56820dff538e',
'liked': false,
'message': 'veridis quo'
},
...
]
nickyhajal
05/01/2017, 5:02 PMUser
and Domain
and many users can each relate to many domains, I need to have a through model for UserDomain
, like SQL, correct?
type User {
id
}
type Domain {
id
}
type UserDomain {
User
Domain
}
Or does graphcool's many-many relation somehow remove that need?nickyhajal
05/01/2017, 6:21 PMnickyhajal
05/01/2017, 6:22 PMartyom
05/01/2017, 6:24 PMjjaybrown98
05/01/2017, 7:14 PMjjaybrown98
05/01/2017, 7:14 PMmorley
05/01/2017, 8:41 PMmorley
05/01/2017, 8:42 PMartyom
05/01/2017, 9:37 PMlaurence
05/01/2017, 9:52 PMandrius
05/01/2017, 10:31 PMfaqsAnswers: [Json!]!
how do I pass json object using lokka ?hueezer
05/02/2017, 12:26 AMjjaybrown98
05/02/2017, 7:51 AMafgh
05/02/2017, 7:54 AMtheom
05/02/2017, 8:00 AMgetCurrentPostLikesValueQuery(idVal) {
return this.props.client.query({
query: Get_Post_Likes_Query,
variables: {
'id': idVal
},
})
.then(this.incrementPostLikesQuery)
.catch(this.handleSubmitError);
},
incrementPostLikesQuery({data}) {
const idVal = data.Posts.id;
const incVal = data.Posts.likes + 1;
return this.props.client.mutate({
mutation: Increment_Post_Likes_Query,
variables: {
'id': idVal,
'count': incVal
},
})
.catch(this.handleSubmitError);
},
and my mutation is as follows:
export const Increment_Post_Likes_Query = gql`
mutation incrementPostLikes ($id: ID!, $count: Int) {
updatePosts (id: $id, likes: $count) {
__typename
id
likes
}
}
`;
What am I overlooking here?joar
05/02/2017, 9:26 AMjoar
05/02/2017, 9:26 AMjoar
05/02/2017, 9:26 AMjoar
05/02/2017, 9:26 AMjoar
05/02/2017, 9:26 AMjoar
05/02/2017, 9:27 AMnilan
05/02/2017, 9:27 AMjoar
05/02/2017, 9:27 AMjoar
05/02/2017, 9:30 AM