@jahia/data-helper
TypeScript icon, indicating that this package has built-in type declarations

1.1.12 • Public • Published

Welcome to @jahia/data-helper 👋

Version License: SEE LICENSE IN ../../LICENSE.txt FILE Twitter: Jahia

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

Readme

Keywords

none

Package Sidebar

Install

npm i @jahia/data-helper

Weekly Downloads

83

Version

1.1.12

License

SEE LICENSE IN ../../LICENSE.txt FILE

Unpacked Size

497 kB

Total Files

210

Last publish

Collaborators

  • cmailleux
  • shuber
  • gflores-jahia
  • jahiaadmin
  • mdechecchi
  • jahia-ci