gql-info-to-select
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

gql-info-to-select

David GitHub code size in bytes GitHub repo size npm npm npm npm NPM npm GitHub last commit npm collaborators

This module takes graphQL info object and returns prisma-clint's include object

Installation

Using npm:

$ npm i gql-info-to-select

Note: add --save if you are using npm < 5.0.0

In Node.js:

// Load the full build.
var infoSelect = require("gql-info-to-select");
var userIncludes = infoSelect.includes(info);
 
return ctx.prisma.user.findOne({
  where: { id: ctx.user.id },
  include: userIncludes,
});
 
// Load the full build.
var infoSelect = require("gql-info-to-select");
var userIncludes = infoSelect.includes(info);
 
return ctx.prisma.user.findOne({
  where: { id: ctx.user.id },
  include: userIncludes,
});
 

Package Sidebar

Install

npm i gql-info-to-select

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

115 kB

Total Files

13

Last publish

Collaborators

  • cnak145