graphql-fragmental
v0.1.6
Published
GraphQL Fragment Resolver
Downloads
9
Maintainers
Readme
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
- Oliver Erdmann - olivererdmann
- Finaldream Productions - Organization finaldream
License
This project is licensed under the MIT License - see the LICENSE file for details