From 691957450acc97c78dd8be073c5e4c0ab657af88 Mon Sep 17 00:00:00 2001 From: Diego Szychowski Date: Sat, 24 Apr 2021 23:09:32 -0300 Subject: [PATCH] fix: cacheControl on null qcode (#215) --- core/api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/api.go b/core/api.go index b7549918..1f5c4269 100644 --- a/core/api.go +++ b/core/api.go @@ -281,7 +281,9 @@ func (gj *GraphJin) GraphQL( if qres.qc != nil { res.sql = qres.qc.st.sql - res.cacheControl = qres.qc.st.qc.Cache.Header + if qres.qc.st.qc != nil { + res.cacheControl = qres.qc.st.qc.Cache.Header + } } res.Data = json.RawMessage(qres.data)