Nanananananananana.. Pat Man!
    Wondering what’s next for npm?Check out our public roadmap! »

    graphql-fragmental

    0.1.6 • Public • Published

    graphql-fragmental

    GraphQL Fragment Resolver

    Use it to maintain named GraphQL-fragments and resolve them into complex queries. Plays well with lightweight GraphQL-clients like lokka.

    Installation

    npm install graphql-fragmental

    Usage

    Example

     
    const { registerFragment, resolveQuery } = require('graphql-fragmental');
    const lokka = require('lokka');
     
    registerFragment('MyFragment', `
            description
            { 
                url
                id
                type
                subType
             }
        `);
     
    const query = resolveQuery(`query tests { ...MyFragment }`);
     
    lokka.query(query).then(response => console.log(response));
     

    Versioning

    We use SemVer for versioning. For the versions available, see the tags on this repository.

    Authors

    License

    This project is licensed under the MIT License - see the LICENSE file for details

    Install

    npm i graphql-fragmental

    DownloadsWeekly Downloads

    1

    Version

    0.1.6

    License

    MIT

    Last publish

    Collaborators

    • avatar