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
|
getRole *sql.Stmt
|
||||||
rmap map[uint64]resolvFn
|
rmap map[uint64]resolvFn
|
||||||
abacEnabled bool
|
abacEnabled bool
|
||||||
anonExists bool
|
|
||||||
qc *qcode.Compiler
|
qc *qcode.Compiler
|
||||||
pc *psql.Compiler
|
pc *psql.Compiler
|
||||||
ge *graphql.Engine
|
ge *graphql.Engine
|
||||||
|
|
|
@ -78,15 +78,13 @@ func (sg *SuperGraph) initPrepared() error {
|
||||||
if len(v.Query) == 0 {
|
if len(v.Query) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
qt := qcode.GetQType(v.Query)
|
qt := qcode.GetQType(v.Query)
|
||||||
|
|
||||||
switch qt {
|
switch qt {
|
||||||
case qcode.QTQuery:
|
case qcode.QTQuery:
|
||||||
sg.queries[queryID(&h, v.Name, "user")] = &query{ai: v, qt: qt}
|
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}
|
sg.queries[queryID(&h, v.Name, "anon")] = &query{ai: v, qt: qt}
|
||||||
}
|
|
||||||
|
|
||||||
case qcode.QTMutation:
|
case qcode.QTMutation:
|
||||||
for _, role := range sg.conf.Roles {
|
for _, role := range sg.conf.Roles {
|
||||||
|
|
Loading…
Reference in New Issue