Skip to content

Commit

Permalink
fixup! Replaced deprecated resolver expression function usage
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Dec 30, 2024
1 parent 05215d9 commit d8fbefd
Show file tree
Hide file tree
Showing 22 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/default_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ parameters:
input_type: ImageFieldInput
ezimageasset:
value_type: ImageFieldValue
value_resolver: 'query("DomainImageAssetFieldValue", [field])'
value_resolver: 'query("DomainImageAssetFieldValue", field)'
ezinteger:
definition_type: IntegerFieldDefinition
value_type: Int
Expand Down
16 changes: 8 additions & 8 deletions src/bundle/Resources/config/graphql/Content.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ Content:
contentType:
type: "ContentType"
description: "The content type of the Content item."
resolve: "@=query('ContentTypeById', [value.contentTypeId])"
resolve: "@=query('ContentTypeById', value.contentTypeId)"
name:
type: "String"
description: "The computed name (via name schema) in the main language of the Content item."
section:
type: "Section"
description: "The section to which the Content object is assigned."
resolve: "@=query('SectionById', [value.sectionId])"
resolve: "@=query('SectionById', value.sectionId)"
currentVersionNo:
type: "Int"
description: "Version number of the published version, or 1 for a newly created draft."
currentVersion:
type: "Version"
description: "The currently published version"
resolve: "@=query('CurrentVersion', [value])"
resolve: "@=query('CurrentVersion', value)"
versions:
type: "[Version]"
description: "All content versions."
resolve: "@=query('ContentVersions', [value.id])"
resolve: "@=query('ContentVersions', value.id)"
published:
type: "Boolean"
description: "If the Content item has a published version."
Expand All @@ -40,7 +40,7 @@ Content:
owner:
type: "User"
description: "The owner user of the Content object"
resolve: "@=query('UserById', [value.ownerId])"
resolve: "@=query('UserById', value.ownerId)"
modificationDate:
type: DateTime
description: "Date the Content item was last modified on."
Expand All @@ -62,15 +62,15 @@ Content:
mainLocation:
type: "Location"
description: "Content item's main location."
resolve: "@=query('LocationById', [value.mainLocationId])"
resolve: "@=query('LocationById', value.mainLocationId)"
locations:
type: "[Location]"
description: "All the locations of the Content item"
resolve: "@=query('LocationsByContentId', [value.id])"
resolve: "@=query('LocationsByContentId', value.id)"
relations:
type: "[ContentRelation]"
description: "Relations from this Content"
resolve: "@=query('ContentRelations', [value])"
resolve: "@=query('ContentRelations', value)"
reverseRelations:
type: "[ContentRelation]"
description: "Relations to this Content"
Expand Down
8 changes: 4 additions & 4 deletions src/bundle/Resources/config/graphql/ContentType.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ ContentType:
creator:
type: "User"
description: "The user who created this content type."
resolve: "@=query('UserById', [value.creatorId])"
resolve: "@=query('UserById', value.creatorId)"
modifierId:
type: "Int"
description: "The user id of the user which has last modified this content type"
modifier:
type: "User"
description: "The user which has last modified this content type"
resolve: "@=query('UserById', [value.modifierId])"
resolve: "@=query('UserById', value.modifierId)"
remoteId:
type: "String"
description: "A global unique id of the content type."
Expand Down Expand Up @@ -99,12 +99,12 @@ ContentTypeGroup:
type: "Int"
creator:
type: "User"
resolve: "@=query('UserById', [value.creatorId])"
resolve: "@=query('UserById', value.creatorId)"
modifierId:
type: "Int"
modifier:
type: "User"
resolve: "@=query('UserById', [value.modifierId])"
resolve: "@=query('UserById', value.modifierId)"
contentTypes:
type: "[ContentType]"
resolve: "@=query('ContentTypesFromGroup', {'groupId': value.id})"
Expand Down
10 changes: 5 additions & 5 deletions src/bundle/Resources/config/graphql/DomainContent.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DomainContent:
type: String
_thumbnail:
type: Thumbnail
resolveType: "@=query('DomainContentType', [value])"
resolveType: "@=query('DomainContentType', value)"

