Skip to content

Commit

Permalink
feat: add number specific properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemasta committed Oct 20, 2021
1 parent 9643ada commit 614aaa5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/api/fragments/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ export const multiLineTextFieldOptionFragment = /* GraphQL */ `
}
`

export const numberFieldOptionFragment = /* GraphQL */ `
fragment numberFieldOption on NumberFieldOption {
defaultNumber: defaultValue
lowest
highest
isIntegerOnly
limitNumberBy
}
`

export const productInfoFragment = /* GraphQL */ `
fragment productInfo on Product {
entityId
Expand Down Expand Up @@ -131,6 +141,7 @@ export const productInfoFragment = /* GraphQL */ `
...dateFieldOption
...textFieldOption
...multiLineTextFieldOption
...numberFieldOption
}
}
}
Expand All @@ -151,6 +162,7 @@ export const productInfoFragment = /* GraphQL */ `
${dateFieldOptionFragment}
${textFieldOptionFragment}
${multiLineTextFieldOptionFragment}
${numberFieldOptionFragment}
`

export const productConnectionFragment = /* GraphQL */ `
Expand Down
10 changes: 9 additions & 1 deletion src/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2748,6 +2748,13 @@ export type MultiLineTextFieldOptionFragment = {
'defaultValue' | 'minLength' | 'maxLength' | 'maxLines'
>

export type NumberFieldOptionFragment = {
__typename?: 'NumberFieldOption'
} & Pick<
NumberFieldOption,
'lowest' | 'highest' | 'isIntegerOnly' | 'limitNumberBy'
> & { defaultNumber: NumberFieldOption['defaultValue'] }

export type ProductInfoFragment = { __typename?: 'Product' } & Pick<
Product,
'entityId' | 'name' | 'path' | 'description'
Expand Down Expand Up @@ -2841,7 +2848,8 @@ export type ProductInfoFragment = { __typename?: 'Product' } & Pick<
| 'displayName'
| 'isVariantOption'
| 'isRequired'
>)
> &
NumberFieldOptionFragment)
| ({ __typename: 'TextFieldOption' } & Pick<
TextFieldOption,
| 'entityId'
Expand Down

0 comments on commit 614aaa5

Please sign in to comment.