Skip to content

Commit

Permalink
feat: add datefield specific properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemasta committed Oct 20, 2021
1 parent 8d3d3e6 commit a3b4836
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/api/fragments/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ export const checkboxOptionFragment = /* GraphQL */ `
checkedByDefault
}
`
export const dateFieldOptionFragment = /* GraphQL */ `
fragment dateFieldOption on DateFieldOption {
defaultDate: defaultValue
earliest
latest
limitDateBy
}
`

export const productInfoFragment = /* GraphQL */ `
fragment productInfo on Product {
Expand Down Expand Up @@ -104,6 +112,7 @@ export const productInfoFragment = /* GraphQL */ `
isRequired
...multipleChoiceOption
...checkboxOption
...dateFieldOption
}
}
}
Expand All @@ -121,6 +130,7 @@ export const productInfoFragment = /* GraphQL */ `
${productPrices}
${multipleChoiceOptionFragment}
${checkboxOptionFragment}
${dateFieldOptionFragment}
`

export const productConnectionFragment = /* GraphQL */ `
Expand Down
8 changes: 7 additions & 1 deletion src/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2731,6 +2731,11 @@ export type CheckboxOptionFragment = { __typename?: 'CheckboxOption' } & Pick<
'checkedByDefault'
>

export type DateFieldOptionFragment = { __typename?: 'DateFieldOption' } & Pick<
DateFieldOption,
'earliest' | 'latest' | 'limitDateBy'
> & { defaultDate: DateFieldOption['defaultValue'] }

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

0 comments on commit a3b4836

Please sign in to comment.