Sorry, to clarify, you’re not seeing the latest pu...
# prisma-whats-new
m
Sorry, to clarify, you’re not seeing the latest purchase showing up when you go back to a view that shows all purchases?
m
lots of code coming, one sec
query{ allPurchases { id product { id purchases { id } } } }
this query does not update after a purchase, the length of all purchases stays at 0
Copy code
allUsers {
	id
	purchases {
		id
		product {
			id
		}
	}
}
m
And the mutation is working?
Like, a record is actually being created?
m
this query does however, if i inspect data.allUsers.purhcases it correctly shows the updated value
yes
i am trying to have a running tally of purchases in the header (stupid idea, i know, just testing out how to get values to update)
so i want to see the "purchases count: 0" update to "purchases count: 1" immediately when a purchase is made
what's interesting to me is that the user.purchases does update "live", but allPurchases does not
the mutation is
Copy code
createPurchase(
	productId: $productId
	userId: $userId
) {
	id
	product {
		id
		purchases {
			id
		}
	}
	user {
		id
		purchases {
			id
		}
	}
}
and im not sure if I'm overfetching on the return of the mutation, but it's how the userID is updating it's purchases correctly
m
Sorry, had to go to a meeting.