Skip to content

Commit

Permalink
Replaced deprecated resolver expression function usage
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Dec 28, 2024
1 parent ccfd4dc commit a7c66c1
Show file tree
Hide file tree
Showing 23 changed files with 61 additions and 61 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: 'resolver("DomainImageAssetFieldValue", [field])'
value_resolver: 'query("DomainImageAssetFieldValue", [field])'
ezinteger:
definition_type: IntegerFieldDefinition
value_type: Int
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/graphql/Base.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DateTime:
format:
type: String
description: "Date formatted with a date() format"
resolve: "@=resolver('DateTimeFormat', [value, args])"
resolve: "@=query('DateTimeFormat', [value, args])"
args:
pattern:
type: "String"
Expand Down
20 changes: 10 additions & 10 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: "@=resolver('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: "@=resolver('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: "@=resolver('CurrentVersion', [value])"
resolve: "@=query('CurrentVersion', [value])"
versions:
type: "[Version]"
description: "All content versions."
resolve: "@=resolver('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: "@=resolver('UserById', [value.ownerId])"
resolve: "@=query('UserById', [value.ownerId])"
modificationDate:
type: DateTime
description: "Date the Content item was last modified on."
Expand All @@ -62,23 +62,23 @@ Content:
mainLocation:
type: "Location"
description: "Content item's main location."
resolve: "@=resolver('LocationById', [value.mainLocationId])"
resolve: "@=query('LocationById', [value.mainLocationId])"
locations:
type: "[Location]"
description: "All the locations of the Content item"
resolve: "@=resolver('LocationsByContentId', [value.id])"
resolve: "@=query('LocationsByContentId', [value.id])"
relations:
type: "[ContentRelation]"
description: "Relations from this Content"
resolve: "@=resolver('ContentRelations', [value])"
resolve: "@=query('ContentRelations', [value])"
reverseRelations:
type: "[ContentRelation]"
description: "Relations to this Content"
resolve: "@=resolver('ContentReverseRelations', [value])"
resolve: "@=query('ContentReverseRelations', [value])"
states:
type: "[ObjectState]"
description: "Content States."
resolve: "@=resolver('ObjectStateByContentInfo', [value])"
resolve: "@=query('ObjectStateByContentInfo', [value])"

ContentRelation:
type: "object"
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: "@=resolver('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: "@=resolver('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: "@=resolver('UserById', [value.creatorId])"
resolve: "@=query('UserById', [value.creatorId])"
modifierId:
type: "Int"
modifier:
type: "User"
resolve: "@=resolver('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: "@=resolver('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: '@=resolver("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: '@=resolver("LocationById", [value.contentInfo.mainLocationId])'
resolve: '@=query("LocationById", [value.contentInfo.mainLocationId])'
_allLocations:
description: 'All the locations'
type: '[Location]'
resolve: '@=resolver("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: "@=resolver('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: "@=resolver('ImageVariations', [value.value, args])"
resolve: "@=query('ImageVariations', [value.value, args])"
variation:
type: ImageVariation
args:
identifier:
type: ImageVariationIdentifier!
description: "A variation identifier."
resolve: "@=resolver('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: "@=resolver('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: "@=resolver('RichTextXmlToPlainText', [value.xml])"
resolve: "@=query('RichTextXmlToPlainText', [value.xml])"
html5:
type: "String"
description: "HTML5 representation."
resolve: "@=resolver('RichTextXmlToHtml5', [value.xml])"
resolve: "@=query('RichTextXmlToHtml5', [value.xml])"
html5_edit:
type: "String"
description: "Editable HTML5 representation."
resolve: "@=resolver('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: "@=resolver('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: "@=resolver('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: '@=resolver("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: '@=resolver("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: "@=resolver('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: "@=resolver('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: "@=resolver('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: "@=resolver('LocationUrlAliases', [value, args])"
resolve: "@=query('LocationUrlAliases', [value, args])"
contentInfo:
type: Content
resolve: "@=value.getContentInfo()"
content:
type: DomainContent
resolve: "@=resolver('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: '@=resolver("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: "@=resolver('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: '@=resolver("node", [value])'
idFetcher: '@=query("node", [value])'
item:
description: "An item, whatever its type"
type: Item
argsBuilder: "Item"
resolve: "@=resolver('Item', [args])"
resolve: "@=query('Item', [args])"
14 changes: 7 additions & 7 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: "@=resolver('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: "@=resolver('ContentType', [args])"
resolve: "@=query('ContentType', [args])"
contentTypes:
type: "[ContentType]"
args:
groupId:
type: "String"
groupIdentifier:
type: "String"
resolve: "@=resolver('ContentTypesFromGroup', [args])"
resolve: "@=query('ContentTypesFromGroup', [args])"

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

objectStateGroups:
type: '[ObjectStateGroup]'
description: "Fetches all Object State Groups."
resolve: "@=resolver('ObjectStateGroups')"
resolve: "@=query('ObjectStateGroups')"

objectState:
type: 'ObjectState'
Expand All @@ -60,7 +60,7 @@ Repository:
id:
type: "Int"
description: "ID of the Object State"
resolve: "@=resolver('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: "@=resolver('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: "@=resolver('UrlAliasType', [value])"
resolveType: "@=query('UrlAliasType', [value])"

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

ResourceUrlAlias:
Expand Down
Loading

0 comments on commit a7c66c1

Please sign in to comment.