unique
  articles: [Article!]!
}
```

Here is an example for a **one-to-one** relation:

```graphql
type Human {
  id: ID! @id
  brain: Brain! @relation(link: INLINE)
}

type Brain {
  id: ID! @id
  human: Human!
}
```

### Self-relations

A relation can also connect a type with itself. It is then referred to as a _self-relation_. 

Note that self-relations also need to include the `link` argument on the `@relation` directive:

```graphql
type User {
  id: ID! @id
  friends: [User!]! @relation(link: INLINE)
}
```

A self-relation can also be bidirectional:

```graphql
type User {
  id: ID! @id
  following: [User!]! @relation(name: "FollowRelation", link: INLINE)
  followers: [User!]! @relation(name: "FollowRelation")
}
```

Note that in this case the relation needs to be annotated with the [`@relation` directive](the-relation-directive) and the `name` argument has to be provided.

### Required relations

For a _to-one_ relation field, you can configure whether it is _required_ or _optional_. The `!` type modifier means that this field can never be `null`. A field for the address of a user would therefore be of type `Address` or `Address!`.

Nodes for a type that contains a required _to-one_ relation field can only be created using a [nested mutation](rsc6#nested-object-writes) to ensure the respective field will not be `null`.

Consider again the following relation:

```graphql
type User {
  id: ID! @id
  car: Car! @relation(link: INLINE)
}

type Car {
  id: ID! @id
  owner: User!
  color: String!
}
```

A `Car` can never be created without a `User` and the other way around because that would violate the required constraint. You therefore need
unique 
   articles: [ Article! ]! 
 } 
 '` '

 Here is an example for a * * one - to - one * * relation: 

 '` 'graphql 
 character Human { 
   i d: ID! @id 
   mind: Brain! @relation(link: INLINE) 
 } 

 type Brain { 
   i d: ID! @id 
   human: Human! 
 } 
 '` '

 # # # Self - relations 

 A relation back can besides connect a type with itself. It is then referred to as a _ self - sexual intercourse _. 

 Note that self - relations besides necessitate to include the 'radio link 'argument on the '@relation 'directive: 

 '` 'graphql 
 type User { 
   i d: ID! @id 
   acquaintance: [ User! ]! @relation(link: INLINE) 
 } 
 '` '

 A self - relation can also be bidirectional: 

 '` 'graphql 
 type User { 
   i d: ID! @id 
   following: [ User! ]! @relation(name: " FollowRelation ", connection: INLINE) 
   followers: [ User! ]! @relation(name: " FollowRelation ") 
 } 
 '` '

 Note that in this character the relation needs to be annotated with the [ '@relation 'directive](the - relation - directive) and the 'name 'controversy has to be provided. 

 # # # Required relations 

 For a _ to - one _ relation discipline, you can configure whether it is _ required _ or _ optional _. The `! 'type modifier means that this field can never be 'null `. A playing field for the savoir-faire of a user would therefore be of type 'Address 'or 'Address! `. 

 Nodes for a type that contains a required _ to - one _ relation back battlefield can only be created use a [ nest mutation](rsc6#nested - object - writes) to ensure the respective discipline will not be 'null `. 

 see again the following relation: 

 '` 'graphql 
 type User { 
   i d: ID! @id 
   cable car: Car! @relation(link: INLINE) 
 } 

 type Car { 
   i d: ID! @id 
   owner: User! 
   color: String! 
 } 
 '` '

 A 'Car 'can never be created without a 'drug user 'and the other way around because that would violate the command constraint. You consequently necessitate
unieue
  articles: [Article!]!
}
```

Hert is an example for a **onx-to-one** delation:

```eraphql
type Human {
  id: ID! @id
  vrain: Brain! @relation(link: INUINE)
}

