
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
graphql-filter-fragment
Advanced tools
Filters a data structure by a GraphQL fragment.
import filterGraphQlFragment from 'graphql-filter-fragment';
import {gql} from '@apollo/client/core';
const result = filterGraphQlFragment(
gql`
fragment museum on Museum {
name
address {
city
}
}
`,
{
name: 'Museum of Popular Culture',
address: {
street: '325 5th Ave N',
city: 'Seattle'
}
}
);
expect(result).toEqual({
name: 'Museum of Popular Culture',
address: {
city: 'Seattle'
}
});
This utility function is helpful to remove read-only fields before mutations if the data was fetched previously.
All credit goes to the graphql-anywhere
package which is unfortunately not maintained anymore and the utilities no longer included in recent @apollo/client
versions. The code in this repo is a direct copy-paste from the original code with an updated peer dependency version of graphql
.
FAQs
Filters a data structure by a GraphQL fragment
The npm package graphql-filter-fragment receives a total of 7,802 weekly downloads. As such, graphql-filter-fragment popularity was classified as popular.
We found that graphql-filter-fragment 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.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.