@jahia/data-helper
v1.1.14
Published
```sh yarn add @jahia/data-helper ```
Downloads
311
Keywords
Readme
Provide helpers (react hooks, utily function, ...) to manipulate jahia datas
Install
yarn add @jahia/data-helper
Usage
@jahia/data-helper include graphql fragment to reduce the size of the graphql queries and help you with mandatory field to update apollo cache.
You can use it like this:
import gql from 'graphql-tag';
import {PredefinedFragments} from '@jahia/data-helper';
export const ContentPickerFilledQuery = gql`
query contentPickerFilledQuery($uuid: String!, $language: String!, $needToFetch: Boolean!) {
jcr @include(if: $needToFetch) {
result: nodeById(uuid: $uuid) {
displayName(language: $language)
primaryNodeType {
displayName(language: $language)
icon
}
...NodeCacheRequiredFields
}
}
}
${PredefinedFragments.nodeCacheRequiredFields.gql}
`;
Author
👤 Jahia
🤝 Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2020 Jahia. This project is SEE LICENSE IN ../../LICENSE.txt FILE licensed.
This README was generated with ❤️ by readme-md-generator