graphql-api-builder
TypeScript icon, indicating that this package has built-in type declarations

0.0.19 • Public • Published

GraphQL API Biulder

Allows you to build your apollo graphql api in an organized and structured way.

Exact design is still under construction, currently looks like this:

export const User: ObjectApi = {
  apiObject: 'User',
  dbObject: 'app_user',
  description: 'people who use our system',
  queryApis: [
    getIndexQuery,
    getDetailQuery
  ],
  mutationApis: [
    getCreateQuery,
    getDeleteQuery,
    getUpdateQuery
  ],
  fields: [{
    apiField: 'id',
    primary: true,
    apiType: 'Int',
    description: 'unique identifier',
    allowedForView: true
  }, {
    apiField: 'username',
    apiType: 'String',
    description: 'public identifier',
    requiredForCreate: true,
    allowedForUpdate: true,
    allowedForView: true
  }],
  getResolver
};

Package Sidebar

Install

npm i graphql-api-builder

Weekly Downloads

32

Version

0.0.19

License

MIT

Last publish

Collaborators

  • bkinsey808