AbstractDomainContent:
type: "object"
Expand All @@ -44,7 +44,7 @@ AbstractDomainContent:
_type:
description: "The item's content type"
type: ContentType
resolve: '@=query("ContentTypeById", [value.contentInfo.contentTypeId])'
resolve: '@=query("ContentTypeById", value.contentInfo.contentTypeId)'
_content:
description: 'Underlying content info item'
type: Content
Expand All @@ -57,19 +57,19 @@ AbstractDomainContent:
_location:
description: 'Main location'
type: Location
resolve: '@=query("LocationById", [value.contentInfo.mainLocationId])'
resolve: '@=query("LocationById", value.contentInfo.mainLocationId)'
_allLocations:
description: 'All the locations'
type: '[Location]'
resolve: '@=query("LocationsByContentId", [value.contentInfo.id])'
resolve: '@=query("LocationsByContentId", value.contentInfo.id)'
_name:
description: "The content item's name, in the prioritized language(s), based on the object name pattern"
type: String
resolve: "@=value.getName()"
_url:
description: "The content item's url alias, based on the main location."
type: String
resolve: "@=query('MainUrlAlias', [value])"
resolve: "@=query('MainUrlAlias', value)"
_thumbnail:
type: Thumbnail
resolve: "@=query('Thumbnail', value.getThumbnail())"
Expand Down
12 changes: 6 additions & 6 deletions src/bundle/Resources/config/graphql/Field.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ ImageFieldValue:
identifier:
type: "[ImageVariationIdentifier]!"
description: "One or more variation identifiers."
resolve: "@=query('ImageVariations', [value.value, args])"
resolve: "@=query('ImageVariations', value.value, args)"
variation:
type: ImageVariation
args:
identifier:
type: ImageVariationIdentifier!
description: "A variation identifier."
resolve: "@=query('ImageVariation', [value.value, args])"
resolve: "@=query('ImageVariation', value.value, args)"

ImageAdditionalData:
type: object
Expand Down Expand Up @@ -139,7 +139,7 @@ DateFieldValue:
formatted:
type: "String"
description: "Formatted date"
resolve: "@=query('DateTimeFormat', [args['format'], value.value])"
resolve: "@=query('DateTimeFormat', args['format'], value.value)"
args:
format:
type: String
Expand Down Expand Up @@ -248,15 +248,15 @@ RichTextFieldValue:
plaintext:
type: "String"
description: "Plain text representation of the value, without tags. Warning: the text representation may not be perfect."
resolve: "@=query('RichTextXmlToPlainText', [value.xml])"
resolve: "@=query('RichTextXmlToPlainText', value.xml)"
html5:
type: "String"
description: "HTML5 representation."
resolve: "@=query('RichTextXmlToHtml5', [value.xml])"
resolve: "@=query('RichTextXmlToHtml5', value.xml)"
html5_edit:
type: "String"
description: "Editable HTML5 representation."
resolve: "@=query('RichTextXmlToHtml5Edit', [value.xml])"
resolve: "@=query('RichTextXmlToHtml5Edit', value.xml)"

SelectionFieldValue:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ SelectionFieldDefinitionSettings:
type: Boolean
options:
type: "[SelectionFieldDefinitionOption]"
resolve: "@=query('SelectionFieldDefinitionOptions', [value['options']])"
resolve: "@=query('SelectionFieldDefinitionOptions', value['options'])"

SelectionFieldDefinitionOption:
type: object
Expand Down
8 changes: 4 additions & 4 deletions src/bundle/Resources/config/graphql/Item.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Item:
type: String
_thumbnail:
type: Thumbnail
resolveType: "@=query('ItemType', [value])"
resolveType: "@=query('ItemType', value)"

AbstractItem:
type: "object"
Expand All @@ -37,7 +37,7 @@ AbstractItem:
_type:
description: "The item's content type"
type: ContentType
resolve: '@=query("ContentTypeById", [value.getContentInfo().contentTypeId])'
resolve: '@=query("ContentTypeById", value.getContentInfo().contentTypeId)'
_contentInfo:
description: 'Underlying content info item'
type: Content
Expand All @@ -49,15 +49,15 @@ AbstractItem:
_allLocations:
description: 'All the locations'
type: '[Location]'
resolve: '@=query("LocationsByContentId", [value.getContentInfo().id])'
resolve: '@=query("LocationsByContentId", value.getContentInfo().id)'
_name:
description: "The content item's name, in the prioritized language(s), based on the object name pattern"
type: String
resolve: "@=value.getContent().getName()"
_url:
description: "The content item's url alias, based on the main location."
type: String
resolve: "@=query('ItemUrlAlias', [value])"
resolve: "@=query('ItemUrlAlias', value)"
_thumbnail:
type: Thumbnail
resolve: "@=query('Thumbnail', value.getContent().getThumbnail())"
Expand Down
8 changes: 4 additions & 4 deletions src/bundle/Resources/config/graphql/Location.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Location:
parentLocation:
type: "Location"
description: "The parent location"
resolve: "@=query('LocationById', [value.parentLocationId])"
resolve: "@=query('LocationById', value.parentLocationId)"
pathString:
type: "String"
description: "The path to the Location in the Tree."
Expand All @@ -39,7 +39,7 @@ Location:
description: "Depth location has in the location tree"
children:
type: "LocationConnection"
resolve: "@=query('LocationChildren', [{locationId: value.id}, args])"
resolve: "@=query('LocationChildren', {locationId: value.id}, args)"
argsBuilder: 'Relay::Connection'
args:
sortBy: { type: '[LocationSortByOptions]', description: 'A sort clause, or array of clauses. Add _desc after a clause to reverse it' }
Expand All @@ -48,13 +48,13 @@ Location:
args:
custom:
type: "Boolean"
resolve: "@=query('LocationUrlAliases', [value, args])"
resolve: "@=query('LocationUrlAliases', value, args)"
contentInfo:
type: Content
resolve: "@=value.getContentInfo()"
content:
type: DomainContent
resolve: "@=query('DomainContentItem', [{id: value.contentId}, null])"
resolve: "@=query('DomainContentItem', {id: value.contentId}, null)"

