Sha256: 2494c551070b6140fa3242858a1c6081de5a0a01d003fb09d17ad987122b5220
Contents?: true
Size: 683 Bytes
Versions: 36
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true module Decidim module Core # A resolver for the GraphQL user/group endpoints # Used in the keyword "user", ie: # # user(nickname: "foo") { # name # } # class UserEntityFinder def call(_obj, args, ctx) filters = { organization: ctx[:current_organization] } args.each do |argument, value| next if value.blank? v = value.to_s v = v[1..-1] if value.starts_with? "@" filters[argument.to_sym] = v end Decidim::UserBaseEntity .confirmed .not_blocked .find_by(filters) end end end end
Version data entries
36 entries across 36 versions & 1 rubygems