Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 67d7dfe

Browse files
committed
Use bfs_executor only for shard
1 parent 8301017 commit 67d7dfe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

graphql/impl.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ local function gql_execute(qstate, variables, operation_name)
5555
check(operation_type, 'operation_type', 'string')
5656
assert(operation_type == 'query' or operation_type == 'mutation',
5757
'only "query" and "mutation" operation types are supported')
58+
local accessor = state.accessor
5859

59-
if operation_type == 'query' then
60+
if operation_type == 'query' and accessor.name == 'shard' then
6061
return bfs_executor.execute(state.schema, qstate.ast, variables,
6162
operation_name, {
6263
qcontext = qcontext,
63-
accessor = qstate.state.accessor,
64+
accessor = accessor,
6465
})
6566
else
6667
local root_value = {}

0 commit comments

Comments
 (0)