text: "use strict";(self.webpackChunkdocusaurus_2=self.webpackChunkdocusaurus_2||[]).push([[5655],{3905:function(e,t,a){a.d(t,{Zo:function(){return c},kt:function(){return m}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function s(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},o=Object.keys(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=n.createContext({}),d=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=d(e.components);return n.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=d(a),m=r,h=p["".concat(l,".").concat(m)]||p[m]||u[m]||o;return a?n.createElement(h,i(i({ref:t},c),{},{components:a})):n.createElement(h,i({ref:t},c))}));function m(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,i=new Array(o);i[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:r,i[1]=s;for(var d=2;d<o;d++)i[d]=a[d];return n.createElement.apply(null,i)}return n.createElement.apply(null,a)}p.displayName="MDXCreateElement"},3744:function(e,t,a){a.r(t),a.d(t,{assets:function(){return c},contentTitle:function(){return l},default:function(){return m},frontMatter:function(){return s},metadata:function(){return d},toc:function(){return u}});var n=a(7462),r=a(3366),o=(a(7294),a(3905)),i=["components"],s={id:"user",title:"User"},l=void 0,d={unversionedId:"schema/objects/user",id:"schema/objects/user",title:"User",description:"A user",source:"@site/docs/schema/objects/user.mdx",sourceDirName:"schema/objects",slug:"/schema/objects/user",permalink:"/schema/objects/user",tags:[],version:"current",frontMatter:{id:"user",title:"User"},sidebar:"basic",previous:{title:"UserVoiceActorStatistic",permalink:"/schema/objects/user-voice-actor-statistic"},next:{title:"YearStats",permalink:"/schema/objects/year-stats"}},c={},u=[{value:"Fields",id:"fields",level:3},{value:"<code>id</code> (<code>Int</code>)",id:"id-int",level:4},{value:"<code>name</code> (<code>String</code>)",id:"name-string",level:4},{value:"<code>about</code> (<code>String</code>)",id:"about-string",level:4},{value:"<code>avatar</code> (<code>UserAvatar</code>)",id:"avatar-useravatar",level:4},{value:"<code>bannerImage</code> (<code>String</code>)",id:"bannerimage-string",level:4},{value:"<code>isFollowing</code> (<code>Boolean</code>)",id:"isfollowing-boolean",level:4},{value:"<code>isFollower</code> (<code>Boolean</code>)",id:"isfollower-boolean",level:4},{value:"<code>isBlocked</code> (<code>Boolean</code>)",id:"isblocked-boolean",level:4},{value:"<code>bans</code> (<code>Json</code>)",id:"bans-json",level:4},{value:"<code>options</code> (<code>UserOptions</code>)",id:"options-useroptions",level:4},{value:"<code>mediaListOptions</code> (<code>MediaListOptions</code>)",id:"medialistoptions-medialistoptions",level:4},{value:"<code>favourites</code> (<code>Favourites</code>)",id:"favourites-favourites",level:4},{value:"<code>statistics</code> (<code>UserStatisticTypes</code>)",id:"statistics-userstatistictypes",level:4},{value:"<code>unreadNotificationCount</code> (<code>Int</code>)",id:"unreadnotificationcount-int",level:4},{value:"<code>siteUrl</code> (<code>String</code>)",id:"siteurl-string",level:4},{value:"<code>donatorTier</code> (<code>Int</code>)",id:"donatortier-int",level:4},{value:"<code>donatorBadge</code> (<code>String</code>)",id:"donatorbadge-string",level:4},{value:"<code>moderatorRoles</code> (<code>ModRole</code>)",id:"moderatorroles-modrole",level:4},{value:"<code>createdAt</code> (<code>Int</code>)",id:"createdat-int",level:4},{value:"<code>updatedAt</code> (<code>Int</code>)",id:"updatedat-int",level:4},{value:"<code>stats</code> (<code>UserStats</code>)",id:"stats-userstats",level:4},{value:"<code>moderatorStatus</code> (<code>String</code>)",id:"moderatorstatus-string",level:4},{value:"<code>previousNames</code> (<code>UserPreviousName</code>)",id:"previousnames-userpreviousname",level:4}],p={toc:u};function m(e){var t=e.components,a=(0,r.Z)(e,i);return(0,o.kt)("wrapper",(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"A user"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-graphql"},"type User {\n  id: Int!\n  name: String!\n  about(asHtml: Boolean): String\n  avatar: UserAvatar\n  bannerImage: String\n  isFollowing: Boolean\n  isFollower: Boolean\n  isBlocked: Boolean\n  bans: Json\n  options: UserOptions\n  mediaListOptions: MediaListOptions\n  favourites(page: Int): Favourites\n  statistics: UserStatisticTypes\n  unreadNotificationCount: Int\n  siteUrl: String\n  donatorTier: Int\n  donatorBadge: String\n  moderatorRoles: [ModRole]\n  createdAt: Int\n  updatedAt: Int\n  stats: UserStats\n  moderatorStatus: String\n  previousNames: [UserPreviousName]\n}\n")),(0,o.kt)("h3",{id:"fields"},"Fields"),(0,o.kt)("h4",{id:"id-int"},(0,o.kt)("inlineCode",{parentName:"h4"},"id")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int")),")"),(0,o.kt)("p",null,"The id of the user"),(0,o.kt)("h4",{id:"name-string"},(0,o.kt)("inlineCode",{parentName:"h4"},"name")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String")),")"),(0,o.kt)("p",null,"The name of the user"),(0,o.kt)("h4",{id:"about-string"},(0,o.kt)("inlineCode",{parentName:"h4"},"about")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String")),")"),(0,o.kt)("p",null,"The bio written by user (Markdown)"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("h5",{parentName:"li",id:"ashtml-boolean"},(0,o.kt)("inlineCode",{parentName:"h5"},"asHtml")," (",(0,o.kt)("a",{parentName:"h5",href:"/schema/scalars/boolean"},(0,o.kt)("inlineCode",{parentName:"a"},"Boolean")),")"))),(0,o.kt)("p",null,"Return the string in pre-parsed html instead of markdown"),(0,o.kt)("h4",{id:"avatar-useravatar"},(0,o.kt)("inlineCode",{parentName:"h4"},"avatar")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/objects/user-avatar"},(0,o.kt)("inlineCode",{parentName:"a"},"UserAvatar")),")"),(0,o.kt)("p",null,"The user's avatar images"),(0,o.kt)("h4",{id:"bannerimage-string"},(0,o.kt)("inlineCode",{parentName:"h4"},"bannerImage")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String")),")"),(0,o.kt)("p",null,"The user's banner images"),(0,o.kt)("h4",{id:"isfollowing-boolean"},(0,o.kt)("inlineCode",{parentName:"h4"},"isFollowing")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/boolean"},(0,o.kt)("inlineCode",{parentName:"a"},"Boolean")),")"),(0,o.kt)("p",null,"If the authenticated user if following this user"),(0,o.kt)("h4",{id:"isfollower-boolean"},(0,o.kt)("inlineCode",{parentName:"h4"},"isFollower")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/boolean"},(0,o.kt)("inlineCode",{parentName:"a"},"Boolean")),")"),(0,o.kt)("p",null,"If this user if following the authenticated user"),(0,o.kt)("h4",{id:"isblocked-boolean"},(0,o.kt)("inlineCode",{parentName:"h4"},"isBlocked")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/boolean"},(0,o.kt)("inlineCode",{parentName:"a"},"Boolean")),")"),(0,o.kt)("p",null,"If the user is blocked by the authenticated user"),(0,o.kt)("h4",{id:"bans-json"},(0,o.kt)("inlineCode",{parentName:"h4"},"bans")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/json"},(0,o.kt)("inlineCode",{parentName:"a"},"Json")),")"),(0,o.kt)("h4",{id:"options-useroptions"},(0,o.kt)("inlineCode",{parentName:"h4"},"options")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/objects/user-options"},(0,o.kt)("inlineCode",{parentName:"a"},"UserOptions")),")"),(0,o.kt)("p",null,"The user's general options"),(0,o.kt)("h4",{id:"medialistoptions-medialistoptions"},(0,o.kt)("inlineCode",{parentName:"h4"},"mediaListOptions")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/objects/media-list-options"},(0,o.kt)("inlineCode",{parentName:"a"},"MediaListOptions")),")"),(0,o.kt)("p",null,"The user's media list options"),(0,o.kt)("h4",{id:"favourites-favourites"},(0,o.kt)("inlineCode",{parentName:"h4"},"favourites")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/objects/favourites"},(0,o.kt)("inlineCode",{parentName:"a"},"Favourites")),")"),(0,o.kt)("p",null,"The users favourites"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("h5",{parentName:"li",id:"page-int"},(0,o.kt)("inlineCode",{parentName:"h5"},"page")," (",(0,o.kt)("a",{parentName:"h5",href:"/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int")),")"))),(0,o.kt)("p",null,"Deprecated. Use page arguments on each favourite field instead."),(0,o.kt)("h4",{id:"statistics-userstatistictypes"},(0,o.kt)("inlineCode",{parentName:"h4"},"statistics")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/objects/user-statistic-types"},(0,o.kt)("inlineCode",{parentName:"a"},"UserStatisticTypes")),")"),(0,o.kt)("p",null,"The users anime & manga list statistics"),(0,o.kt)("h4",{id:"unreadnotificationcount-int"},(0,o.kt)("inlineCode",{parentName:"h4"},"unreadNotificationCount")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int")),")"),(0,o.kt)("p",null,"The number of unread notifications the user has"),(0,o.kt)("h4",{id:"siteurl-string"},(0,o.kt)("inlineCode",{parentName:"h4"},"siteUrl")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String")),")"),(0,o.kt)("p",null,"The url for the user page on the AniList website"),(0,o.kt)("h4",{id:"donatortier-int"},(0,o.kt)("inlineCode",{parentName:"h4"},"donatorTier")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int")),")"),(0,o.kt)("p",null,"The donation tier of the user"),(0,o.kt)("h4",{id:"donatorbadge-string"},(0,o.kt)("inlineCode",{parentName:"h4"},"donatorBadge")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String")),")"),(0,o.kt)("p",null,"Custom donation badge text"),(0,o.kt)("h4",{id:"moderatorroles-modrole"},(0,o.kt)("inlineCode",{parentName:"h4"},"moderatorRoles")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/enums/mod-role"},(0,o.kt)("inlineCode",{parentName:"a"},"ModRole")),")"),(0,o.kt)("p",null,"The user's moderator roles if they are a site moderator"),(0,o.kt)("h4",{id:"createdat-int"},(0,o.kt)("inlineCode",{parentName:"h4"},"createdAt")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int")),")"),(0,o.kt)("p",null,"When the user's account was created. (Does not exist for accounts created before 2020)"),(0,o.kt)("h4",{id:"updatedat-int"},(0,o.kt)("inlineCode",{parentName:"h4"},"updatedAt")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/int"},(0,o.kt)("inlineCode",{parentName:"a"},"Int")),")"),(0,o.kt)("p",null,"When the user's data was last updated"),(0,o.kt)("h4",{id:"stats-userstats"},(0,o.kt)("inlineCode",{parentName:"h4"},"stats")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/objects/user-stats"},(0,o.kt)("inlineCode",{parentName:"a"},"UserStats")),")"),(0,o.kt)("p",null,"The user's statistics"),(0,o.kt)("h4",{id:"moderatorstatus-string"},(0,o.kt)("inlineCode",{parentName:"h4"},"moderatorStatus")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/scalars/string"},(0,o.kt)("inlineCode",{parentName:"a"},"String")),")"),(0,o.kt)("p",null,"If the user is a moderator or data moderator"),(0,o.kt)("h4",{id:"previousnames-userpreviousname"},(0,o.kt)("inlineCode",{parentName:"h4"},"previousNames")," (",(0,o.kt)("a",{parentName:"h4",href:"/schema/objects/user-previous-name"},(0,o.kt)("inlineCode",{parentName:"a"},"UserPreviousName")),")"),(0,o.kt)("p",null,"The user's previously used names."))}m.isMDXComponent=!0}}]);