
* Attribute values pagination on attribute details page * Update test snapshots * Update values pagination in attribute create page * Trigger CI * Update attribute valus list pagination settings * Update attribute details queries * Fetch only attribute values after values update
71 lines
1.3 KiB
TypeScript
71 lines
1.3 KiB
TypeScript
import gql from "graphql-tag";
|
|
|
|
import { fileFragment } from "./file";
|
|
import { metadataFragment } from "./metadata";
|
|
import { pageInfoFragment } from "./pageInfo";
|
|
|
|
export const attributeValueFragment = gql`
|
|
${fileFragment}
|
|
fragment AttributeValueFragment on AttributeValue {
|
|
id
|
|
name
|
|
slug
|
|
file {
|
|
...FileFragment
|
|
}
|
|
reference
|
|
richText
|
|
}
|
|
`;
|
|
|
|
export const attributeFragment = gql`
|
|
fragment AttributeFragment on Attribute {
|
|
id
|
|
name
|
|
slug
|
|
type
|
|
visibleInStorefront
|
|
filterableInDashboard
|
|
filterableInStorefront
|
|
unit
|
|
}
|
|
`;
|
|
|
|
export const attributeDetailsFragment = gql`
|
|
${attributeFragment}
|
|
${metadataFragment}
|
|
fragment AttributeDetailsFragment on Attribute {
|
|
...AttributeFragment
|
|
...MetadataFragment
|
|
availableInGrid
|
|
inputType
|
|
entityType
|
|
unit
|
|
storefrontSearchPosition
|
|
valueRequired
|
|
}
|
|
`;
|
|
|
|
export const attributeValueListFragment = gql`
|
|
${attributeValueFragment}
|
|
${pageInfoFragment}
|
|
fragment AttributeValueListFragment on AttributeValueCountableConnection {
|
|
pageInfo {
|
|
...PageInfoFragment
|
|
}
|
|
edges {
|
|
cursor
|
|
node {
|
|
...AttributeValueFragment
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const availableAttributeFragment = gql`
|
|
fragment AvailableAttributeFragment on Attribute {
|
|
id
|
|
name
|
|
slug
|
|
}
|
|
`;
|