fix: jit failing on anon queries
This commit is contained in:
parent
00cfa251a2
commit
7b5548a2c6
|
@ -90,7 +90,6 @@ type SuperGraph struct {
|
|||
getRole *sql.Stmt
|
||||
rmap map[uint64]resolvFn
|
||||
abacEnabled bool
|
||||
anonExists bool
|
||||
qc *qcode.Compiler
|
||||
pc *psql.Compiler
|
||||
ge *graphql.Engine
|
||||
|
|
|
@ -78,15 +78,13 @@ func (sg *SuperGraph) initPrepared() error {
|
|||
if len(v.Query) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
qt := qcode.GetQType(v.Query)
|
||||
|
||||
switch qt {
|
||||
case qcode.QTQuery:
|
||||
sg.queries[queryID(&h, v.Name, "user")] = &query{ai: v, qt: qt}
|
||||
|
||||
if sg.anonExists {
|
||||
sg.queries[queryID(&h, v.Name, "anon")] = &query{ai: v, qt: qt}
|
||||
}
|
||||
|
||||
case qcode.QTMutation:
|
||||
for _, role := range sg.conf.Roles {
|
||||
|
|
Loading…
Reference in New Issue