Skip to content

Commit 481990c

Browse files
authored
IBX-3095: Fixed BinaryFile fieldtype resolving (#128)
* IBX-3095: Fixed BinaryFile fieldtype resolving * IBX-3095: Removed `BinaryBaseFieldValue` config and refactored `BinaryFileFieldValue` mappings
1 parent e79b783 commit 481990c

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

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

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,30 +88,22 @@ AuthorFieldValue:
8888
email:
8989
type: "String"
9090

91-
BinaryBaseFieldValue:
91+
BinaryFileFieldValue:
9292
type: object
9393
config:
9494
fields:
95-
id:
96-
type: String
9795
fileName:
98-
type: String
96+
type: "String"
97+
resolve: "@=value.fileName"
9998
fileSize:
100-
type: Int
99+
type: "Int"
100+
resolve: "@=value.fileSize"
101101
mimeType:
102-
type: String
102+
type: "String"
103+
resolve: "@=value.mimeType"
103104
uri:
104-
type: String
105-
text:
106-
type: String
107-
108-
BinaryFileFieldValue:
109-
type: object
110-
config:
111-
fields:
112-
downloadCount:
113-
type: Int
114-
inherits: [BinaryBaseFieldValue]
105+
type: "String"
106+
resolve: "@=value.uri"
115107

116108
CountryFieldValue:
117109
type: object
@@ -207,7 +199,7 @@ MediaFieldValue:
207199
type: Int
208200
description: "Width of the media."
209201
resolve: "@=value.width"
210-
inherits: [BinaryBaseFieldValue]
202+
inherits: [BinaryFileFieldValue]
211203

212204
PriceFieldValue:
213205
type: object

0 commit comments

Comments
 (0)