---
# System prepended metadata

title: API Extensions - Titles

---

# API Extensions - Titles

### Create

**Questions**:

Q: Is there a limit to how many pairs of `fields-locale` I can have in `metadata`?
A: Probably, test if time

Q: Or how many entity fields in `fields`?
A: Same as above

**Scenarios**:

For `"name"`:
- [x] Remove `name` from query
    - error: `"notNull Violation: title.slug cannot be null,\nnotNull Violation: title.name cannot be null"`
- [x] Pass empty string: `"name": "",`
    - error: `"notNull Violation: title.slug cannot be null"`
- [x] Pass nothing: `"name": ,`
    - `Bad Request`
- [x] Pass null: `"name": null,`
    - error: `"notNull Violation: title.slug cannot be null,\nnotNull Violation: title.name cannot be null"`
- [x] Pass an invalid value: `"name": invalidValue` (no quotes)
    - `Bad Request`
- [x] Pass a valid name 

For `"entityTypeName"`:
- [x] Remove `entityTypeName` from query
    - error: `"Entity Type not found for name: undefined and organization: c8b2d689-90b5-4a81-8dfc-5ae0aff74f1e"` (same behavior on old mutation)
- [x] Pass empty string: `"entityTypeName": "",`
    - error: `"Entity Type not found for name:  and organization: c8b2d689-90b5-4a81-8dfc-5ae0aff74f1e"`
- [x] Pass nothing: `"entityTypeName":,`
    - `Bad Request`
- [x] Pass null: `"entityTypeName": null,`
    - error: `"Entity Type not found for name: null and organization: c8b2d689-90b5-4a81-8dfc-5ae0aff74f1e"`
- [x] Pass an invalid value: `"entityTypeName": invalidValue` (no quotes)
    - `Bad Request`
- [x] Pass an `entityTypeName` that doesn't exist: `"entityTypeName": "thisDoesntExist",`
    - error: `"Entity Type not found for name: thisDoesntExist and organization: c8b2d689-90b5-4a81-8dfc-5ae0aff74f1e"`
- [x] Pass valid name 

For `"metadata"`:
- [x] Remove metadata from querry
    - no error, creates title, but doesn't add metadata info
- [x] Pass empty array: `"metadata" : [],`
    - - no error, creates title, but doesn't add metadata info
- [x] Pass nothing: `"metadata" : ,`
    - `Bad Request`
- [x] Pass empty object instead of array: `"metadata" : {},`
    - error: `"metadataInput.fields is not iterable"`
- [x] Pass valid fields but as object instead of array:
```
"metadata": {
            "fields": [
                {
                    "name": "Number",
                    "value": "44"
                },
                {
                    "name": "String",
                    "value": "Test"
                }
            ],
            "locale": "en-US"
        }
```

- if only one `fields` object is passed, then no errors, title is created and metadata values are set. But if at least two `fields` objects are passed then it's a `Bad Request`
- [x] Remove `fields` completely, but keep `locale`
    - error: `"metadataInput.fields is not iterable"`
- [x] Pass a metadata field in a different case: ex `"name": "number"` (instead of Number)
    - no error, creates title, but doesn’t add the metadata info with the bad name. if other valid field names are passed, those get filled in.
- [x] Pass a metadata field that doesn't exist (ex: `"name": "Episode"` which doesn't exist on the entity type)
    - no error, creates title, but doesn’t add the metadata info with the bad name. if other valid field names are passed, those get filled in.
- [x] Pass a metadata field without "name" (just value):
```
"fields": [
            {
                "value": "44"
            }
        ],
```
- error: `"Variable \"$input\" got invalid value { value: \"44\" } at \"input.metadata[0].fields[0]\"; Field name of required type String! was not provided."`
- [x] Pass a metadata field without "value" (just name - see above)
    - no error, creates title, but doesn’t add the metadata info for the missing value. if other valid values are passed, those get filled in.
