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.
graphql-type-uuid
Advanced tools
UUID scalar type for GraphQL.js.
This package exports a UUID scalar GraphQL.js type:
import GraphQLUUID from 'graphql-type-uuid';
You can use this in a programmatically-constructed schema as with any other scalar type:
import { GraphQLObjectType } from 'graphql';
import GraphQLUUID from 'graphql-type-uuid';
export default new GraphQLObjectType({
name: 'MyType',
fields: {
myField: { type: GraphQLUUID },
},
});
When using the SDL with graphql-tools, define GraphQLUUID
as the resolver for
the corresponding scalar type in your schema:
import { makeExecutableSchema } from 'graphql-tools';
import GraphQLUUID from 'graphql-type-uuid';
const typeDefs = `
scalar UUID
type MyType {
myField: UUID
}
`;
const resolvers = {
UUID: GraphQLUUID,
};
export default makeExecutableSchema({ typeDefs, resolvers });
If you happen to be looking for a JSON scalar GraphQL.js type, please check graphql-type-json, in which this project is heavily inspired.
FAQs
UUID scalar type for GraphQL.js
We found that graphql-type-uuid 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
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.