Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
graphql-info-transformer
Advanced tools
This is a proof of concept to transform GraphQL's `info` into an object that can be consumed by Prisma's PhotonJS (API schema and DB schema must match). Can be useful when migrating from Prisma v1 to v2 (i.e. from Prisma Binding to PhotonJS).
This is a proof of concept to transform GraphQL's info
into an object that can be consumed by Prisma's PhotonJS (API schema and DB schema must match). Can be useful when migrating from Prisma v1 to v2 (i.e. from Prisma Binding to PhotonJS).
users(_, args, ctx, info) {
return photon.users.findMany({
select: infoToPhotonSelect(info)
})
})
Based on this article and some GraphQL-related projects.
npm install graphql-info-transformer
yarn add graphql-info-transformer
In the example
folder:
yarn prisma2 dev
yarn seed
Run the project with yarn start
and open the Playground to try the following query:
query {
users {
id
name
email
posts(where: { title: { contains: "prisma" } }, orderBy: { title: asc }) {
id
content
title
}
}
}
It should show only 2 of the 3 posts in the seed.
FAQs
This is a proof of concept to transform GraphQL's `info` into an object that can be consumed by Prisma's PhotonJS (API schema and DB schema must match). Can be useful when migrating from Prisma v1 to v2 (i.e. from Prisma Binding to PhotonJS).
We found that graphql-info-transformer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.