- [x] Pass metadata without locale (remove completely)
    - the locale won't be created on the title so no localisable fields will be filled in either. global fields will be updated regardless.
- [x] Pass a locale set to empty string: `"locale": ""`
    - the locale won't be created on the title so no localisable fields will be filled in either. global fields will be updated regardless.
- [x] Pass a locale that doesn't exist: `"locale": "thisDoesntExist"`
    - same as above
- [ ] Pass a valid locale that's not enabled in org setting
    - creates the locale anyway and fills in requested fields
- [x] Pass a custom locale
    - creates correct locale on title and fills in fields
- [x] Pass a valid locale that's enabled in org setting
- [x] Pass valid fields for all the available field types and multiple locale (2-3 are reasonable)


For `"parentMetadataLookup"`:

- [x] Remove `parentMetadataLookup` from query
- [x] Pass empty object:  `"parentMetadataLookup": {}` - 2 errors:
    - `"Variable \"$input\" got invalid value {} at \"input.parentMetadataLookup\"; Field entityTypeName of required type String! was not provided."` 
    - `"Variable \"$input\" got invalid value {} at \"input.parentMetadataLookup\"; Field lookupField of required type FieldValueInput! was not provided."`
- [x] Pass empty array instead of object:  `"parentMetadataLookup": []`
    - same 2 errors as above
- [x] Pass nothing: ` "parentMetadataLookup": `
    - `Bad Request`
- [x] Pass valid fields but as array: 
```
"parentMetadataLookup": [{
            "entityTypeName": "api_extension_entity_parent",
            "lookupField": {
                "name": "Array",
                "value": "22, 99"
            }
        }]
```
 3 errors:
    - `"Variable \"$input\" got invalid value [{ entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] }] at \"input.parentMetadataLookup\"; Field entityTypeName of required type String! was not provided."`
    - `"Variable \"$input\" got invalid value [{ entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] }] at \"input.parentMetadataLookup\"; Field lookupField of required type FieldValueInput! was not provided."`
    - `"Variable \"$input\" got invalid value [{ entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] }] at \"input.parentMetadataLookup\"; Field \"0\" is not defined by type MetadataLookupInput."`
- [x] Remove `entityTypeName` but keep `lookupField`
    - error: `"Variable \"$input\" got invalid value { lookupField: { name: \"String\", value: \"hello\" } } at \"input.parentMetadataLookup\"; Field entityTypeName of required type String! was not provided."`
- [x] Remove `lookupField` but keep `entityTypeName`
    - error: `"Variable \"$input\" got invalid value { entityTypeName: \"api_extension_entity_parent\" } at \"input.parentMetadataLookup\"; Field lookupField of required type FieldValueInput! was not provided."`
- [x] Pass empty string for `entityTypeName` 
    - error: `"No candidate entities found for key: ,String,hello"`
- [x] Pass an entity type name that doesn't exist: `"entityTypeName": "thisDoesntExist",`
    - error: `"No candidate entities found for key: thisDoesntExist,String,hello"`
- [x] Pass nothing for `entityTypeName`: `"entityTypeName":,`
    - `Bad Request`
- [x] Pass an invalid value for `entityTypeName` : `"entityTypeName": invalidValue,`
    - `Bad Request`
- [x] Pass null for `entityTypeName`: `"entityTypeName": null,`
    - error: `"Variable \"$input\" got invalid value null at \"input.parentMetadataLookup.entityTypeName\"; Expected non-nullable type String! not to be null."`
- [x] Pass a valid name for `entityTypeName`

For `"lookupField"`:

- [x] Pass empty: `"lookupField": {}`
    - error: `"Variable \"$input\" got invalid value {} at \"input.parentMetadataLookup.lookupField\"; Field name of required type String! was not provided."`
- [x] Pass nothing: `"lookupField":`
    - `'Bad request'`
- [x] Pass a field name that doesn't exist in the entity type:
```
"lookupField": {
        "name": "This Field Doesn't Exist",
        "value": "555"
}
```

