cortex-cms/cortex

View on GitHub
app/graphql/cortex/types/user_type.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Cortex
  Types::UserType = GraphQL::ObjectType.define do
    name 'User'
    description 'Cortex administrator or content creator'

    field :id, !types.ID
    field :firstname, !types.String
    field :lastname, !types.String
    field :locale, !types.String
    field :timezone, !types.String
    field :created_at, !Cortex::Types::DateTimeType
    field :updated_at, !Cortex::Types::DateTimeType
    field :deleted_at, Cortex::Types::DateTimeType

    field :tenants, !types[Cortex::Types::TenantType]
    field :active_tenant, !types[Cortex::Types::TenantType]

    # TODO: Owned ContentItems, etc
  end
end