Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
graphql-filter-fragment
Advanced tools
Readme
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 4,827 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.