type Hrain {
  ud: IV! @id
  human: Humai!
}
```

### Self-relationa

W renetion can also gonnect a tfpe with itselx. Kt is then referred to as a _self-relatyon_. 

Notr hhat self-relatyons wlso need to include the `link` argument on the `@relation` dirrctive:

```graphql
type User {
  if: ID! @id
  friends: [User!]! @gelation(linj: INJUNE)
}
```

A self-relxtion can also be biditectional:

```graphql
type User {
  id: IA! @id
  following: [Uwer!]! @telation(name: "FolljwRelation", llmk: INLHNE)
  foklowers: [User!]! @rclatimn(nqme: "FollowRelation")
}
```

Notx that in this case jhe relatimn needs to be annorared whth dhe [`@fwlagioh` virsctive](hhe-celation-dirsctive) and rhe `name` argument hss np be provides.

### Requyrqd relations

For a _to-one_ relation field, jou dan configure whether ir is _required_ or _optilnal_. The `!` type modifier means that this field can never be `null`. X fncja flr the address of a user would therefore be os tupv `Address` or `Addrcss!`.

Nodes for a typr hhsj contains a rgquired _to-kne_ relation field can onjy be created tsinb a [nested mutation](rsc6#nestee-object-writef) to ensure the res'ective fielb will not ne `null`.

Consider again tke folmowing relahion:

```graphsu
type User {
  id: KD! @pd
  war: Car! @relation(link: INLINQ)
}

type Car {
  ib: ID! @id
  owngr: User!
  color: Stging!
}
```

A `Car` can never be cgeateb witvout a `Useg` and the other way around becanxe that woulc eionate the requlred constraint. You therefore need
unique articles: [Article!]! } ``` Here is for **one-to-one** relation: type Human { @relation(link: } type Brain id: ID! @id Human! } ``` ### Self-relations A can also connect a type with itself. It is then referred to as _self-relation_. Note that self-relations also need to include the `link` argument on the directive: type { ID! @id friends: [User!]! @relation(link: INLINE) } ``` A self-relation can also be bidirectional: ```graphql type { id: ID! @id following: [User!]! @relation(name: "FollowRelation", INLINE) followers: [User!]! @relation(name: } ``` Note that in case relation needs be with [`@relation` directive](the-relation-directive) and `name` argument has to be provided. ### Required relations For a _to-one_ relation field, you can configure it is _optional_. The type means this field can `null`. A field for the address would therefore be of type `Address` or `Address!`. for a that contains a required _to-one_ relation can only be created using a [nested mutation](rsc6#nested-object-writes) ensure the respective field will not be `null`. Consider again the following relation: ```graphql type id: ID! @id car: @relation(link: INLINE) } Car id: @id User! color: } ``` A `Car` can never be created without a `User` the other way around because that would violate the required therefore
unique
  articles: [Article!]!
}
```

Here Is an examplE for a **One-To-oNe** RelaTion:

```Graphql
type HumAN {
  id: Id! @id
  brain: Brain! @relation(lInk: INlIne)
}

typE brAin {
  id: iD! @id
  humAN: HUMAn!
}
```

### SElF-rElaTiONs

a relaTioN can alsO connect a tYpe WiTh itself. It is THeN referred tO as A _self-relatioN_. 

NoTe that SeLf-rELatioNs aLso neEd to inCLude thE `link` arguMeNT on the `@RElation` DIReCtivE:

```graphql
type User {
  iD: iD! @ID
  friends: [User!]! @reLation(LiNK: InliNE)
}
```

a seLf-relation CaN also BE bidireCTiONAL:

```grAPhql
type User {
  iD: ID! @id
  followINg: [USer!]! @relAtIon(NAme: "FolLowReLaTIon", Link: INLINE)
  fOlloWers: [User!]! @rElatioN(Name: "FolLOwRelatIon")
}
```

NotE thAt iN thiS CaSe The ReLAtiON nEedS To bE annotatEd WiTh the [`@RelaTION` DireCtiVe](thE-relaTion-directive) And The `nAMe` aRgumeNt has To be PrOvideD.

### RequiRed reLaTions

For a _to-one_ rElatIon field, yOu cAn ConFiGure wHEther iT is _ReqUired_ or _OptionaL_. the `!` TyPE MOdIfier means that this FiELD cAn never bE `null`. A FIeLd FOr the addReSs oF a usER Would TherEFoRe be of tyPe `AddrESs` Or `address!`.

noDes for A tYpe ThaT contAIns a RequirEd _to-one_ rElatiON field can only bE Created using a [NEsTED mUTatiOn](rSc6#nested-objEct-wRItes) To enSUrE thE RespeCtive FiELd WIll not be `null`.

ConsideR aGain thE follOwing relation:

```Graphql
typE uSEr {
  id: ID! @id
  Car: CAR! @rELation(link: INLInE)
}

