mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
52 lines
983 B
JavaScript
52 lines
983 B
JavaScript
![]() |
import gql from 'graphql-tag';
|
||
|
|
||
|
const fragments = {
|
||
|
|
||
|
list: {
|
||
|
name: 'categoriesListFragment',
|
||
|
fragment: gql`
|
||
|
fragment categoriesListFragment on Category {
|
||
|
_id
|
||
|
name
|
||
|
description
|
||
|
order
|
||
|
slug
|
||
|
image
|
||
|
parent {
|
||
|
# feels weird to repeat the same fields... but we cannot call the fragment on itself?!
|
||
|
_id
|
||
|
name
|
||
|
description
|
||
|
order
|
||
|
slug
|
||
|
image
|
||
|
}
|
||
|
}
|
||
|
`,
|
||
|
},
|
||
|
|
||
|
single: {
|
||
|
name: 'categoriesSingleFragment',
|
||
|
fragment: gql`
|
||
|
fragment categoriesSingleFragment on Category {
|
||
|
_id
|
||
|
name
|
||
|
description
|
||
|
order
|
||
|
slug
|
||
|
image
|
||
|
parent {
|
||
|
# feels weird to repeat the same fields... but we cannot call the fragment on itself?!
|
||
|
_id
|
||
|
name
|
||
|
description
|
||
|
order
|
||
|
slug
|
||
|
image
|
||
|
}
|
||
|
}
|
||
|
`,
|
||
|
},
|
||
|
};
|
||
|
|
||
|
export default fragments;
|