Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@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 23 weekly downloads. As such, @ninjaneers/graphiql-webcomponent popularity was classified as not popular.
We found that @ninjaneers/graphiql-webcomponent demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.