I created a subscription function, with the follow...
# prisma-whats-new
d
I created a subscription function, with the following subscription:
Copy code
subscription {
  Project(filter: {
    mutation_in: [CREATED]
  }) {
    updatedFields
    node {
      id
    }
  }
}
But it's not invoking the function. Anyone see what I'm doing wrong? It's been about 10 min since I created a few new Project records.
a
Does your Project Type contain any scalar fields?
d
yes
Project Schema:
Copy code
type Project implements Node {
  createdAt: DateTime!
  id: ID! @isUnique
  updatedAt: DateTime!
  organization: Organization! @relation(name: "OrganizationOnProject")
  startAt: DateTime!
  completedAt: DateTime
  type: ServiceType!
  typeDescription: String!
  po: String
  comments: String
  estimate: String
  invoice: String
  product: Product! @relation(name: "ProjectOnProduct")
  users: [User!]! @relation(name: "ProjectOnUser")
  contact: Contact! @relation(name: "ProjectOnContact")
  notifiedAt: DateTime
}
Nilan pointed me to logging issue currently discussed.
a
Not logging the invocation is not the same as not being invoked.
d
For some reason my first function wasn't getting invoked. I created another a duplicate one and it started to trigger my webhook. However it does not log or does not show any invocations.
a
No, that last part is a knows issues for non-EU regions. But at least it's triggering now...
d
Ya I'm not sure why my first one was not triggering. But it's working now.
However I can't tell from graphcool.
Because it still lists 0 invocations.
a
Yes, I know that's annoying.
I actually use a EU project for testing. And when I know everything works, I'll copy it over to a US project (if needed)
d
The most frustrating things to debug are the simplest implementations where you can't figure out why just a few lines doesn't work.
a
That's why. It's always the most obvious things that go wrong 🙂