Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
This package allows you to injects type resolvers directly into GraphQL schema language.
A lot of boilerplate code if write schemas on javascript graphql-js.
This is better graphql-tools but resolvers described after the schema.
Using tagged template literals we can place resolvers directly inside schema.
import { gqb, getResolvers } from 'gqb';
import { graphql } from 'graphql';
import { makeExecutableSchema } from 'graphql-tools';
const schema = gqb`
type Query {
hello: String${ // field resolver source
() => 'World'
},
pic(size: Int): String${
(_, { size }) => `pic size is: ${size}`
}
}
type Mutation {
setMessage(message: String): String${ // mutation source
(_, { message }) => `Mutated ${message}`
}
}
`;
const executableSchema = makeExecutableSchema(
getResolvers(schema)
);
graphql(
executableSchema,
'{ hello, pic(size: 20)}'
)
.then(response => console.log(response));
Type fields resolver now are placed directly in the schema, immediatelly after type!!!
It also supports schema inlining, (see tests)
See the source it's small.
FAQs
graphql schema builder
The npm package gqb receives a total of 1 weekly downloads. As such, gqb popularity was classified as not popular.
We found that gqb 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.