
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@ninjaneers/graphiql-webcomponent
Advanced tools
A Webcomponent wrapper around [GraphiQL](https://github.com/graphql/graphiql) and [GraphiQL-Explorer](https://github.com/OneGraph/graphiql-explorer/).
A Webcomponent wrapper around GraphiQL and GraphiQL-Explorer.
Add import @ninjaneers/graphiql-webcomponent;
to your app.module.ts to register the Webcomponent in the browser.
Add schemas: [CUSTOM_ELEMENTS_SCHEMA]
to the modules where the Webcomponent will be used.
Now you can use the Webcomponent in your Angular templates like this:
<div *ngIf="config$ | async as config">
<graphiql-webcomponent #graphiql
[config]="config"
[query]="''"
[variables]="{}"
></graphiql-webcomponent>
</div>
export class ParentComponent implements AfterViewInit {
public config$ = new BehaviorSubject({
api: {
url: 'http://localhost:8080/graphql',
},
})
@ViewChild('graphiql')
public graphiql: ElementRef;
public ngAfterViewInit(): void {
this.graphiql.nativeElement.addEventListener('QueryChange', (event) => console.dir(event));
this.graphiql.nativeElement.addEventListener('VariablesChange', (event) => console.dir(event));
}
}
Add import @ninjaneers/graphiql-webcomponent;
to your index.(js/ts) to register the webcomponent in the browser.
Now you can use the Webcomponent in your (j/t)sx like this:
const Parent = () => {
const ref = useRef(null);
useEffect(() => {
ref.current.addEventListener('QueryChange', (event) => console.dir(event));
ref.current.addEventListener('VariablesChange', (event) => console.dir(event));
}, [ref]);
return <graphiql-webcomponent ref={ref}
config={config}
query={""}
variables={{}}
></graphiql-webcomponent>
}
type GraphiqlWebcomponentConfig = {
api: {
url: string;
headers?: Record<string, string>;
subscriptionUrl?: string;
wsConnectionParams?: Record<string, string | Record<string, string>>;
};
defaultQuery?: string;
disableExplorer?: boolean;
editorTheme?: string;
excludeMutations?: boolean;
excludeSubscriptions?: boolean;
};
http://localhost:3000/v1/graphql
.{"Authorization": "Bearer ..."}
.ws://localhost:3000/v1/graphql
.{headers: {Authorization": "Bearer ...}}
.false
."dracula"
.false
.false
.FAQs
A Webcomponent wrapper around [GraphiQL](https://github.com/graphql/graphiql) and [GraphiQL-Explorer](https://github.com/OneGraph/graphiql-explorer/).
The npm package @ninjaneers/graphiql-webcomponent receives a total of 30 weekly downloads. As such, @ninjaneers/graphiql-webcomponent popularity was classified as not popular.
We found that @ninjaneers/graphiql-webcomponent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.