Hi, does Graphcool's subscription resolvers includ...
# prisma-whats-new
b
Hi, does Graphcool's subscription resolvers include subfields? I'm looking for help getting a (React Native/Apollo) subscription to work when a query subfield is updated on the server. I am using a subscription query for a chat application that works fine when a new message arrives or an existing one is updated:
Copy code
const newMessageSubscription = gql`
  subscription {
    Message(filter: { mutation_in: [CREATED, UPDATED] }) {
      node {
        id
        text
        createdAt
        sentBy {
          id
          name
        }
        receivedBy {
          id
          name
        }
      }
    }
  }
`;
This works (data is returned) when a new message arrives or an existing message field is updated (i.e.,
text
field). However, if a subfield such as
receivedBy
is updated on the server (indicating another user has read the message), the subscription does not return anything. Thanks in advance!
n
b
Ok, hopefully this functionality will be available soon. In the meantime I'll try to use the suggested workaround/hack.