gql-info-to-select
v1.0.2
Published
Converters graphQL info parameter into prisma-client select part
Downloads
4
Readme
gql-info-to-select
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,
});