Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@pothos/core
Advanced tools
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
Pothos is a plugin based GraphQL schema builder for typescript.
It makes building graphql schemas in typescript easy, fast and enjoyable. The core of Pothos adds 0
overhead at runtime, and has graphql
as its only dependency.
Pothos is the most type-safe way to build GraphQL schemas in typescript, and by leveraging type inference and typescript's powerful type system Pothos requires very few manual type definitions and no code generation.
Pothos has a unique and powerful plugin system that makes every plugin feel like its features are built into the core library. Plugins can extend almost any part of the API by adding new options or methods that can take full advantage of the Pothos type system.
import { createServer } from 'node:http';
import { createYoga } from 'graphql-yoga';
import SchemaBuilder from '@pothos/core';
const builder = new SchemaBuilder({});
builder.queryType({
fields: (t) => ({
hello: t.string({
args: {
name: t.arg.string(),
},
resolve: (parent, { name }) => `hello, ${name || 'World'}`,
}),
}),
});
const yoga = createYoga({
schema: builder.toSchema(),
});
const server = createServer(yoga);
server.listen(3000);
Add global, type level, or field level authorization checks to your schema
A plugin for defining and limiting complexity of queries
Integrate with existing schema graphql directives in a type-safe way.
A plugin for easily including error types in your GraphQL schema and hooking up error types to resolvers.
Quickly define data-loaders for your types and fields to avoid n+1 queries.
Add mock resolvers for easier testing
A plugin for more efficient integration with prisma that can help solve n+1 issues and more efficienty resolve queries
Easy to use builder methods for defining relay style nodes and connections, and helpful utilities for cursor based pagination.
Define simple object types without resolvers or manual type definitions.
Make any part of your graph subscribable to get live updates as your data changes.
Build multiple subsets of your graph to easily share code between internal and external APIs.
Add tracing for resolver execution, with support for opentelemetry, newrelic, century, logging, and custom tracers
Validating your inputs and arguments
Define fields with inline input objects
FAQs
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
The npm package @pothos/core receives a total of 79,166 weekly downloads. As such, @pothos/core popularity was classified as popular.
We found that @pothos/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.