How do I protect certain fields with Slash GraphQL

Don’t think the docs have been updated just yet.

However, you may do the following:

function myHandler({parents, authHeader}) {
  const headerName = authHeader.key;
  const headerValue = authHeader.value;
  const [algo, claimsBase64, signature] = headerValue.split(".")
  const claims = JSON.parse(atob(claimsBase64));
}
4 Likes