
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@apollo/subgraph
Advanced tools
Apollo SubgraphThis package provides utilities for creating GraphQL microservices, which can be combined into a single endpoint through tools like Apollo Gateway.
For complete documentation, see the Apollo Subgraph API reference.
import { ApolloServer } from '@apollo/server';
import { startStandaloneServer } from '@apollo/server/standalone';
import { gql } from 'graphql-tag';
import { buildSubgraphSchema } from '@apollo/subgraph';
const typeDefs = gql`
type Query {
me: User
}
type User @key(fields: "id") {
id: ID!
username: String
}
`;
const resolvers = {
Query: {
me() {
return { id: "1", username: "@ava" }
}
},
User: {
__resolveReference(user, { fetchUserById }){
return fetchUserById(user.id)
}
}
};
const server = new ApolloServer({
schema: buildSubgraphSchema([{ typeDefs, resolvers }])
});
// Note the top-level await!
const { url } = await startStandaloneServer(server);
console.log(`🚀 Server ready at ${url}`);
graphql-tools is a set of utilities from Apollo that helps in building and maintaining GraphQL schemas. It provides schema stitching capabilities, which can be used to combine multiple schemas into one, similar to how Apollo Federation combines subgraphs. However, it does not provide the same level of built-in support for federated schemas as @apollo/subgraph.
graphql-modules is a package that allows you to create modular and reusable GraphQL schemas. It provides a way to organize your schema and resolvers into modules, which can then be combined into a single schema. While it offers a modular approach to building GraphQL schemas, it does not provide the same level of support for federated schemas as @apollo/subgraph.
FAQs
Apollo Subgraph Utilities
The npm package @apollo/subgraph receives a total of 632,366 weekly downloads. As such, @apollo/subgraph popularity was classified as popular.
We found that @apollo/subgraph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.