- error: `"No candidate entities found for key: api_extension_entity_parent,This Field Doesn't Exist,hello"`
    
- [x] Pass a value that doesn't match the field type:
```
"lookupField": {
        "name": "Number",
        "value": "999, 333, 12"
}
```
- error: `"No candidate entities found for key: api_extension_entity_parent,Array,hello"`

- [x] Pass the correct name of a field but in a different case:
```
"lookupField": {
        "name": "number", // instead of "Number"
        "value": "55"
}
```
- error: `"No candidate entities found for key: api_extension_entity_parent,string,hello"`
 
- [x] Pass `"lookupField"` without `"name"`
```
"lookupField": {
        "value": "55"
}
```

- error: `"Variable \"$input\" got invalid value { value: \"hello\" } at \"input.parentMetadataLookup.lookupField\"; Field name of required type String! was not provided."`

- [x] Pass `"lookupField"` without `"value"`
```
"lookupField": {
        "name": "number",
}
```

- error: `"No candidate entities found for key: api_extension_entity_parent,String,undefined"`
 
- [x] Pass valid values

**Big picture scenarios:**
- [x] Create a title and fill in all the basic entity type fields
- [x] Create a title with 3 locales and fill some/all metadata fields
- [x] Create a title and set a parent

_______________

### Read

**Questions**:

Q: Is it possible to have an array of titles returned?
A: Yes. The querry returns all the titles that match the request.

Q: If so, what is the limit of titles returned?
A: Test if time

**Scenarios**:

For `"entityTypeName"`:
- [x] Remove `entityTypeName` from query
    - error: `"Variable \"$metadataLookup\" got invalid value { lookupField: { name: \"String\", value: \"Test\" } }; Field entityTypeName of required type String! was not provided."`
