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.
lokka-transport-http-isomorphic
Advanced tools
Changelog
v1.6.2
25 February 2018 Drop node-fetch and use isomorphic-fetch.
Fixes #18.
That causes due to a typo came with v1.6.0
.
Readme
Isomorphic HTTP Transport Layer for Lokka
remove node-fetch as it cause webpack warning, and use isomorphic-fetch.
This is a graphql-express compatible transport layer for Lokka.
Install the package:
npm i --save lokka-transport-http-isomorphic
npm i --save lokka
This is how to send request to Facebook's SWAPI GraphQL Demo.
import HttpTransport from 'lokka-transport-http';
const transport = new HttpTransport('http://graphql-swapi.parseapp.com/');
transport.send(`
{
allFilms {
films {
title
}
}
}
`).then(response => {
console.log(JSON.stringify(response, null, 2));
});
It's possible to send custom headers like this:
const headers = {
'my-headers': 'some-value'
};
const transport = new HttpTransport('/graphql', {headers});
This package does not handle authentication information for you. But it'll let you interact with your app's existing authentication mechanism.
Authorization
[header]((https://www.npmjs.com/package/basic-auth-header) to implement basic-auth support.By default it will create and throw a new Error
object using the first GraphQL error. Error handling can be customized with the handleErrors
option. Check the deafult error handler in lib/index.js
for an example.
FAQs
Isomorphic HTTP Transport for Lokka
The npm package lokka-transport-http-isomorphic receives a total of 1 weekly downloads. As such, lokka-transport-http-isomorphic popularity was classified as not popular.
We found that lokka-transport-http-isomorphic 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.