From 47a8317c428c15ec947f8db435103ec297cc2c12 Mon Sep 17 00:00:00 2001 From: MikaAK Date: Thu, 21 Sep 2023 01:06:44 -0700 Subject: [PATCH] chore: add docs for whitelisting --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d4171d..ef69f43 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,11 @@ For GraphQL endpoints it is possible to provide a list of atoms that will be pas field :user, :user do arg :id, non_null(:id) - middleware RequestCache.Middleware, ttl: :timer.seconds(60), cache: MyCacheModule, labels: [:service, :endpoint] + middleware RequestCache.Middleware, + ttl: :timer.seconds(60), + cache: MyCacheModule, + labels: [:service, :endpoint], + whitelisted_query_names: ["MyQueryName"] # By default all queries are cached, can also whitelist based off query name from GQL Document resolve &Resolvers.User.find/2 end