LocationSortByOptions:
type: enum
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/graphql/Node.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
Node:
type: relay-node
config:
resolveType: '@=query("node_type", [value])'
resolveType: '@=query("node_type", value)'
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ObjectStateGroup:
states:
type: "[ObjectState]"
description: "List of ObjectStates under ObjectStateGroup."
resolve: "@=query('ObjectStatesByGroup', [value])"
resolve: "@=query('ObjectStatesByGroup', value)"
4 changes: 2 additions & 2 deletions src/bundle/Resources/config/graphql/Platform.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Platform:
builder: Relay::Node
builderConfig:
nodeInterfaceType: Node
idFetcher: '@=query("node", [value])'
idFetcher: '@=query("node", value)'
item:
description: "An item, whatever its type"
type: Item
argsBuilder: "Item"
resolve: "@=query('Item', [args])"
resolve: "@=query('Item', args)"
12 changes: 6 additions & 6 deletions src/bundle/Resources/config/graphql/Repository.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Repository:
urlAlias:
description: "A location url alias: 'path/to/content-item'"
type: "String"
resolve: "@=query('Location', [args])"
resolve: "@=query('Location', args)"
contentType:
type: "ContentType"
args:
Expand All @@ -25,15 +25,15 @@ Repository:
identifier:
description: "Resolves using the unique ContentType identifier."
type: "String"
resolve: "@=query('ContentType', [args])"
resolve: "@=query('ContentType', args)"
contentTypes:
type: "[ContentType]"
args:
groupId:
type: "String"
groupIdentifier:
type: "String"
resolve: "@=query('ContentTypesFromGroup', [args])"
resolve: "@=query('ContentTypesFromGroup', args)"

#
# Object States
Expand All @@ -46,7 +46,7 @@ Repository:
id:
type: "Int"
description: "ID of the Object State Group"
resolve: "@=query('ObjectStateGroupById', [args])"
resolve: "@=query('ObjectStateGroupById', args)"

objectStateGroups:
type: '[ObjectStateGroup]'
Expand All @@ -60,7 +60,7 @@ Repository:
id:
type: "Int"
description: "ID of the Object State"
resolve: "@=query('ObjectStateById', [args])"
resolve: "@=query('ObjectStateById', args)"

objectStates:
type: '[ObjectState]'
Expand All @@ -69,4 +69,4 @@ Repository:
groupId:
type: "Int"
description: "ID of the ObjectStateGroup"
resolve: "@=query('ObjectStatesByGroupId', [args])"
resolve: "@=query('ObjectStatesByGroupId', args)"
4 changes: 2 additions & 2 deletions src/bundle/Resources/config/graphql/UrlAlias.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ UrlAlias:
type: "Boolean"
forward:
type: "Boolean"
resolveType: "@=query('UrlAliasType', [value])"
resolveType: "@=query('UrlAliasType', value)"

LocationUrlAlias:
type: object
Expand All @@ -43,7 +43,7 @@ LocationUrlAlias:
type: "Boolean"
location:
type: "Location"
resolve: "@=query('LocationById', [value.destination])"
resolve: "@=query('LocationById', value.destination)"
interfaces: [UrlAlias]

ResourceUrlAlias:
Expand Down
8 changes: 4 additions & 4 deletions src/bundle/Resources/config/graphql/User.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ User:
type: "Int"
groups:
type: "[UserGroup]"
resolve: "@=query('UserGroupsByUserId', [value.id])"
resolve: "@=query('UserGroupsByUserId', value.id)"
thumbnail:
type: Thumbnail
resolve: "@=query('Thumbnail', value.getThumbnail())"
Expand All @@ -47,10 +47,10 @@ UserGroup:
resolve: "@=value.versionInfo"
parentGroup:
type: "UserGroup"
resolve: "@=query('UserGroupById', [value.parentId])"
resolve: "@=query('UserGroupById', value.parentId)"
subGroups:
type: "[UserGroup]"
resolve: "@=query('UserGroupSubGroups', [value])"
resolve: "@=query('UserGroupSubGroups', value)"
users:
type: "[User]"
resolve: "@=query('UsersOfGroup', [value])"
resolve: "@=query('UsersOfGroup', value)"
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/graphql/Version.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Version:
type: "Int"
creator:
type: "User"
resolve: "@=query('UserById', [value.creatorId])"
resolve: "@=query('UserById', value.creatorId)"
status:
type: "Int"
initialLanguageCode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function mapToFieldValueResolver(FieldDefinition $fieldDefinition): ?stri

$isMultiple = $this->isMultiple($fieldDefinition) ? 'true' : 'false';

return sprintf('@=query("RelationFieldValue", [field, %s])', $isMultiple);
return sprintf('@=query("RelationFieldValue", field, %s)', $isMultiple);
}

protected function canMap(FieldDefinition $fieldDefinition)
Expand Down
Loading

0 comments on commit d8fbefd

Please sign in to comment.