Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@arc-core-components/content-schema_ans-feed-v0.6.2
Advanced tools
GraphQL schema for use with any content source returning a feed of ANS stories.
This the Arc Core Component representing a GraphQL schema that can be used with a content source.
A GraphQL schema defines all potential queries possible against a content source, using strongly typed field definitions.
Queries are executed using GraphQL filters, subsets of the fields defined in the
schema, per content source call, in the form of a URL filter
param, ex:
/content/v4/search/?size=10&filter=content_elements%20{%20canonical_url%20description%20{%20basic%20}}
Only those fields specified per filter are returned to the client, reducing payload, without requiring custom endpoints.
Schemas can be large, filters should be small.
This Core Component must be used within a Fusion project.
It should be used for any feature showing a feed of ANS stories (Flex Feed
,
Section Feed
, Recirc Feed
, etc).
npm install @arc-core-components/content-schema_ans-feed-v0.6.2
/schemas
folder. For
this content source, the suggested name is ans-feed.js
ans-feed.js
:import schema from "@arc-core-components/content-schema_ans-feed-v0.6.2";
export default schema;
Add the ans-feed
schema to your Fusion Content Source:
In every Fusion data request (getContent
, fetchContent
), pass a filter
object as the 3rd param:
Example of an ANS Feed filter (/filters/ansFeedFilter.js
):
export default `
{
content_elements {
canonical_url
description {
basic
}
headlines {
basic
}
promo_items {
basic {
type
url
}
}
taxonomy {
primary_section {
name
}
}
credits {
by {
name
image {
url
}
slug
}
}
}
}
`;
Run the following utility in your browser console (based on Fusion version):
/core-components/documentation/utilities/fusionDataViewer2.0.js
/core-components/documentation/utilities/fusionDataViewer2.1.js
Click the Content Cache
button to see the summarized JSON returned to the
page
Note: To view the difference in data returned, without running a script, simply right click -> View Page Source, to see the JSON data loaded onto the page.
Comparison of data returned from the same Section page:
FAQs
GraphQL schema for use with any content source returning a feed of ANS stories.
We found that @arc-core-components/content-schema_ans-feed-v0.6.2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.