./ct_report/coverage/mongoose_graphql_admin_query.COVER.html

1 -module(mongoose_graphql_admin_query).
2 -behaviour(mongoose_graphql).
3
4 -export([execute/4]).
5
6 -ignore_xref([execute/4]).
7
8 -include("../mongoose_graphql_types.hrl").
9
10 execute(_Ctx, _Obj, <<"domains">>, _Args) ->
11
:-(
{ok, admin};
12 execute(_Ctx, _Obj, <<"account">>, _Args) ->
13 13 {ok, account};
14 execute(_Ctx, _Obj, <<"muc_light">>, _Args) ->
15 13 {ok, muc_light};
16 execute(_Ctx, _Obj, <<"session">>, _Args) ->
17 14 {ok, session};
18 execute(_Ctx, _Obj, <<"stanza">>, _Args) ->
19
:-(
{ok, #{}};
20 execute(_Ctx, _Obj, <<"roster">>, _Args) ->
21 6 {ok, roster};
22 execute(#{authorized := Authorized}, _Obj, <<"checkAuth">>, _Args) ->
23 3 case Authorized of
24 true ->
25 2 {ok, 'AUTHORIZED'};
26 false ->
27 1 {ok, 'UNAUTHORIZED'}
28 end.
Line Hits Source