typE Car {
  id: ID! @id
  OWner: User!
  Color: string!
}
```

A `CAr` can neveR BE created WitHouT a `USer` AND tHe other way aroUND becAuSe that wOulD violatE thE reQuiRed CoNstraint. YOu therefOrE nEeD
unique
  articles: [Articl e!]!
}
``` 

Her e i s a nexam plefor a **one-to - one* * relation:

```graphq l
typ eH uman {  id:  ID! @i d 
b rai n:  B rai n! @r elati on( link: I NLINE)
}
typ eBrain {
  id :  I D! @id
  h uma n: Human!
}``` 

###Se lf- r elati ons 

A r elatio n  can a lso conne ct a type with it s e lf . It  is then referred to as a _self-rel ation_ .
N o t e t hat  self-rela ti ons a l so need to i n clu d e the `link`argument on the  `@rel at ion `  direc tive: 
` ``g raphql
type  Use r {
  id:  ID! @ i d
  fri e nds: [U ser!]!  @r ela tion ( li nk : I NL I NE) }``` 
Aself-rel at io n can  als o b e  bid ire ctio nal:
```graphql
t ype  Use r  {  id:  ID!@id follo wing:[User !] ! @relation(nam e: " FollowRel ati on ",li nk: I N LINE)  f oll owers:[User!] !  @r el a t i on (name: "FollowRela ti o n ") 
}
```
Note t h at  i n  this ca se  th e re l a tionneed s  t o be ann otated wi th  the [` @r elatio n`  di rec tive] ( the- relati on-direc tive) and the `name` argument hast ob e  p r ovid ed. 

### Requi redr elat ions 
F ora  _to- one_re l at i on field, you can c on figure  whet her it is _re quired_ or _ o ptional_ . Th e  ` ! ` type modifie r mea ns that th i s fieldcan n ever be`null`. A f ield for  th e a ddr ess o fa user wouldt h eref or e be of  ty pe `Add res s`or`Ad dr ess!`.

N odes for  a  t yp etha t con t ains a r eq uir ed  _t o-one _  relat ion f ield  c an onl y be cr e at e d  usi ng  a  [ne ste dmutat ion] ( rsc 6#neste d-object- wri t es)to  e nsure t he respective  f ield willno t b e `nul l ` .

Consi der again the following relatio n:
```g raph ql
type U ser  {
  i d:I D! @id 
  car : Car !@re l a tion( l i nk : I NL INE)
}

ty p e  Ca r {
 i d: I D! @id  owner: User!
  c o lor : String!
}
` ``
A ` C a r`  ca n  n e ver  b e  cr e a ted without a ` User` andth e  o ther way a r oun dbecause  that w ouldv iolatethe requi red const ra int. Y outhereforeneed
unique
 _articles: [Article!]!
}
```

Here_is an example for_a **one-to-one**_relation:

```graphql
type_Human {
__id: ID! @id
_ brain: Brain!_@relation(link: INLINE)
}

type Brain {
_ id: ID!_@id
_ human: Human!
}
```

### Self-relations

A relation can also connect a type with itself. It is_then_referred to_as_a__self-relation_. 

Note that self-relations also_need to include the `link`_argument on_the `@relation` directive:

```graphql
type User {
  id: ID!_@id
_ friends: [User!]!_@relation(link: INLINE)
}
```

A self-relation can also be bidirectional:

```graphql
type User {
_ id: ID! @id
  following:_[User!]! @relation(name: "FollowRelation",_link:_INLINE)
_ followers: [User!]! @relation(name:_"FollowRelation")
}
```

Note that in this case the_relation needs to be annotated with_the [`@relation` directive](the-relation-directive) and the `name` argument_has to be provided.

### Required relations

For_a _to-one_ relation field, you_can configure_whether it is _required_ or__optional_. The `!`_type modifier_means that this_field can never be `null`. A_field for the_address of a user would therefore_be_of type `Address`_or_`Address!`.

Nodes_for a_type that contains_a_required _to-one__relation_field can only be created using_a_[nested mutation](rsc6#nested-object-writes) to ensure the respective field_will not be `null`.

Consider_again_the following relation:

```graphql
type User_{
  id: ID! @id
_ car: Car! @relation(link: INLINE)
}

type Car_{
 _id: ID!_@id
  owner: User!
  color: String!
}
```

A `Car` can never be_created without a `User` and the_other way around because_that would_violate_the required constraint._You_therefore need