Skip to content

karudo/xenk

Repository files navigation

xenk

GraphQL query builder.

examples

import {createQuery, field, types} from 'xenk'

const queryField = field(
  'post', 
  [
    'id',
    'title',
    'text',
    field('author', ['name', 'email'])
  ], 
  {id: 'postid'}
);

const query = createQuery(queryField, {
  postid: types.id.notNull
});

console.log(query)
/*
query ($postid: ID!) {
  post (id: $postid) {
    id
    title
    text
    author {
      name
      email
    }
  }
}
*/

About

Xenk - a query builder for GraphQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published