2022-02-21 13:32:38 +00:00
|
|
|
import { gql } from "@apollo/client";
|
2020-07-07 10:14:12 +00:00
|
|
|
|
2020-12-16 10:53:28 +00:00
|
|
|
import { fileFragment } from "./file";
|
2020-08-28 12:45:11 +00:00
|
|
|
import { metadataFragment } from "./metadata";
|
2021-05-24 11:01:18 +00:00
|
|
|
import { pageInfoFragment } from "./pageInfo";
|
2020-08-28 12:45:11 +00:00
|
|
|
|
2020-12-16 10:53:28 +00:00
|
|
|
export const attributeValueFragment = gql`
|
|
|
|
${fileFragment}
|
|
|
|
fragment AttributeValueFragment on AttributeValue {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
slug
|
|
|
|
file {
|
|
|
|
...FileFragment
|
|
|
|
}
|
2021-01-12 11:11:15 +00:00
|
|
|
reference
|
2021-04-09 07:51:49 +00:00
|
|
|
richText
|
2021-06-19 23:13:16 +00:00
|
|
|
boolean
|
2021-07-29 12:15:14 +00:00
|
|
|
date
|
|
|
|
dateTime
|
2021-09-21 13:16:21 +00:00
|
|
|
value
|
2020-12-16 10:53:28 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2020-07-07 10:14:12 +00:00
|
|
|
export const attributeFragment = gql`
|
|
|
|
fragment AttributeFragment on Attribute {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
slug
|
2020-11-19 14:42:14 +00:00
|
|
|
type
|
2020-07-07 10:14:12 +00:00
|
|
|
visibleInStorefront
|
|
|
|
filterableInDashboard
|
|
|
|
filterableInStorefront
|
2021-04-29 08:58:03 +00:00
|
|
|
unit
|
2021-06-19 23:13:16 +00:00
|
|
|
inputType
|
2020-07-07 10:14:12 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const attributeDetailsFragment = gql`
|
|
|
|
${attributeFragment}
|
2020-08-28 12:45:11 +00:00
|
|
|
${metadataFragment}
|
2020-07-07 10:14:12 +00:00
|
|
|
fragment AttributeDetailsFragment on Attribute {
|
|
|
|
...AttributeFragment
|
2020-08-28 12:45:11 +00:00
|
|
|
...MetadataFragment
|
2020-07-07 10:14:12 +00:00
|
|
|
availableInGrid
|
|
|
|
inputType
|
2021-01-12 11:11:15 +00:00
|
|
|
entityType
|
2021-04-29 08:58:03 +00:00
|
|
|
unit
|
2020-07-07 10:14:12 +00:00
|
|
|
storefrontSearchPosition
|
|
|
|
valueRequired
|
2021-05-24 11:01:18 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const attributeValueListFragment = gql`
|
|
|
|
${attributeValueFragment}
|
|
|
|
${pageInfoFragment}
|
|
|
|
fragment AttributeValueListFragment on AttributeValueCountableConnection {
|
|
|
|
pageInfo {
|
|
|
|
...PageInfoFragment
|
|
|
|
}
|
|
|
|
edges {
|
|
|
|
cursor
|
|
|
|
node {
|
|
|
|
...AttributeValueFragment
|
|
|
|
}
|
2020-07-07 10:14:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2020-11-19 14:42:14 +00:00
|
|
|
|
|
|
|
export const availableAttributeFragment = gql`
|
|
|
|
fragment AvailableAttributeFragment on Attribute {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
slug
|
|
|
|
}
|
|
|
|
`;
|