Skip to content

Commit

Permalink
IBX-3095: Fixed BinaryFile fieldtype resolving (#128)
Browse files Browse the repository at this point in the history
* IBX-3095: Fixed BinaryFile fieldtype resolving
* IBX-3095: Removed `BinaryBaseFieldValue` config and refactored `BinaryFileFieldValue` mappings
  • Loading branch information
barw4 authored Jul 11, 2022
1 parent e79b783 commit 481990c
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions src/Resources/config/graphql/Field.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,30 +88,22 @@ AuthorFieldValue:
email:
type: "String"

BinaryBaseFieldValue:
BinaryFileFieldValue:
type: object
config:
fields:
id:
type: String
fileName:
type: String
type: "String"
resolve: "@=value.fileName"
fileSize:
type: Int
type: "Int"
resolve: "@=value.fileSize"
mimeType:
type: String
type: "String"
resolve: "@=value.mimeType"
uri:
type: String
text:
type: String

BinaryFileFieldValue:
type: object
config:
fields:
downloadCount:
type: Int
inherits: [BinaryBaseFieldValue]
type: "String"
resolve: "@=value.uri"

CountryFieldValue:
type: object
Expand Down Expand Up @@ -207,7 +199,7 @@ MediaFieldValue:
type: Int
description: "Width of the media."
resolve: "@=value.width"
inherits: [BinaryBaseFieldValue]
inherits: [BinaryFileFieldValue]

PriceFieldValue:
type: object
Expand Down

0 comments on commit 481990c

Please sign in to comment.