matty
01/03/2018, 11:23 PMmatty
01/03/2018, 11:43 PMmatty
01/04/2018, 12:24 AMmatty
01/04/2018, 12:25 AMmatty
01/04/2018, 1:58 AMmatty
01/04/2018, 1:58 AMmatty
01/04/2018, 2:03 AMmatty
01/04/2018, 2:03 AMmatty
01/04/2018, 2:05 AMmatty
01/04/2018, 3:15 AMmatty
01/04/2018, 3:36 AMquery permitCreatePost($user_id: ID!, $node_userId: ID!) {
SomeUserExists(filter: {
AND: [{
id: $user_id
}, {
id: $node_userId
}]
})
}
matty
01/04/2018, 3:36 AMmatty
01/04/2018, 3:37 AMmatty
01/04/2018, 3:38 AMuserId
for a different usermatty
01/04/2018, 3:40 AMmatty
01/04/2018, 3:40 AMMaxime Scibetta
01/04/2018, 9:05 AMexport const TABLE_EVENT_SUBSCRIPTION = gql `
subscription Score($id: ID!){
Score(
filter: {
mutation_in: [CREATED],
node: {
event_some: {id: $id}
}
}
) {
node{
score
event{
id
}
implementation{
id
}
comment
id
meeting{
author{
name
}
}
}
}
}
`
it's my query based on parent (Event) i want to subscription on Score child of implementations
export const TABLE_EVENT_QUERY = gql `
query Event($id: ID!){
Event(id : $id){
courseName
students{
name
implementations(filter: {events_every: {id: $id}}) {
id
project{
name
}
scores {
id
score
comment
meeting{
author{
name
}
}
}
}
}
}
}
`
efvaldez
01/04/2018, 12:12 PMefvaldez
01/04/2018, 12:13 PMefvaldez
01/04/2018, 12:13 PMefvaldez
01/04/2018, 12:13 PMStef
01/04/2018, 12:14 PMsubscription {
InstagramMedia(filter: {
mutation_in: [CREATED]
}) {
updatedFields
node {
id
instagramAccount {
user {
instagramToken
}
}
}
}
}
Lotafak
01/04/2018, 12:40 PMkitze
01/04/2018, 2:28 PMkitze
01/04/2018, 2:28 PMkitze
01/04/2018, 3:00 PMLotafak
01/04/2018, 3:22 PMtype User {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
email: String @unique
password: String
facebookUserId: String @unique
firstName: String
lastName: String
accounts: [Account!]! @relation(name: "UsersAccount")
}
sometimes I receive error: Error: GraphQL error: A unique constraint would be violated on User. Details: Field name = email
even though given email address doesn’t exist in database. What’s more interesting, user is created! So I receive error, then I’m quering to display all the users and see the user was created. What is going on?Maxime Scibetta
01/04/2018, 3:30 PMquery allEvents($id: ID) {
allEvents(filter: {id: $id}){
id
courseName
academicYear
students{
id
name
email
implementations(filter: {events_some: {id: $id}}){
id
project{
id
name
}
}
meetings(filter: {event: {id: $id}}) {
id
author{
id
name
}
}
}
}
}
efvaldez
01/04/2018, 5:01 PMefvaldez
01/04/2018, 5:02 PM