diff --git a/lib/validate.js b/lib/validate.js index 71e08300..576687e6 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -74,7 +74,7 @@ async function subExists (name, { client, models, me, filter }) { let sub // apollo client if (client) { - const { data } = await client.query({ query: SUB, variables: { sub: name }, fetchPolicy: 'no-cache' }) + const { data } = await client.query({ query: SUB, variables: { sub: name } }) sub = data?.sub } else { sub = await models.sub.findUnique({ where: { name } }) @@ -104,6 +104,7 @@ async function subHasPostType (name, type, { client, models }) { if (!client && !models) { throw new Error('cannot check for territory') } + // apollo client if (client) { const { data } = await client.query({ query: SUB, variables: { name } })