Sha256: 99b27e53bad72aa48347e3735b2cec3cf44d64503a329d04b0c7acd88f3fd00b
Contents?: true
Size: 922 Bytes
Versions: 40
Compression:
Stored size: 922 Bytes
Contents
# frozen_string_literal: true module Decidim # This type represents a User. UserType = GraphQL::ObjectType.define do name "User" description "A user" interfaces [ Decidim::AuthorInterface ] field :name, !types.String, "The user's name" field :avatarUrl, !types.String, "The user's avatar url" do resolve ->(obj, _args, _ctx) { obj.avatar.url } end field :organizationName, !types.String, "The user's organization name" do resolve ->(obj, _args, _ctx) { obj.organization.name } end field :isVerified, !types.Boolean, "Whether the author is verified or not" do resolve ->(_obj, _args, _ctx) { false } end field :deleted, !types.Boolean, "Whether the user's account has been deleted or not", property: :deleted? field :isUser, !types.Boolean, "User groups are not users" do resolve ->(_obj, _args, _ctx) { true } end end end
Version data entries
40 entries across 40 versions & 2 rubygems