mirror of
https://github.com/vale981/Vulcan
synced 2025-03-12 05:26:38 -04:00
32 lines
No EOL
641 B
JavaScript
32 lines
No EOL
641 B
JavaScript
import { createFragment } from 'apollo-client';
|
|
import gql from 'graphql-tag';
|
|
import Categories from 'meteor/nova:categories';
|
|
|
|
Categories.fragments = {
|
|
full: createFragment(gql`
|
|
fragment fullCategoryInfo 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
|
|
}
|
|
}
|
|
`),
|
|
minimum: createFragment(gql`
|
|
fragment minimumCategoryInfo on Category {
|
|
_id
|
|
name
|
|
slug
|
|
}
|
|
`),
|
|
}; |