- [ ] Pass empty string: `"entityTypeName": "",`
    - returns empty array: `"data": { "titleByMetadata": [] }`
    - [CD-10802](https://ateliere.atlassian.net/browse/CD-10802)
- [x] Pass nothing: `"entityTypeName":,`
    - `'Bad request'`
- [x] Pass null: `"entityTypeName": null,`
    - error: `"Variable \"$metadataLookup\" got invalid value null at \"metadataLookup.entityTypeName\"; Expected non-nullable type String! not to be null."`
- [x] Pass an invalid value: `"entityTypeName": invalidValue` (no quotes)
    - `'Bad request'`
- [x] Pass an `entityTypeName` that doesn't exist: `"entityTypeName": "thisDoesntExist",`
    - returns empty array: `"data": { "titleByMetadata": [] }`
- [x] Pass valid name
    - returns array of found titles 

For `"lookupField"`:

- [x] Pass empty: `"lookupField": {}`
    - error: `"Variable \"$metadataLookup\" got invalid value {} at \"metadataLookup.lookupField\"; Field name of required type String! was not provided."`
- [x] Pass nothing: `"lookupField":`
    - `'Bad request'`
- [x] Pass a field name that doesn't exist in the entity type:
```
"lookupField": {
        "name": "This Field Doesn't Exist",
        "value": "555"
}
```

- returns empty array: `"data": { "titleByMetadata": [] }`
    
- [x] Pass a value that doesn't match the field type:
```
"lookupField": {
        "name": "Number",
        "value": "999, 333, 12"
}
```

- returns empty array: `"data": { "titleByMetadata": [] }`

- [x] Pass the correct name of a field but in a different case:
```
"lookupField": {
        "name": "number", // instead of "Number"
        "value": "55"
}
```

- returns empty array: `"data": { "titleByMetadata": [] }`
 
- [x] Pass `"lookupField"` without `"name"`
```
"lookupField": {
        "value": "55"
}
```

- error: `"Variable \"$metadataLookup\" got invalid value { value: \"Test\" } at \"metadataLookup.lookupField\"; Field name of required type String! was not provided."`

- [x] Pass `"lookupField"` without `"value"`
```
"lookupField": {
        "name": "number",
}
```

- if value is missing or empty string, returns empty array - bug? No, @Nick confirmed it's a schema decision.
 
- [x] Pass valid values

**Big picture scenarios:**
- [x] Have multiple titles that match the query and make sure all of them are returned (checked with max 28 results)
- [x] Test single title can be returned
- [x] No titles are returned when none match the query

_______________

### Update

**Questions:**
Q: What is `unset` used for here?
A: Removes values from the given metadata field(s)

**Scenarios:**

For `titleMetadataLookup`:
- [x] Remove `titleMetadataLookup` from query
    - error: `"Variable \"$titleMetadataLookup\" of required type \"MetadataLookupInput!\" was not provided."`
- [x] Pass empty object:  `"titleMetadataLookup": {}`
    - error: `"Variable \"$titleMetadataLookup\" got invalid value {}; Field entityTypeName of required type String! was not provided."`
    - error: `"Variable \"$titleMetadataLookup\" got invalid value {}; Field lookupField of required type FieldValueInput! was not provided."`
- [x] Pass nothing: ` "titleMetadataLookup": `
    - `Bad Request`
- [x] Pass empty array instead of object:  `"titleMetadataLookup": []`
     - error: `"Variable \"$titleMetadataLookup\" got invalid value {}; Field entityTypeName of required type String! was not provided."`
    - error: `"Variable \"$titleMetadataLookup\" got invalid value {}; Field lookupField of required type FieldValueInput! was not provided."`
- [x] Pass valid fields but as array: 
```
"titleMetadataLookup": [{
            "entityTypeName": "api_extension_entity",
            "lookupField": {
                "name": "Number",
                "value": "555"
            }
        }]
```

- error: `"Variable \"$titleMetadataLookup\" got invalid value [{ entityTypeName: \"api_extension_entity\", lookupField: [Object] }]; Field entityTypeName of required type String! was not provided."`
- error: `"Variable \"$titleMetadataLookup\" got invalid value [{ entityTypeName: \"api_extension_entity\", lookupField: [Object] }]; Field lookupField of required type FieldValueInput! was not provided."`
- error: `"Variable \"$titleMetadataLookup\" got invalid value [{ entityTypeName: \"api_extension_entity\", lookupField: [Object] }]; Field \"0\" is not defined by type MetadataLookupInput."`
- [x] Remove `entityTypeName` but keep `lookupField`
    - error: `"Variable \"$titleMetadataLookup\" got invalid value { lookupField: { name: \"String\", value: \"Test\" } }; Field entityTypeName of required type String! was not provided."`
- [x] Remove `lookupField` but keep `entityTypeName`
    - error: `"Variable \"$titleMetadataLookup\" got invalid value { entityTypeName: \"api_extension_entity\" }; Field lookupField of required type FieldValueInput! was not provided."`
- [ ] Pass empty string for `entityTypeName` - [CD-10815](https://ateliere.atlassian.net/browse/CD-10815)
- [ ] Pass an entity type name that doesn't exist: `"entityTypeName": "thisDoesntExist",` - [CD-10815](https://ateliere.atlassian.net/browse/CD-10815)
- [x] Pass nothing for `entityTypeName`: `"entityTypeName":,`
    - `Bad Request`
- [x] Pass an invalid value for `entityTypeName` : `"entityTypeName": invalidValue,`
    - `Bad Request`
- [x] Pass null for `entityTypeName`: `"entityTypeName": null,`
    - error: `"Variable \"$titleMetadataLookup\" got invalid value null at \"titleMetadataLookup.entityTypeName\"; Expected non-nullable type String! not to be null."`
- [x] Pass a valid name for `entityTypeName`
- [x] Pass an empty `lookupField`: `"lookupField": {}`
    - error: `Variable \"$titleMetadataLookup\" got invalid value {} at \"titleMetadataLookup.lookupField\"; Field name of required type String! was not provided."`
- [x] Pass nothing for `lookupField`: `"lookupField":`
    - `Bad Request`
- [ ] Pass a field name that doesn't exist in the entity type: [CD-10815](https://ateliere.atlassian.net/browse/CD-10815)
```
"lookupField": {
        "name": "This Field Doesn't Exist",
        "value": "555"
}
```
- [ ] Pass a value that doesn't match the field type: [CD-10815](https://ateliere.atlassian.net/browse/CD-10815)
```
"lookupField": {
        "name": "Number",
        "value": "999, 333, 12"
}
```
- [ ] Pass the correct name of a field but in a different case: [CD-10815](https://ateliere.atlassian.net/browse/CD-10815)
```
"lookupField": {
        "name": "number", // instead of "Number"
        "value": "999"
}
```

For `input`:
- [x] Remove `input` from query
    - error: `"Variable \"$input\" of required type \"TitleByMetadataInput!\" was not provided."`
- [x] Pass empty object:  `"input": {}`
    - returns all titles that match the `titleMetadataLookup`
- [x] Pass empty array instead of object:  `"input": []`
    - returns all titles that match the `titleMetadataLookup`
- [x] Remove `name` from `input`
    - updates metadata values, doesn't update title name
- [x] Pass `null` for `name`:  `"name": null,`
    - error: `"notNull Violation: title.name cannot be null"`
- [x] Pass an invalid key name instead of `name`: 
    - [x] `"nane": "test",` (misspelled)
        - error: `"Variable \"$input\" got invalid value { nane: \"newTitleName\", entityTypeName: \"api_extension_entity\", metadata: [[Object]], parentMetadataLookup: { entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] } }; Field \"nane\" is not defined by type TitleByMetadataInput. Did you mean name or node?"`
    - [x] `"Name": "test",` (wrong case)
        - error `"Variable \"$input\" got invalid value { Name: \"newTitleName\", entityTypeName: \"api_extension_entity\", metadata: [[Object]], parentMetadataLookup: { entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] } }; Field \"Name\" is not defined by type TitleByMetadataInput. Did you mean name or node?"`
    - [x] `"invalidKey": "test",` (invalid)
        - error: `"Variable \"$input\" got invalid value { invalidKey: \"newTitleName\", entityTypeName: \"api_extension_entity\", metadata: [[Object]], parentMetadataLookup: { entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] } }; Field \"invalidKey\" is not defined by type TitleByMetadataInput."`
- [x] Pass a valid `name` to update the current one:  `"name": "titleName_Update",`
- [x] Remove `entityTypeName` from `input`
    - updates other info, just not the entity type
- [x] Pass `null` for `entityTypeName`:  `"entityTypeName": null,`
    - updates other info, just not the entity type
- [x] Pass an invalid key name instead of `entityTypeName`: 
    - [x] `"entityTYPEName": "test",` (wrong case)
        - error: `"Variable \"$input\" got invalid value { entityTYPEName: \"api_extension_entity\", metadata: [[Object]], parentMetadataLookup: { entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] } }; Field \"entityTYPEName\" is not defined by type TitleByMetadataInput. Did you mean entityTypeName?"`
    - [x] `"invalidKey": "test",` (invalid)
        - error: `"Variable \"$input\" got invalid value { invalidKey: \"api_extension_entity\", metadata: [[Object]], parentMetadataLookup: { entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] } }; Field \"invalidKey\" is not defined by type TitleByMetadataInput."`
- [x] Pass an `entityTypeName` that doesn't exist: `"entityTypeName": "doesntExist",`
    - updates other info, just not the entity type
- [x] Pass a valid `entityTypeName` to update the current one:  `"entityTypeName": "<differentExistingEntityType>",`
- [x] Remove `metadata` from `input`
    - updates other info, just not metadata fields
- [x] Pass an invalid key name (as above)
    - error: `"Variable \"$input\" got invalid value { entityTypeName: \"api_extension_entity\", meta: [[Object]] }; Field \"meta\" is not defined by type TitleByMetadataInput. Did you mean metadata?"`
- [x] Remove `parentMetadataLookup` from `input`
    - updates other info, just not the parent
- [x] Use values that already exist in `input` for all parameters and check if info is duplicated, left as is or validation errors
    - Info is left as is except in one case: if `titleMetadataLookup` matches with multiple titles and a new title `name` is given in `input` then the query returns Validation error because it can't update multiple titles with the same name. Updates just one.
- [x] Pass updated values for all fields in `input` and check that all are updated in the response
- [x] Pass updated values for some fields and check the response

For `unset`:
- [ ] // todo - how to use?

**Big picture scenarios:**
- [ ] Detach a title from its parent - [CD-10801](https://ateliere.atlassian.net/browse/CD-10801)
- [x] Update the File field
- [x] Bulk update multiple titles: metadata fields and entity types
    - OK, checked with 19
- [x] Update a title's parent when 2 titles are a match to be parents
    - error: `"Multiple candidates found for key: api_extension_entity_parent,String,hello"`
_______________

### Delete

**Scenarios:**

Query:
```
mutation deleteTitleByMetadata($titleMetadataLookup:  MetadataLookupInput!){
    deleteTitleByMetadata (titleMetadataLookup: $titleMetadataLookup) {
    	id
    	name
    }
}
 ```
 Variables:
 ```
 
 {
    "titleMetadataLookup": {
        "entityTypeName": "api_extension_entity",
        "lookupField": {
            "name": "String",
            "value": "Test"
        }
    }
}
```
For "entityTypeName":

- [ ] Remove entityTypeName from query 
     - error:`" "message": "Variable \"$titleMetadataLookup\" got invalid value { lookupField: { name: \"String\", value: \"Test\" } }; Field entityTypeName of required type String! was not provided.""`
- [x] Pass empty string: "entityTypeName": "",
     - issue https://ateliere.atlassian.net/browse/CD-10802
- [ ] Pass nothing: "entityTypeName":,
      - Bad Request
- [ ] Pass null: "entityTypeName": null,
    - error: `{
    "errors": [
        {
            "message": "Variable \"$titleMetadataLookup\" got invalid value null at \"titleMetadataLookup.entityTypeName\"; Expected non-nullable type String! not to be null."
        }
    ]
}`
- [ ] Pass an invalid value: "entityTypeName": invalidValue (no quotes)
    -error:Bad Request
- [ ] Pass an entityTypeName that doesn’t exist: "entityTypeName"
    - issue https://ateliere.atlassian.net/browse/CD-10814
- [ ] Pass valid name


For "lookupField":

- [ ] Pass empty: "lookupField": {} 
   - error: `{
    "errors": [
        {
            "message": "Variable \"$titleMetadataLookup\" got invalid value { entityTypeName: \"api_extension_entity\" }; Field lookupField of required type FieldValueInput! was not provided."
        }
    ]
}`
- [ ] Pass nothing: "lookupField":
}`
    - error: {
    "errors": [
        {
            "message": "Variable \"$titleMetadataLookup\" got invalid value {} at \"titleMetadataLookup.lookupField\"; Field name of required type String! was not provided."
        }
    ]
}`

- [ ] Pass a field name that doesn’t exist in the entity type:
- [ ] Pass a value that doesn’t match the field type:
- [ ] Pass the correct name of a field but in a different case:
- [ ] Pass "lookupField" without "name"
- [ ] Pass "lookupField" without "value"
- [ ] Pass valid values


--------------

### Create Hierarchy

**Scenarios:**

For `"parentMetadataLookup"`:

- [x] Remove `parentMetadataLookup` from query
    - `"Variable \"$input\" got invalid value { titleMetadataLookup: { entityTypeName: \"api_extension_entity\", lookupField: [Object] } } at \"input[0]\"; Field parentMetadataLookup of required type MetadataLookupInput! was not provided."`
- [x] Pass empty object: `"parentMetadataLookup": {}`
    - `"Variable \"$input\" got invalid value {} at \"input[0].parentMetadataLookup\"; Field entityTypeName of required type String! was not provided."`
    - `"Variable \"$input\" got invalid value {} at \"input[0].parentMetadataLookup\"; Field lookupField of required type FieldValueInput! was not provided."`
- [x] Pass empty array instead of object:  `"parentMetadataLookup": []`
    - same 2 errors as above with refference to `[]` instead of `{}`
- [x] Pass valid fields but as array: 
```
"parentMetadataLookup": [{
            "entityTypeName": "api_extension_entity_parent",
            "lookupField": {
                "name": "Array",
                "value": "22, 99"
            }
        }]
```
- `"Variable \"$input\" got invalid value [{ entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] }] at \"input[0].parentMetadataLookup\"; Field entityTypeName of required type String! was not provided."`
- `"Variable \"$input\" got invalid value [{ entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] }] at \"input[0].parentMetadataLookup\"; Field lookupField of required type FieldValueInput! was not provided."`
- `"Variable \"$input\" got invalid value [{ entityTypeName: \"api_extension_entity_parent\", lookupField: [Object] }] at \"input[0].parentMetadataLookup\"; Field \"0\" is not defined by type MetadataLookupInput."`
- [x] Remove `entityTypeName` but keep `lookupField`
    - `"Variable \"$input\" got invalid value { lookupField: { name: \"String\", value: \"hello\" } } at \"input[0].parentMetadataLookup\"; Field entityTypeName of required type String! was not provided."`
- [x] Remove `lookupField` but keep `entityTypeName`
    - `"Variable \"$input\" got invalid value { entityTypeName: \"api_extension_entity_parent\" } at \"input[0].parentMetadataLookup\"; Field lookupField of required type FieldValueInput! was not provided."`
- [x] Pass empty string for `entityTypeName` 
    - `"No candidate entities found for key: ,String,hello"`
- [x] Pass an entity type name that doesn't exist: `"entityTypeName": "thisDoesntExist",`
    - `"No candidate entities found for key: thisDoesntExist,String,hello"`
- [x] Pass null for `entityTypeName`: `"entityTypeName": null,`
    - `"Variable \"$input\" got invalid value null at \"input[0].parentMetadataLookup.entityTypeName\"; Expected non-nullable type String! not to be null."`
- [ ] Pass a valid name for `entityTypeName`
    - [CD-10815](https://ateliere.atlassian.net/browse/CD-10815)
- [x] Pass an empty `lookupField`: `"lookupField": {}`
    - `"Variable \"$input\" got invalid value {} at \"input[0].parentMetadataLookup.lookupField\"; Field name of required type String! was not provided."`
- [x] Pass a field name that doesn't exist in the entity type:
```
"lookupField": {
        "name": "This Field Doesn't Exist",
        "value": "555"
}
```
- `"No candidate entities found for key: api_extension_entity_parent,doesntexist,hello"`
 
- [x] Pass a value that doesn't match the field type:
```
"lookupField": {
        "name": "String",
        "value": [22, 44]
}
```
- `"No candidate entities found for key: api_extension_entity_parent,String,22,44"`

- [x] Pass the correct name of a field but in a different case:
```
"lookupField": {
        "name": "number", // instead of "Number"
        "value": "999"
}
```
- `"No candidate entities found for key: api_extension_entity_parent,string,hello"`

- [x] All of the above for `titleMetadataLookup` too

**Big picture scenarios:**
- [x] Set the same parent on multiple titles
    - checked with 19
- [x] Update the parent of a title which already has a different parent
- [x] Update multiple titles with different parents
- [x] Try to create a hierarchy when 2 titles match the parentMetadataLookup
    - error: `"Multiple candidates found for key: api_extension_entity_parent,String,hello" ` 