Purge by different unique fields

In order to purge individual nodes (like the Post with the id 5) GraphCDN needs to know which field holds the unique identifier for a certain node type.

By default, GraphCDN looks for id and key fields on your types. However, sometimes you have other unique fields (like e.g. User.email) that you want to use to purge the cache.

To tell GraphCDN that email is a unique field you want to purge by go to the Key Fields settings of your instance. You will see the default key fields that GraphCDN assigned automatically and can configure your own custom ones.

These key fields are then immediately exposed and purgeable from the purging API:

# Purge newsletter subscriber with the email max@graphcdn.io
mutation {
purgeNewsletterSubscriber(email: ["max@graphcdn.io"])

For more information about cache purging and the purging API read the documentation.