Skip to content

Commit b945c09

Browse files
committed
IBX-11606: Bumped overblog/graphql-bundle and resolved deprecations
1 parent 49917f2 commit b945c09

27 files changed

Lines changed: 69 additions & 72 deletions

composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"ibexa/rest": "~4.6.0@dev",
2222
"ibexa/fieldtype-richtext": "~4.6.0@dev",
2323
"lexik/jwt-authentication-bundle": "^2.8",
24-
"overblog/graphql-bundle": "^0.14.2",
24+
"overblog/graphql-bundle": "^1.6.0",
2525
"erusev/parsedown": "^1.7",
2626
"symfony/dependency-injection": "^5.0",
2727
"symfony/http-kernel": "^5.0",
@@ -62,9 +62,6 @@
6262
"spec\\EzSystems\\EzPlatformGraphQL\\": "spec/EzSystems/EzPlatformGraphQL"
6363
}
6464
},
65-
"conflict": {
66-
"webonyx/graphql-php": ">= 15.0.0"
67-
},
6865
"extra": {
6966
"branch-alias": {
7067
"dev-main": "4.6.x-dev"

spec/Schema/Domain/Content/Mapper/FieldDefinition/RelationFieldDefinitionMapperSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ function it_delegates_the_field_definition_type_to_the_inner_mapper(FieldDefinit
8181
function it_maps_multi_selection_to_resolve_multiple()
8282
{
8383
$fieldDefinition = $this->createFieldDefinition(self::DEF_LIMIT_MULTI);
84-
$this->mapToFieldValueResolver($fieldDefinition)->shouldReturn('@=resolver("RelationFieldValue", [field, true, args])');
84+
$this->mapToFieldValueResolver($fieldDefinition)->shouldReturn('@=query("RelationFieldValue", field, true, args)');
8585
}
8686

8787
function it_maps_single_selection_to_resolve_single()
8888
{
8989
$fieldDefinition = $this->createFieldDefinition(self::DEF_LIMIT_SINGLE);
90-
$this->mapToFieldValueResolver($fieldDefinition)->shouldReturn('@=resolver("RelationFieldValue", [field, false, args])');
90+
$this->mapToFieldValueResolver($fieldDefinition)->shouldReturn('@=query("RelationFieldValue", field, false, args)');
9191
}
9292

9393
private function createFieldDefinition($selectionLimit = 0, $selectionContentTypes = [])

src/bundle/DependencyInjection/GraphQL/SchemaProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface SchemaProvider
1414
/**
1515
* Returns the overblog graphql schema configuration.
1616
*
17-
* @return array Array with the keys from overlog graphql config: query, mutation, resolver_maps...
17+
* @return array Array with the keys from overblog graphql config: query, mutation, types...
1818
*/
1919
public function getSchemaConfiguration();
2020
}

src/bundle/DependencyInjection/GraphQL/YamlSchemaProvider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
*/
77
namespace Ibexa\Bundle\GraphQL\DependencyInjection\GraphQL;
88

9-
use Ibexa\GraphQL\Resolver\Map\UploadMap;
10-
119
/**
1210
* Provides schema definitions.
1311
*/
@@ -36,7 +34,6 @@ public function getSchemaConfiguration()
3634
return [
3735
'query' => $this->getQuerySchema(),
3836
'mutation' => $this->getMutationSchema(),
39-
'resolver_maps' => [UploadMap::class],
4037
'types' => ['UntypedContent'],
4138
];
4239
}

src/bundle/Resources/config/graphql/Base.types.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DateTime:
2323
format:
2424
type: String
2525
description: "Date formatted with a date() format"
26-
resolve: "@=resolver('DateTimeFormat', [value, args])"
26+
resolve: "@=query('DateTimeFormat', value, args)"
2727
args:
2828
pattern:
2929
type: "String"

src/bundle/Resources/config/graphql/Content.types.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ Content:
1212
contentType:
1313
type: "ContentType"
1414
description: "The content type of the Content item."
15-
resolve: "@=resolver('ContentTypeById', [value.contentTypeId])"
15+
resolve: "@=query('ContentTypeById', value.contentTypeId)"
1616
name:
1717
type: "String"
1818
description: "The computed name (via name schema) in the main language of the Content item."
1919
section:
2020
type: "Section"
2121
description: "The section to which the Content object is assigned."
22-
resolve: "@=resolver('SectionById', [value.sectionId])"
22+
resolve: "@=query('SectionById', value.sectionId)"
2323
currentVersionNo:
2424
type: "Int"
2525
description: "Version number of the published version, or 1 for a newly created draft."
2626
currentVersion:
2727
type: "Version"
2828
description: "The currently published version"
29-
resolve: "@=resolver('CurrentVersion', [value])"
29+
resolve: "@=query('CurrentVersion', value)"
3030
versions:
3131
type: "[Version]"
3232
description: "All content versions."
33-
resolve: "@=resolver('ContentVersions', [value.id])"
33+
resolve: "@=query('ContentVersions', value.id)"
3434
published:
3535
type: "Boolean"
3636
description: "If the Content item has a published version."
@@ -40,7 +40,7 @@ Content:
4040
owner:
4141
type: "User"
4242
description: "The owner user of the Content object"
43-
resolve: "@=resolver('UserById', [value.ownerId])"
43+
resolve: "@=query('UserById', value.ownerId)"
4444
modificationDate:
4545
type: DateTime
4646
description: "Date the Content item was last modified on."
@@ -62,23 +62,23 @@ Content:
6262
mainLocation:
6363
type: "Location"
6464
description: "Content item's main location."
65-
resolve: "@=resolver('LocationById', [value.mainLocationId])"
65+
resolve: "@=query('LocationById', value.mainLocationId)"
6666
locations:
6767
type: "[Location]"
6868
description: "All the locations of the Content item"
69-
resolve: "@=resolver('LocationsByContentId', [value.id])"
69+
resolve: "@=query('LocationsByContentId', value.id)"
7070
relations:
7171
type: "[ContentRelation]"
7272
description: "Relations from this Content"
73-
resolve: "@=resolver('ContentRelations', [value])"
73+
resolve: "@=query('ContentRelations', value)"
7474
reverseRelations:
7575
type: "[ContentRelation]"
7676
description: "Relations to this Content"
77-
resolve: "@=resolver('ContentReverseRelations', [value])"
77+
resolve: "@=query('ContentReverseRelations', value)"
7878
states:
7979
type: "[ObjectState]"
8080
description: "Content States."
81-
resolve: "@=resolver('ObjectStateByContentInfo', [value])"
81+
resolve: "@=query('ObjectStateByContentInfo', value)"
8282

8383
ContentRelation:
8484
type: "object"

src/bundle/Resources/config/graphql/ContentType.types.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ ContentType:
4747
creator:
4848
type: "User"
4949
description: "The user who created this content type."
50-
resolve: "@=resolver('UserById', [value.creatorId])"
50+
resolve: "@=query('UserById', value.creatorId)"
5151
modifierId:
5252
type: "Int"
5353
description: "The user id of the user which has last modified this content type"
5454
modifier:
5555
type: "User"
5656
description: "The user which has last modified this content type"
57-
resolve: "@=resolver('UserById', [value.modifierId])"
57+
resolve: "@=query('UserById', value.modifierId)"
5858
remoteId:
5959
type: "String"
6060
description: "A global unique id of the content type."
@@ -99,12 +99,12 @@ ContentTypeGroup:
9999
type: "Int"
100100
creator:
101101
type: "User"
102-
resolve: "@=resolver('UserById', [value.creatorId])"
102+
resolve: "@=query('UserById', value.creatorId)"
103103
modifierId:
104104
type: "Int"
105105
modifier:
106106
type: "User"
107-
resolve: "@=resolver('UserById', [value.modifierId])"
107+
resolve: "@=query('UserById', value.modifierId)"
108108
contentTypes:
109109
type: "[ContentType]"
110110
resolve: "@=query('ContentTypesFromGroup', {'groupId': value.id})"

src/bundle/Resources/config/graphql/DomainContent.types.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ DomainContent:
2929
type: String
3030
_thumbnail:
3131
type: Thumbnail
32-
resolveType: "@=resolver('DomainContentType', [value])"
32+
resolveType: "@=query('DomainContentType', value)"
3333

3434
AbstractDomainContent:
3535
type: "object"
@@ -44,7 +44,7 @@ AbstractDomainContent:
4444
_type:
4545
description: "The item's content type"
4646
type: ContentType
47-
resolve: '@=resolver("ContentTypeById", [value.contentInfo.contentTypeId])'
47+
resolve: '@=query("ContentTypeById", value.contentInfo.contentTypeId)'
4848
_content:
4949
description: 'Underlying content info item'
5050
type: Content
@@ -57,19 +57,19 @@ AbstractDomainContent:
5757
_location:
5858
description: 'Main location'
5959
type: Location
60-
resolve: '@=resolver("LocationById", [value.contentInfo.mainLocationId])'
60+
resolve: '@=query("LocationById", value.contentInfo.mainLocationId)'
6161
_allLocations:
6262
description: 'All the locations'
6363
type: '[Location]'
64-
resolve: '@=resolver("LocationsByContentId", [value.contentInfo.id])'
64+
resolve: '@=query("LocationsByContentId", value.contentInfo.id)'
6565
_name:
6666
description: "The content item's name, in the prioritized language(s), based on the object name pattern"
6767
type: String
6868
resolve: "@=value.getName()"
6969
_url:
7070
description: "The content item's url alias, based on the main location."
7171
type: String
72-
resolve: "@=resolver('MainUrlAlias', [value])"
72+
resolve: "@=query('MainUrlAlias', value)"
7373
_thumbnail:
7474
type: Thumbnail
7575
resolve: "@=query('Thumbnail', value.getThumbnail())"

src/bundle/Resources/config/graphql/Field.types.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ ImageFieldValue:
4545
identifier:
4646
type: "[ImageVariationIdentifier]!"
4747
description: "One or more variation identifiers."
48-
resolve: "@=resolver('ImageVariations', [value.value, args])"
48+
resolve: "@=query('ImageVariations', value.value, args)"
4949
variation:
5050
type: ImageVariation
5151
args:
5252
identifier:
5353
type: ImageVariationIdentifier!
5454
description: "A variation identifier."
55-
resolve: "@=resolver('ImageVariation', [value.value, args])"
55+
resolve: "@=query('ImageVariation', value.value, args)"
5656

5757
ImageAdditionalData:
5858
type: object
@@ -139,7 +139,7 @@ DateFieldValue:
139139
formatted:
140140
type: "String"
141141
description: "Formatted date"
142-
resolve: "@=resolver('DateTimeFormat', [args['format'], value.value])"
142+
resolve: "@=query('DateTimeFormat', args['format'], value.value)"
143143
args:
144144
format:
145145
type: String
@@ -248,15 +248,15 @@ RichTextFieldValue:
248248
plaintext:
249249
type: "String"
250250
description: "Plain text representation of the value, without tags. Warning: the text representation may not be perfect."
251-
resolve: "@=resolver('RichTextXmlToPlainText', [value.xml])"
251+
resolve: "@=query('RichTextXmlToPlainText', value.xml)"
252252
html5:
253253
type: "String"
254254
description: "HTML5 representation."
255-
resolve: "@=resolver('RichTextXmlToHtml5', [value.xml])"
255+
resolve: "@=query('RichTextXmlToHtml5', value.xml)"
256256
html5_edit:
257257
type: "String"
258258
description: "Editable HTML5 representation."
259-
resolve: "@=resolver('RichTextXmlToHtml5Edit', [value.xml])"
259+
resolve: "@=query('RichTextXmlToHtml5Edit', value.xml)"
260260

261261
SelectionFieldValue:
262262
type: object

src/bundle/Resources/config/graphql/FieldDefinition.types.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ SelectionFieldDefinitionSettings:
194194
type: Boolean
195195
options:
196196
type: "[SelectionFieldDefinitionOption]"
197-
resolve: "@=resolver('SelectionFieldDefinitionOptions', [value['options']])"
197+
resolve: "@=query('SelectionFieldDefinitionOptions', value['options'])"
198198

199199
SelectionFieldDefinitionOption:
200200
type: object

0 commit comments

Comments
 (0)