@@ -182,7 +182,7 @@ defmodule Console.GraphQl.Users do
182182 field :role , :role do
183183 middleware Authenticated
184184
185- resolve safe_resolver ( & User . resolve_role / 2 )
185+ safe_resolve & User . resolve_role / 2
186186 end
187187
188188 connection field :roles , node_type: :role do
@@ -205,13 +205,20 @@ defmodule Console.GraphQl.Users do
205205 arg :email , non_null ( :string )
206206 arg :password , non_null ( :string )
207207
208- resolve safe_resolver ( & User . signin_user / 2 )
208+ safe_resolve & User . signin_user / 2
209+ end
210+
211+ field :login_link , :user do
212+ middleware AllowJwt
213+ arg :key , non_null ( :string )
214+
215+ safe_resolve & User . login_link / 2
209216 end
210217
211218 field :read_notifications , :user do
212219 middleware Authenticated
213220
214- resolve safe_resolver ( & User . read_notifications / 2 )
221+ safe_resolve & User . read_notifications / 2
215222 end
216223
217224 field :signup , :user do
@@ -220,23 +227,23 @@ defmodule Console.GraphQl.Users do
220227 arg :invite_id , non_null ( :string )
221228 arg :attributes , non_null ( :user_attributes )
222229
223- resolve safe_resolver ( & User . signup_user / 2 )
230+ safe_resolve & User . signup_user / 2
224231 end
225232
226233 field :oauth_callback , :user do
227234 middleware AllowJwt
228235 arg :code , non_null ( :string )
229236 arg :redirect , :string
230237
231- resolve safe_resolver ( & User . oauth_callback / 2 )
238+ safe_resolve & User . oauth_callback / 2
232239 end
233240
234241 field :create_invite , :invite do
235242 middleware Authenticated
236243 middleware Sandboxed
237244 arg :attributes , non_null ( :invite_attributes )
238245
239- resolve safe_resolver ( & User . create_invite / 2 )
246+ safe_resolve & User . create_invite / 2
240247 end
241248
242249 field :update_user , :user do
@@ -245,7 +252,7 @@ defmodule Console.GraphQl.Users do
245252 arg :id , :id
246253 arg :attributes , non_null ( :user_attributes )
247254
248- resolve safe_resolver ( & User . update_user / 2 )
255+ safe_resolve & User . update_user / 2
249256 end
250257
251258 field :create_group , :group do
@@ -254,7 +261,7 @@ defmodule Console.GraphQl.Users do
254261 middleware Sandboxed
255262 arg :attributes , non_null ( :group_attributes )
256263
257- resolve safe_resolver ( & User . create_group / 2 )
264+ safe_resolve & User . create_group / 2
258265 end
259266
260267 field :delete_group , :group do
@@ -263,7 +270,7 @@ defmodule Console.GraphQl.Users do
263270 middleware Sandboxed
264271 arg :group_id , non_null ( :id )
265272
266- resolve safe_resolver ( & User . delete_group / 2 )
273+ safe_resolve & User . delete_group / 2
267274 end
268275
269276 field :update_group , :group do
@@ -273,7 +280,7 @@ defmodule Console.GraphQl.Users do
273280 arg :group_id , non_null ( :id )
274281 arg :attributes , non_null ( :group_attributes )
275282
276- resolve safe_resolver ( & User . update_group / 2 )
283+ safe_resolve & User . update_group / 2
277284 end
278285
279286 field :create_group_member , :group_member do
@@ -283,7 +290,7 @@ defmodule Console.GraphQl.Users do
283290 arg :group_id , non_null ( :id )
284291 arg :user_id , non_null ( :id )
285292
286- resolve safe_resolver ( & User . create_group_member / 2 )
293+ safe_resolve & User . create_group_member / 2
287294 end
288295
289296 field :delete_group_member , :group_member do
@@ -293,7 +300,7 @@ defmodule Console.GraphQl.Users do
293300 arg :group_id , non_null ( :id )
294301 arg :user_id , non_null ( :id )
295302
296- resolve safe_resolver ( & User . delete_group_member / 2 )
303+ safe_resolve & User . delete_group_member / 2
297304 end
298305
299306 field :create_role , :role do
@@ -302,7 +309,7 @@ defmodule Console.GraphQl.Users do
302309 middleware Sandboxed
303310 arg :attributes , non_null ( :role_attributes )
304311
305- resolve safe_resolver ( & User . create_role / 2 )
312+ safe_resolve & User . create_role / 2
306313 end
307314
308315 field :update_role , :role do
@@ -312,7 +319,7 @@ defmodule Console.GraphQl.Users do
312319 arg :id , non_null ( :id )
313320 arg :attributes , non_null ( :role_attributes )
314321
315- resolve safe_resolver ( & User . update_role / 2 )
322+ safe_resolve & User . update_role / 2
316323 end
317324
318325 field :delete_role , :role do
@@ -321,7 +328,7 @@ defmodule Console.GraphQl.Users do
321328 middleware Sandboxed
322329 arg :id , non_null ( :id )
323330
324- resolve safe_resolver ( & User . delete_role / 2 )
331+ safe_resolve & User . delete_role / 2
325332 end
326333 end
327334
0 commit comments